# We start with opening the JDeveloper 11g
# Create an application - "MyWSDLApplication" using the Generic Application template.
# Name the project as "MyWSDLProject" and select "Web Services" as the project technologies.
# The Application Navigator view should look like this
# Lets create the schema file first. For this, right click on the project and from the context menu, select New. In the Gallery that opens, select General -> XML -> XML Schema
# Name the schema as Employee.xsd
# The schema editor window opens as shown in the figure below.
# We will be adding two elements - EmpId and EmpName here. Right click on the root schema element and from the context menu, select Insert inside schema -> element
# Once the two elements are specified, we provide them types by right click on the element and from context menu - select Set Type as shown below
# As depicted in the figure below, EmpId type is taken as long while EmpName type is string.
# With the schema defined, we move onto creating the WSDL document. Right click on the project and from context Menu, select New. In the gallery, choose Business Tier -> Web Services -> WSDL Document. Press OK button.
# Name WSDL document as EmployeeWSDL
# Once OK button is presses, the JDeveloper editor view would look like this
# Arrange the schema and WSDL editor windows in a vertical split arrangement like as shown below. This can be achieved by dragging the Employee.xsd tab below.
# Now, we begin creating the WSDL document. Drag and Drop the EmpId element (input for our case) onto the Port Type window. This opens the 'Create Port Type' window. Lets name it as EmployeeDetail.
# We have a problem here as can be seen from the image. The output is shown as EmpId while we expect it to be EmpName.
# To correct this, we select the output node in the Port Types window. Drag and Drop EmpName element from the schema onto this node. With this, the WSDL document appears like
# Next we change the name of the messages to EmployeeRequestMessage and EmployeeResponseMessage using the property inspector window.
# With the changes in message name, we need to remap these to the operation messages as else these appear with errorneous icon like we have output icon below. To correct this, drag and drop the relevant messages onto the correct nodes. Example : EmployeeRequestMessage is dropped onto the input node of EmpIdOperation and EmployeeResponseMessage is dropped onto the output of EmpIdOperation
# Here, we make the operation name more meaningful using property Inspector - getEmployeeNameOperation.
# Now, we drag and drop the EmployeeDetail node onto the Bindings/Partner Link Types window. In the Create Binding window, we check the SOAP12.
# Next, drag and drop the root node from the Bindings window onto the Services window. This results in the view as shown below
# At this point, the structure window should look like this. This completes our WSDL document creation process.
It is excellent. I came from a WPS ( websphere process server background ) and was looking for something like this as a beginner to understand how we can create WSDL in Oracle SOA suit.
ReplyDeleteI am using Jdeveloper for the first time.It is really nice article.Thanks for uploading.
ReplyDeleteYa this article is very nice and usefull. can you upload the next article "create Web Service using this WSDL document".
ReplyDeleteHi This was very helpful for the beginners who comes to SOA and Web service development. Thanks a lot.
ReplyDeleteHi Thanks. It helps me a lot know how to create WSDL based on XSD. Waiting eagerly for next topic "create Web Service using this WSDL document".
ReplyDeleteAwesome! Thank you.
ReplyDeleteHi, how can we create very very complex xsd in SOA like using import schemas, include schemas.
ReplyDeleteHi, how can we create very very complex xsd in SOA like using import schemas, include schemas.
ReplyDeleteEx:
Thank's about this share
ReplyDeleteThanks It's helpful
ReplyDeleteThanks, It's very helpful
ReplyDelete