The following explains how to deploy a Technical Process as a SOAP webservice in the RPC style with the X4 BPMS, which also automatically issues a WSDL definition created from the service configuration.
Prerequisites:
-
You have basic knowledge of the structure of SOAP webservices in the RPC style.
-
You have created a Technical Process for each webservice operation, which processes the respective incoming request. The Technical Process is referenced via its
x4db:/-URL. -
You have a partial URL, via which the SOAP webservice should be accessible via HTTP, e.g. via
http://localhost:8080/X4/httpstarter/ReST/MyRPCWebservice. You have already typically defined the corresponding URL part as a constant within the websrvice configuration.
Deploying Technical Processes as SOAP webservices in the RPC style
-
Create a new service entry of the
SOAPtype under the desired URL resource (defined, e.g. by a constant URL part) using the Add SOAP Service entry in the context menu. -
Define the SOAP version (either SOAP 1.1, SOAP 1.2, or support for both standards).
-
Select
WSDL Modein WSDL Mode andTarget Prefixin Service Prefix. -
Define the following configuration for each operation:
-
Define a valid name for the operation.
-
Link the Technical Process that processes the webservice request through the X4 Server using the associated
x4db:/ URL. -
Define an input handler and output handler for the SOAP webservice.
Example: Define theSOAP-Contentto use the first element in thesoap:Bodyas input and to create asoap:Bodyandsoap:Envelopeelement during output. -
Define the expected input XML structure within the
<Input>element, optionally, including an XML schema definition. -
Define the data structure you want to output in the
<Output>element.
-
Notes:
-
RPC-style SOAP webservices require unique
localnamesfor the operations. -
In the Web Service Configuration Editor, you can link Technical Processes from the Repository Navigator via drag and drop.
-
Click
Save and apply the webservice configuration by clicking Reload on Server.
✅ The RPC-style SOAP webservice is now active.
Generated WSDL definitions in the RPC
The auto-generated associated WSDL definition uses the RPC style and is issued when the SOAP webservice URIs are called via HTTP GET.
For the RPC WSDL mode, the X4 Server creates a WSDL definition from the service configuration. The WSDL definition is created as follows:
-
For each namespace element with a
schemaLocationattribute, axsd:schemais created withxsd:includefor theschemaLocationunderwsdl:types. -
A
wsdl:messageis created for each operation whose name matches the Localname of the configured operation. In this message, a correspondingwsdl:partis created for eachInputpart. -
A
wsdl:messageis created for each operation whose name matches the Localname of the configured operation, includingResponse. In this message, a correspondingwsdl:partis created for each Output part. -
A
wsdl:operationis created for each operation. Thus, awsdl:portTypis created. Thewsdl:operationname is theLocalname of the configured operation. The messages created above are used as the input/output message. -
Depending on the SOAP version, corresponding
wsdl:bindings are created (onlyliteralbindings). An empty SOAP action is always defined. For SOAP webservices with RPC style, atargetNamespaceis declared for each operation if the operation name is a Qualifiedname (i.e., a name with a colon).
Example: Configuration of a SOAP webservice in the RPC mode
<Service type="Soap">
<SoapVersion>
<SOAP11/>
<SOAP12/>
</SoapVersion>
<Wsdl name="NameOfTheRpcService" targetPrefix="service" mode="RPC"/>
<Namespace prefix="service" namespace="http://example.org/serviceSpace"/>
<Namespace prefix="exampleSpace" namespace="http://example.org/namespace"
schemaLocation="http://localhost:8080/X4/httpstarter/ReST/soapService/xsd/namespace.xsd"/>
<Namespace prefix="anotherSpace" namespace="http://example.org/different/namespace"
schemaLocation="http://localhost:8080/X4/httpstarter/ReST/soapService/xsd/differentNamespace.xsd"/>
<!-- RPC requires unique localnames for the operations -->
<Operation name="exampleSpace:RpcOp1"
process="x4db:/1/RestExamples/soap/DirectOutput.wrf">
<InputHandler type="SOAP-Envelope"/>
<OutputHandler type="SOAP-Envelope"/>
<Input>
<Part name="firstPart" element="exampleSpace:Operation1"/>
</Input>
<Output>
<Part name="firstPart" element="exampleSpace:Operation1"/>
</Output>
</Operation>
<Operation name="anotherSpace:RpcOp2"
process="x4db:/1/RestExamples/soap/DirectOutput.wrf">
<InputHandler type="SOAP-Envelope"/>
<OutputHandler type="SOAP-Envelope"/>
<Input>
<Part name="firstPart" type="anotherSpace:SomeType"/>
</Input>
<Output>
<Part name="Output" type="anotherSpace:SomeType"/>
</Output>
</Operation>
<Operation name="RpcOp3"
process="x4db:/1/RestExamples/soap/DirectOutput.wrf">
<InputHandler type="SOAP-Envelope"/>
<OutputHandler type="SOAP-Envelope"/>
<Input>
<Part name="Value" type="xsd:integer"/>
</Input>
<Output>
<Part name="Value" type="xsd:String"/>
</Output>
</Operation>
</Service>