Interface example

The schema for the XML messages that are expected by the provider application are required as the basis for the request elements in the WSDL file that is used as the service interface.

For example, the provider application might take messages with an action and those messages contain the item upon which that action must be taken. The following example contains an action, SaveItem, which becomes the service operation:

	<?xml version="1.0" encoding="UTF-8"?>
	<schema targetNamespace="http://ServiceFacade_RR" elementFormDefault="qualified" 
	xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://ServiceFacade_RR">
	<complexType name="Item">
	<sequence> 
	<element name="Name" type="string"></element>
	<element name="Code" type="string"></element>
	<element name="Description" type="string"></element>
	<element name="Location" type="string"></element> 
	</sequence> 
	</complexType> 
	<element name="SaveItem" type="tns:SaveItem"></element> 
	<complexType name="SaveItem"> 
	<sequence> 
	<element name="Item" type="tns:Item"></element>
	</sequence> 
	</complexType> 
	</schema>
	

The associated WSDL must define an input message with an element that corresponds to the top level element that is required by the provider schema. The following fragment corresponds to the preceding provider schema:

	<wsdl:message name="SaveItemRequestMsg"> <wsdl:part name="SaveItemRequest" 
	element="tns:SaveItem"></wsdl:part> </wsdl:message> 

acknowledgment

The acknowledgment is fixed by the pattern and applies to all pattern instances but name spaces might vary.

The schema for the acknowledgment (with pattern specific name spaces indicated) is:

	<?xml version="1.0" encoding="UTF-8"?> 
	<schema targetNamespace="<instance specific>" 
	elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" 
	xmlns:tns="http://<instance specific>" "> 
	<complexType name="Ack"> 
	<sequence> 
	<element name="acknowledgment" type="string"></element> 
	</sequence> 
	</complexType> 
	<element name="Response" type="tns:Ack">
	</element> 
	</schema>

The WSDL entry defining the response message must reference the following response:

	<wsdl:message name="SaveItemResponseMsg"> <wsdl:part name="Response" 
	element="tns:Response"></wsdl:part> </wsdl:message>

Back to Service Facade to WebSphere MQ: one-way with acknowledgment pattern specification