Example Number 1.6

Example Name: HelloWorld.wsdl

Description: Web service example of Hello World, created by HelloWorld.cfc

Language: WSDL

Version: 1.0.0

Code:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://frdg.oreilly.com" xmlns:impl="http://frdg.oreilly.com" xmlns:intf="http://frdg.oreilly.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://rpc.xml.coldfusion"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="CFCInvocationException"><sequence/></complexType></schema></wsdl:types>
  <wsdl:message name="sayHelloRequest">
  </wsdl:message>
  <wsdl:message name="sayHelloResponse">
    <wsdl:part name="sayHelloReturn" type="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="CFCInvocationException">
    <wsdl:part name="fault" type="tns1:CFCInvocationException"/>
  </wsdl:message>
  <wsdl:portType name="helloworld">
    <wsdl:operation name="sayHello">
      <wsdl:input name="sayHelloRequest" message="impl:sayHelloRequest"/>
      <wsdl:output name="sayHelloResponse" message="impl:sayHelloResponse"/>
      <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="helloworld.cfcSoapBinding" type="impl:helloworld">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="sayHello">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="sayHelloRequest">
        <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://frdg.oreilly.com"/>
      </wsdl:input>
      <wsdl:output name="sayHelloResponse">
        <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://frdg.oreilly.com"/>
      </wsdl:output>
      <wsdl:fault name="CFCInvocationException">
        <wsdlsoap:fault use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://frdg.oreilly.com"/>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="helloworldService">
    <wsdl:port name="helloworld.cfc" binding="impl:helloworld.cfcSoapBinding">
      <wsdlsoap:address location="http://www.flash-remoting.com/com/oreilly/frdg/helloworld.cfc"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Download code text

Download chapter example files