Skip to main content
Skip table of contents

Providing SOAP Web Services in RPC-Style

a Technical Process as SOAP web service in RPC style with the X4 BPMS,

Prerequisites:

  • Basic knowledge of the structure of SOAP web services in RPC style
  • 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/MyRPCWebservice. Normally, you have already defined this URL part as constant within the webservice configuration.

In order to deploy a Technical Process as SOAP web service in RPC style, proceed as follows

  1. 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.

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

  3. Select the WSDL mode in WSDL Mode and the target prefix in Service Prefix.

  4. Define the following configuration for each operation:

    • Specify a valid name for the operation.
      (info) SOAP web services in RPC style require explicit Localnames for the operations.
    • Link the Technical Process which handles the web service request via the X4 Server using its x4db:/ URL.
      (info) Within the Webservice Configuration Editor this is possible via drag & drop from the Repository Navigator.

    • Define the input and output handler for the SOAP web service.
      Example: Define the SOAP-Content to use the first element within the soap:Body as input and to create a soap:Body and a soap:Envelope element for the output.

    • Specify the expected input XML data structure within the element <Input>, optionally with XML schema definition.

    • Specify the output data structure to be generated within the element <Output>.

  5. Save and apply the web service configuration with Reload on Server.
    The SOAP web service in RPC style will be active instantly.


Generated WSDL Definitions in RPC 

The automatically generated corresponding WSDL definition uses the RPC style and is output in case of an HTTP GET call of the SOAP web service URI.

For the WSDL mode RPC, the X4 Server generates a WSDL definition from the service configuration. The WSDL definition is created as follows:

  • For each namespace element with an attribute schemaLocation an xsd:schema with xsd:include for the schemaLocation will be generated under wsdl:types
  • For each operation a wsdl:message will be generated whose name corresponds to the Localname of the configured operation. For each Input part a corresponding wsdl:part will be generated within this message.
  • For each operation a wsdl:message will be generated whose name corresponds to the Localname of the configured operation, supplemented by Response. For each Output part a corresponding wsdl:part will be generated within this message.
  • For each operation a wsdl:operation and thus a wsdl:portTyp will be generated. The name of the wsdl:operation is the Localname of the configured operation. The above generated messages are used as input/output message.
  • Depending on the SOAP version, corresponding wsdl:bindings are generated (exclusivelyliteral bindings). An empty SOAP action is defined at all times. In case of SOAP web services with RPC style, for each operation a targetNamespace is declared, if the operation name is a Qualifiedname (i.e. a name with colon).

Example: Configuration of a SOAP web service in 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.