Skip to main content

Creating the WSDL

The below WSDL defines a single operation, doubleit supported by this web service endpoint. The soap:address location below is used by the SOAP client but ignored by the web service provider. The WSP generates the endpoint address based on the deployment configuration information below and will update the soap:address value when viewing the WSDL from a browser. Here, we're configuring the soap:address value to what it will be using the configuration information in the next steps. It's presently configured to the address for Talend ESB OSGi deployment, but for Tomcat deployment will need to be changed to http://localhost:8080/doubleit/services/doubleit due to the different default endpoint location for servlet-hosted services.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="DoubleIt"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:di="http://www.example.org/schema/DoubleIt"
    xmlns:tns="http://www.example.org/contract/DoubleIt"
    targetNamespace="http://www.example.org/contract/DoubleIt">
    <wsdl:types>
        <xsd:schema targetNamespace="http://www.example.org/schema/DoubleIt">
            <xsd:element name="DoubleIt">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="numberToDouble"
                            type="xsd:int" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="DoubleItResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="doubledNumber"
                            type="xsd:int" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="DoubleItRequest">
        <wsdl:part element="di:DoubleIt" name="parameters" />
    </wsdl:message>
    <wsdl:message name="DoubleItResponse">
        <wsdl:part element="di:DoubleItResponse" name="parameters" />
    </wsdl:message>
    <wsdl:portType name="DoubleItPortType">
        <wsdl:operation name="DoubleIt">
            <wsdl:input message="tns:DoubleItRequest" />
            <wsdl:output message="tns:DoubleItResponse" />
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DoubleItBinding" type="tns:DoubleItPortType">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="DoubleIt">
            <soap:operation soapAction="" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DoubleItService">
        <wsdl:port name="DoubleItPort" binding="tns:DoubleItBinding">
            <soap:address
                location="http://localhost:8040/services/doubleit" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!