Adobe ColdFusion 8

Handling return values from a web service

Web service operations often return information back to your application. You can determine the name and data type of returned information by examining subelements of the message and operation elements in the WSDL file.

The following example shows a portion of the WSDL file for the TemperatureService web service:

<message name="getTempRequest">
    <part name="zipcode" type="xsd:string"/>
</message>
<message name="getTempResponse">
    <part name="return" type="xsd:float"/>
</message>
<portType name="TemperaturePortType">
    <operation name="getTemp">
        <input message="tns:getTempRequest"/>
        <output message="tns:getTempResponse"/>
    </operation>
</portType> 

The operation getTemp returns a message of type getTempResponse. The message statement in the WSDL file defines the getTempResponse message as containing a single string parameter named return.