Server Side

This section will not go into details about the Web Service server implementation. This is because the focus is on the client side but most notably because the promise of the Web Service architecture is that the implementation details on the server side should not be relevant when developing the client. Nevertheless, the server side was developed as a Java Servlet running in Tomcat. No Web Services toolkits were used to implement the servlet.

The server is available at the address http://194.137.80.38/CapitalService/Capitals and its WSDL definition is included below:

<definitions name="capitals"
   targetNamespace="urn:nokia:example:capitals:2005-01">
  <types>
    <schema targetNamespace="urn:nokia:example:capitals:2005-01">
      <element name="request" type="string"/>
      <element name="response" type="string"/>
    </schema>
  </types>

  <message name="capitalRequest">
    <part name="nation" element="tns:request"/>
  </message>

  <message name="capitalResponse">
    <part name="capital" element="tns:response"/>
  </message>

  <portType name="capitalPortType">
    <operation name="getCapital">
      <input message="tns:capitalRequest"/>
      <output message="tns:capitalResponse"/>
    </operation>
  </portType>

  <binding name="capitalBinding" type="tns:capitalPortType">
    <operation name="getCapital">
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
        <soap:operation soapAction=""/>
    </operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
      style="document"/>
  </binding>

  <service name="capitals">
    <documentation>Simple capital query service</documentation>
    <port name="capitalPort" binding="tns:capitalBinding">
      <soap:address
        location="http://194.137.80.38:80/CapitalService/Capitals"/>
    </port>
  </service>

</definitions>