Tuesday, October 15, 2019

12c OSB - create a WSDL based on a XSD and proxy service on the created WSDL.

Here I will show you how to create a synchronous WSDL based on a request-response schema and then to create a proxy service based on the created WSDL.

First create an application with the service bus project(if application is not created).



 Create a folder structure to hold all the services and resources.


I will use the following schema to create the WSDL.
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.emp.test"
            targetNamespace="http://www.emp.test" elementFormDefault="qualified">
        <xsd:element name="Request">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="EmployeeName" type="xsd:string"/>
              <xsd:element name="EmployeeId" type="xsd:string"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="Response">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="HellowOutput" type="xsd:string"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
</xsd:schema>

Right click on WSDL folder⇾New⇾WSDL(Builder)

Provide the WSDL Name, operation, binding and portType names and chose the Interface type.
Setup Input and output using the XSD.


Same way add the message part for Output.


WSDL is ready.Now create the Proxy service.
Choose WSDL Definition and browse the WSDL

Keep the Generate pipeline checked in to create the pipeline with the Proxy.




No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...