Ivo
Ivo

Reputation: 1228

WSO2 ESB alters the wsdl

I have a backend service which I configure as a proxy service in WSO2 ESB.

The ESB exposes slightly different wsdl, which is also valid and works as expected.

The problem is I can't use my old stubs with the ESB wsdl because of the changed structure. I want to create the service in such a way that the wsdl from ESB is EXACTLY the same as my endpoint service.

Is such approch poissible or do I need to generate again the stubs (this would require a lot of effort in my case)?

EDIT: The difference in the WSDL between endpoint and esb wsdl 1. For example my endpoint has following tags

<xs:element name=", - Endpoint
<xsd:element name=  - ESB

2. Another difference is:

<wsdl:service name="CasesServiceService"> - Endpoint
<wsdl:service name="CasesService"> - ESB

3. Port names:

<wsdl:port name="CasesServiceHttpSoap11Endpoint" binding="tns:CasesServiceSoap11Binding">
<wsdl:port binding="tns:CasesServiceServiceSoapBinding" name="CasesServicePort">

Upvotes: 1

Views: 1672

Answers (1)

mpontes
mpontes

Reputation: 3004

In order to make WSO2 ESB keep the same WSDL contract with the exact same services / ports names, you can edit the Apache Synapse configuration file for your proxy service directly. Just click on "Source View" in the WSO2 ESB interface and add the following parameters to the <proxy> node:

<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>

This will make it use the original WSDL and modify only the port address so it points to the bus.

The relevant documentation is here.

Upvotes: 4

Related Questions