Enter your keyword


How to create a custom WSDL using XSD

Sometimes it is required to create a service interface(WSDL) from the schema(XSD) file.

This post shows you how to create interface- WSDL from the given XSD using Jdeveloper 12c.

Let’s go step by step.

1) Suppose you have an Application and a project in the JDeveloper.

2) Right-click on the project and create a schema file

 3) Create the XSD structure like below

<?xml version=”1.0″ encoding=”windows-1252″ ?>
<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=”http://www.example.org”
            targetNamespace=”http://www.example.org” elementFormDefault=”qualified”>
  <xsd:element name=”request”>
      <xsd:documentation>A sample element</xsd:documentation>
        <xsd:element name=”id” type=”xsd:integer”/>
  <xsd:element name=”response”>
        <xsd:element name=”name” type=”xsd:string”/>
  <xsd:element name=”fault”>
        <xsd:element name=”error” type=”xsd:string”/>

4) Let’s create a WSDL document. Right-click on the project-> New -> WSDL Document

5) Arrange the schema and WSDL editor windows in a vertical split arrangement like as shown below. This can be achieved by dragging the test.xsd tab below

6) Let’s create the WSDL document. Drag and Drop the request element from the XSD to the Port Types window. A popup will get open. Rename the Port Type Name as shown below

7) WSDL will look like

8) Here we can see, input and output refer to both request element. To correct this, select the output node from the Port Types window and drag and drop response element from the schema onto the output element

9) Add a fault node in the Port Types. To do so, first add the Message part, Drag and Drop the fault element from the schema on the Message window and rename Message name as EmpFault

10) Right-click on the output node, Insert After Output -> fault. 

11) Enter the name as EmpFault and select tns:EmpFault from the message dropdown

12) After the above steps, your WSDL document look like this

13) Now Drag and Drop EmpDemo node from Port Types window to Binding / Partner Links Type window and click OK

Your WSDL looks like this

14) Now drag and drop the EmpDempSOAP1Binding node to the Services Window. After this step WSDL document looks like this.

WSDL has been completed. Now validate the WSDL to see the WSDL we have created is valid or not. Right, Click on the test.wsdl and click Validate WSDL

You can use this WSDL to create the services.

Some Toughts (5)

  1. Anonymous
    added on 19 May, 2017

    Thank you Ankur this post. But we can also create WSDL from XSD using WSDL builder very easily in 12c Jdeveloper. Regards Sanddy

  2. added on 5 Oct, 2018

    Thanks Ankur.

  3. added on 25 Jun, 2019

    Awesome post. Thank you so much.
    ios app Devlopment company in chennai

  4. added on 15 Jul, 2019

    Story of this blog is well written. The writer kept in consideration the grammar very well. Level of English also very well. Lot many new words has been used while writing content of this blog. cursus seo

  5. added on 18 Jul, 2019

    Thanks for sharingcustom erp solutions

Leave a Reply

Your email address will not be published.