Listing 1: Part in response message to indicate version number (tool used - Apache
 AXIS)

<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/SalesProcessor">
	<wsdl:types>
<schema targetNamespace="urn:SalesService">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Sales_Version">
<sequence>
<element name="customerName" nillable="true" type="xsd:string"/>
<element name="ussales" type="xsd:int"/>
<element name="versionChange" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getUSSalesResponse">
<wsdl:part name="getUSSalesReturn" type="tns1:Sales_Version"/>
</wsdl:message>

Listing 2: SOAP response generated from the aforementioned service (tool used -
 Apache Axis)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:getUSSalesResponse
   soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns1="SalesProcessor">
   <ns1:getUSSalesReturn href="#id0"/>
  </ns1:getUSSalesResponse>
  <multiRef id="id0" soapenc:root="0"
   soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="ns2:Sales_Version" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	 xmlns:ns2="urn:SalesService">
   <customerName xsi:type="xsd:string">krishnendu</customerName>
   <ussales xsi:type="xsd:int">100000</ussales>
   <versionChange xsi:type="xsd:string">changed_bugzilla12</versionChange>
  </multiRef>
 </soapenv:Body>
</soapenv:Envelope>

Listing 3: SOAP message generated by the client to indicate the version of the
 service required (tool used - Apache Axis)

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header><ns1:Version
  xmlns:ns1="http://xml-Client.books/">Version1</ns1:Version> </soapenv:Header>
 <soapenv:Body><ns2:getDetail
  xmlns:ns2="EnvelopeService"><ISBN>0586061991</ISBN></ns2:getDetail> </soapenv:Body>
</soapenv:Envelope>

Listing 4: SOAP message generated by the service indicating the latest version
 available (tool used - Apache Axis)

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
<ns1:Recent_Version
 xmlns:ns1="http://xml-Client.books/">Version5</ns1:Recent_Version> </soapenv:Header>
 <soapenv:Body><ns2:getDetail xmlns:ns2="EnvelopeService"><BookName>Robots of the
  dawn</BookName></ns2:getDetail> </soapenv:Body>
</soapenv:Envelope>

Listing 5: Sample WSDL for retrieving corporate sales

<?xml version="1.0" encoding="UTF-8"?>

<definitions  name ="CheckCorporateSales" 
  targetNamespace="http://www.mydomain.com/webservices/salesreport/CorporateSales.wsdl"
  xmlns:tns=" http://www.mydomain.com/webservices/salesreport/CorporateSales.wsdl "
  xmlns:soap=" http://www.mydomain.com/webservices/salesreport/CorporateSales.wsdl"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://schemas.xmlsoap.org/wsdl/">

  <message name="LineOfBusinessInput">
    <part name="lob_id" type="xsd:integer"/>
  </message>
  <message name="SalesResponse">
    <part name="yearlySales" type="xsd:float"/>
  </message>

  <portType name="CorporateSalesPortType">
    <operation name="GetLobSales">
      <input message="tns:LineOfBusinessInput"/>
      <output message="tns:SalesResponse"/>
    </operation>
  </portType>

  <binding name="CorporateSalesBinding" type="tns:CorporateSalesPortType">
    <soap:binding style="document" 
      transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetLobSales">
      <soap:operation soapAction="getLobSales"/>
      <input>
        <soap:body use="encoded" 
          namespace="www.mydomain.com/salesreport/CorporateSales" 
          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body use="encoded" 
          namespace=" www.mydomain.com/salesreport/CorporateSales "  
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
  </binding>

  <service name="CorporateSalesService" >
    <documentation>
      Returns the Corporate Sales on an annual basis for a specific Line of Business
    </documentation>
    <port name="CorporateSalesPort" binding="tns:CorporateSalesBinding">
      <soap:address location="http://sample_server:8090/dayofweek/CorporateSales"/>
    </port>
  </service>
</definitions>

Listing 6: Complex Type used for version control

<schema targetNamespace="http://mydomain.com/services/getCorporateSales"
 xmlns:qc="http://mydomain.com/services/salesCommon">
	<complexType name="VersionDetails">
  	<attribute name="version_id" type="int" use="required"/>
  	<attribute name="version_details" type="string" use="required"/>
  	<attribute name="version_date" type="string" use="required"/>
  	<attribute name="version_status" type="string" use="required"/>

	</complexType>
</schema>


Listing 7: Use of a custom ?implementation tag in WS-Addressing ?header to convey
 implementation change

<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
 xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401
 -wss-wssecurity-secext-1.0.xsd"
 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401
 -wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      <wsa:Action>soap.tcp://hydhtc29925:3119/MyServiceReceive</wsa:Action>
      <wsa:From>
<wsa:Address>http://localhost/AddressingService20/MyService.ashx</wsa:Address>
 <wsa:ReferenceProperties>
<Implementation>The Implementation has been changed. The new interest calculation method
 is P*T*9/100 instead of P*T*8.2/100 </Implementation>
        </wsa:ReferenceProperties>
      </wsa:From>
      <wsa:MessageID>uuid:cff4c9ec-f257-4790-a890-86ae7821bb9b</wsa:MessageID>
      <wsa:ReplyTo>
<wsa:Address>soap.tcp://hydhtc29925:3119/MyServiceReceive</wsa:Address>
      </wsa:ReplyTo>
<wsa:To>soap.tcp://hydhtc29925:3119/MyServiceReceive</wsa:To>
</soap:Header>

  </soap:Envelope>


Listing 8: Use of a custom interface tag in a WS-Addressing header to convey
 interface change

<soap:Header>
<wsa:Action>soap.tcp://hydhtc29925:3119/MyServiceReceive</wsa:Action>
      <wsa:From>
<wsa:Address>http://localhost/AddressingService20/MyService.ashx</wsa:Address>
        <wsa:ReferenceProperties>
          <Interface>The interface has been changed. For future usage , please refer to
		   the WSDL file or enter integer values</Interface >
        </wsa:ReferenceProperties>
      </wsa:From>
..
</soap:Header>