Tuesday, January 24, 2012

My WSDL Cheat Sheet



Service -> ‘Java Class’

Operation -> ‘Java Function’ The Operation defines the name of the Operation and ties the request response messages together.

Port -> A service is assessable on a Port.  A Port has a unique name space and binding attribute. The Port specifies the service address. Web service can be exposed as SOAP or HTTP. The same web service can also be exposed by multiple Ports.
SOAP example:
<port name='WeatherSoapPort' binding='wsdlns:WeatherSoapBinding' >
<soap:address   location='http://localhost/demos/wsdl/devxpert/weatherservice.asp' />
</port>

HTTP example:
<port name='WeatherSoapPort' binding='wsdlns:WeatherSoapBinding' >
<http:address location="http://localhost/demos/wsdl/devxpert/weatherGET.asp"/
</port>

Message -> Normally two messages required i.e. input message and output message. Messages contain zero or more <part> elements. Sample messages below
<message name='Weather.GetTemperature'>
    <part name='zipcode' type='xsd:string'/>
    <part name='celsius' type='xsd:boolean'/>
 </message>

 <message name='Weather.GetTemperatureResponse'>
    <part name='Result' type='xsd:float'/>
 </message>rt name='WeatherSoapPort'

Binding -> ‘Ties it all together’ - specifies binding(s) of each operation in the PortTypes section

No comments:

Followers