Skip to main content
Skip table of contents

Deploying SOAP Webservices in the RPC Style

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

  1. Create a new service entry of the SOAP type under the desired URL resource (defined, e.g. by a constant URL part) using the Add SOAP Service entry in the context menu.

  2. Define the SOAP version (either SOAP 1.1, SOAP 1.2, or support for both standards).

  3. Select WSDL Mode in WSDL Mode and Target Prefix in Service Prefix.

  4. Define the following configuration for each operation:

    1. Define a valid name for the operation.

    2. Link the Technical Process that processes the webservice request through the X4 Server using the associated x4db:/ URL.

    3. Define an input handler and output handler for the SOAP webservice.
      Example: Define the SOAP-Content to use the first element in the soap:Body as input and to create a soap:Body and soap:Envelope element during output.

    4. Define the expected input XML structure within the <Input> element, optionally, including an XML schema definition.

    5. Define the data structure you want to output in the <Output> element.

Notes:

  • RPC-style SOAP webservices require unique localnames for the operations.

  • In the Web Service Configuration Editor, you can link Technical Processes from the Repository Navigator via drag and drop.

  1. Click image-20250128-150726.pngSave 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 schemaLocation attribute, a xsd:schema is created with xsd:include for the schemaLocation under wsdl:types.

  • A wsdl:message is created for each operation whose name matches the Localname of the configured operation. In this message, a corresponding wsdl:part is created for each Input part.

  • A wsdl:message is created for each operation whose name matches the Localname of the configured operation, including Response . In this message, a corresponding wsdl:part is created for each Output part.

  • A wsdl:operation is created for each operation. Thus, a wsdl:portTyp is created. The wsdl:operation name 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 (only literal bindings). An empty SOAP action is always defined. For SOAP webservices with RPC style, atargetNamespace is 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

XML
<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> 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.