Click Here

Saturday 19 May 2018

WSDL Creation from Scratch using jDev12c (version-12.2.1.0)

Hello friends,

In this blog, I will be showing the creation of wsdl file from Scratch using jDev12c:-

Step 1.  Open your 12c jDeveloper and you will see a start page and an application tab, you will be having an option to create a New Application and Open Existing Application.

















Step 2.  Open any application or you can create a new one if you don’t have. Here, I am creating a New Application, by clicking on New Application














Step 3.  Search for the service bus application and click on ok, as inside this we will create the XSD and WSDL, you can create other application also.


















Step 4.  Give your Application Name and also select the Directory for the Application and click on finish.



















Step 5. Next, We will be creating the project inside the application.
right click on the application-->New-->select Project

























Step 6.  Now we will be creating the service bus project(you can create any project). Select service bus project and click ok.


















Step 7.  Provide your project name and click on finish.



Step 8.  Next, We will create the folder for xsd/wsdl.
Right click on project-->Gallery-->folder.








































Provide folder name as XSD











Similarly, for WSDL











Step 9.  Next, we will be creating the XSD.
right click on XSD-->New-->XML Schema
























Provide xsd name, select the directory and TargetNamespace details.

















Step 10.  We have generated the basic structure of the xsd file, which got generated by jdeveloper.









Step 11.  Now as our requirement is to have EmployeeRequest as Input and EmployeeResponse as Output, we will update the generated xsd. 
Changed the Name ElementName--> EmployeeRequest 
right click on the EmployeeRequest-->Insert After element-->element, to get the EmployeeResponse element.















right click on EmployeeRequest-->Insert Inside element-->sequence














right click on sequence-->Insert Inside sequence-->element
Similarly, you can create sequence & multiple elements inside EmployeeResponse.














Update the elements name as per the requirement.

Final xsd in design view.
















Final xsd in source view.



















Step11.  Next we use the above created xsd file for the creation of wsdl file by using wsdl Builder.
right click on the wsdl folder-->New--> WSDL(builder)

























You will get the below create WSDL screen, update all the details:-


File Name:- Provide Name of your wsdl file.
Directory:- Where you want to keep your wsdl file.
Namespace:- Provide xsd namespace.
Binding: Provide binding name.
Create Port Type:- If you don't have any port and want to create new.
  • Port Type: provide Port Type name.
  • Operation: provide Operation name.

Select Port Type:- Use existing port.
Interface Type:- Select One-Way, if only one way request you have, (in this case we only need to provide request details) else select synchronous, if you have 2-way request/response, in this case we need to provide both request and response elements details.

In our case, we have both request and response, so I have selected the Interface Type as Synshronous Interface 

























Now, as we have mentioned all the above details, except the Input/Output/Fault part.
Next, we will configure the Input/Output elements only, as we don't need fault.

click on + icon, as shown in the Input.























Give message part name and select the glass icon(as shown) to select the dataType for Input element.
















After selection, it will look like this:-














Similarly, for the Output elements configuration:-















After providing Input/Output details, click on ok.
























Our WSDL file design view:-
















Our wsdl file in source view:-


















NOTE:-Here we have created the wsdl by importing the xsd, so lets validate the wsdl by calling the xsd.

Move the cursor over the schemalocation path and click over it with ctrl button(ctrl+click), you should be able to open the xsd, if everything is correct.

Similarly, for request and response variable







Ctrl+click over the “inp1:EmployeeRequest” you should be able to get the below screen.


Similarly for response and other elements.














This is how you will create the xsd-->WSDL-->Validate.

Hope, this might help you.
please let me know in case you need further details.

No comments:

Post a Comment