natlibfi/besimple-soap

Build and consume SOAP and WSDL based web services

v3.0.1 2024-11-01 08:16 UTC

README

Forked from https://github.com/smartboxgroup/BeSimpleSoap.

Build SOAP and WSDL based web services

Latest Stable Version Minimum PHP Version CI

Components

BeSimpleSoap consists of four components as described below.

BeSimple\SoapClient

The BeSimpleSoapClient is a component that extends the native PHP SoapClient with further features like SwA, MTOM and WS-Security.

Features (only subsets of the linked specs implemented)

  • SwA: SOAP Messages with Attachments Spec
  • MTOM: SOAP Message Transmission Optimization Mechanism Spec
  • WS-Security Spec1, Spec2
  • WS-Adressing Spec

Usage

See PHP documentation for more information on how to use the library.

BeSimple\SoapServer

The BeSimpleSoapServer is a component that extends the native PHP SoapServer with further features like SwA, MTOM and WS-Security.

Features (only subsets of the linked specs implemented)

  • SwA: SOAP Messages with Attachments Spec
  • MTOM: SOAP Message Transmission Optimization Mechanism Spec
  • WS-Security Spec1, Spec2

Usage

See PHP documentation for more information on how to use the library.

BeSimple\SoapCommon

The BeSimpleSoapCommon component contains functionality shared by both the server and client implementations.

Features

  • Common interfaces for SoapClient and SoapServer input/output processing flow
  • MIME parser for SwA and MTOM implementation
  • Soap type converters

BeSimple\SoapWsdl

WSDL support classes.

Information for Developers

Makefile contains different commands for running tests e.g. in a Docker container. Examples:

make start

make qa

Running tests locally

Tests that don't require a running server can be run locally with the following command:

COMPOSER_BINARY=/path/to/composer.phar bin/simple-phpunit

To start the servers and run all tests, run the following commands first, then the one above:

src/BeSimple/SoapClient/Tests/bin/axis.sh src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh