Create WSDL using Eclipse

In this tutorial, we will learn to create a simple WSDL using Eclipse. This WSDL portrays that it will take two binary numbers in request and provide their summation in response.

Technologies used –
a. Eclipse IDE for Java EE developer (Mars)
b. Preinstalled Maven with Eclipse Mars


  1. Right click on the folder where you want to create WSDL and go to New > Other > Web Services > WSDL File



2. Click on Next and give a name to the WSDL. Then click Next. Change the target namespace value to your desired value. Leave other options as it is.

Target Namespace Choice

3. Click on Finish.

WSDL Design View

4. Change the address location of the Service (i.e. BinaryAdditionService) and operation name (i.e. NewOperation) to your choice.

tnsOperationName Change


5.  Double click on the rightmost arrow across input. A new tab should appear beside WSDL design screen.

RequestMessage Screen

6. If you want, change the request message (i.e. binaryAdd) name.

WSDL Request Message Name change

7. Change the request message parameter name (i.e. in) in binaryAddType. Right  click on request message parameter and add a parameter above or below the current parameter. Additionally, you can also change the type of the input parameter(s).

Add parameters

8.  After modifying and adding parameters, save the changes.

WSDL Modified operation parameters

9 . In the above case, we added the type of “a” as string, which is a predefined type in schema. If you want to add custom type, you should right click on the parameter and select “Set Type” and click on “New …”.

WSDL Complex Type

10. Once you click ok and double click on “binaryAddRequestType”, you should see the newly created type separated. Right clicking on it will give you tons of different options to proceed further.


11. If you want to add more operations, go back to the WSDL design view and right click on the operation and click on “Add Operation” and repeat the above steps.

WSDL add more operations


12. If the directions are followed properly, a sample WSDL as below will be created.


<wsdl:definitions xmlns:soap="" xmlns:tns="" xmlns:wsdl="" xmlns:xsd="" name="BinaryAdditionService" targetNamespace="">
        <xsd:schema targetNamespace="">
            <xsd:element name="binaryAddRequest">
                        <xsd:element name="a" type="xsd:string"></xsd:element>
                        <xsd:element name="b" type="xsd:string"></xsd:element>
            <xsd:element name="binaryAddResponse">
                        <xsd:element name="out" type="xsd:string"></xsd:element>
    <wsdl:message name="binaryAddRequest">
        <wsdl:part element="tns:binaryAddRequest" name="parameters"></wsdl:part>
    <wsdl:message name="binaryAddResponse">
        <wsdl:part element="tns:binaryAddResponse" name="parameters"></wsdl:part>
    <wsdl:portType name="BinaryAdditionService">
        <wsdl:operation name="binaryAdd">
            <wsdl:input message="tns:binaryAddRequest"></wsdl:input>
            <wsdl:output message="tns:binaryAddResponse"></wsdl:output>
    <wsdl:binding name="BinaryAdditionServiceSOAP" type="tns:BinaryAdditionService">
        <soap:binding style="document" transport=""></soap:binding>
        <wsdl:operation name="binaryAdd">
            <soap:operation soapAction=""></soap:operation>
                <soap:body use="literal"></soap:body>
                <soap:body use="literal"></soap:body>
    <wsdl:service name="BinaryAdditionService">
        <wsdl:port binding="tns:BinaryAdditionServiceSOAP" name="BinaryAdditionServiceSOAP">
            <soap:address location=""></soap:address>


Leave a Reply

Back to Top
%d bloggers like this: