Providing SOAP Web Services without WSDL Definition
Learn how to provide SOAP web services (e.g. in RPC style) without WSDL definition via HTTP POST with the X4 BPMS.
Prerequisites:
- Basic knowledge of the structure of SOAP web services
- A Technical Process per web service operation, which assumes the processing of the incoming request. The Technical Process is referenced via its
x4db:/ URL
, thereby. - A URL part, under which the SOAP web service shall be accessible via HTTP, e.g.
http://localhost:8080/X4/httpstarter/ReST/MyWebservice
. Typically, you have already defined this URL part as constant within the webservice configuration, see Graphically Editing the Web Service Configuration.
In order to provide a Technical Process as SOAP web service without WSDL definition, proceed as follows:
Create a new
SOAP
service entry under the desired URL resource (defined e.g. by means of a constant URL part) via the context menu Add SOAP Service.Specify the SOAP version (either SOAP 1.1, SOAP 1.2 or support for both standards).
Select the WSDL mode
NONE
.Define the following configuration for each operation:
- Specify the Qualified Name of the first element within the SOAP request's body as name for the operation.
Link the Technical Process which handles the web service request via the X4 Server using its
x4db:/ URL
.Within the Webservice Configuration Editor this is possible by drag & drop from the repository.
Define the input and output handler for the SOAP web service.
- Save and apply the web service configuration via Reload on Server.
The SOAP web service will be active instantly and can be called by means of its service URL exclusively via HTTP POST. A call of the service URL via HTTP GET doesn't return any WSDL definition.
Example: Configuration of the web service without WSDL definition
<Service type="Soap">
<SoapVersion>
<SOAP11/>
<SOAP12/>
</SoapVersion>
<Wsdl mode="NONE"/>
<Namespace prefix="exampleSpace" namespace="http://example.org/namespace"/>
<Namespace prefix="anotherSpace" namespace="http://example.org/different/namespace"/>
<!-- requires unique qualified names for the operations -->
<Operation name="exampleSpace:SpacedOperation"
process="x4db:/1/RestExamples/soap/DirectOutput.wrf">
<InputHandler type="SOAP-Envelope"/>
<OutputHandler type="SOAP-Envelope"/>
</Operation>
<Operation name="anotherSpace:SpacedOperation"
process="x4db:/1/RestExamples/soap/DirectOutput.wrf">
<InputHandler type="SOAP-Envelope"/>
<OutputHandler type="SOAP-Envelope"/>
</Operation>
<Operation name="UnSpacedOperation"
process="x4db:/1/RestExamples/soap/DirectOutput.wrf">
<InputHandler type="SOAP-Envelope"/>
<OutputHandler type="SOAP-Envelope"/>
</Operation>
</Service>