Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Part 4

Web Services Description Language (WSDL)

Return to article


Listing 1: The CurrencyExchangeService.wsdl file

<?xml version = "1.0"?>
<definitions name = "CurrencyExchangeService"
 targetNamespace = "http://www.xmethods.net/sd/CurrencyExchangeService.wsdl"
 xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
 xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns = "http://schemas.xmlsoap.org/wsdl/">
 <message name = "getRateRequest">
 <part name = "country1" type = "xsd:string"/>
 <part name = "country2" type = "xsd:string"/>
 </message>
 <message name = "getRateResponse">
 <part name = "return" type = "xsd:float"/>
 </message>
 <portType name = "CurrencyExchangePortType">
 <operation name = "getRate">
 <input message = "getRateRequest" name = "getRate"/>
 <output message = "getRateResponse" name = "getRateResponse"/>
 </operation>
 </portType>
 <binding name = "CurrencyExchangeBinding" type = "CurrencyExchangePortType">
 <soap:binding style = "rpc" transport = "http://schemas.xmlsoap.org/soap/http"/>
 <operation name = "getRate">
 <soap:operation soapAction=""/>
 <input>
 <soap:body use = "encoded" namespace = "urn:xmethods-CurrencyExchange"
 encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"/>
 </input>
 <output>
 <soap:body use = "encoded" namespace = "urn:xmethods-CurrencyExchange"
 encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"/>
 </output>
 </operation>
 </binding>
 <service name = "CurrencyExchangeService">
 <documentation>Returns the exchange rate between the two currencies</documentation>
 <port name = "CurrencyExchangePort" binding = "CurrencyExchangeBinding">
 <soap:address location = "http://services.xmethods.net:80/soap"/>
 </port>
</service>
</definitions>

Return to article