I created an OSB Service using a WSDL and selected a Binding. Now, when my client is trying to call the service using the WSDL I provided, they are getting errors. Also, the binding name in the WSDL that I provided and the WSDL that they are pulling from the URL is different. What is happening?
As per the OSB documentation,
When you create a service based on a WSDL resource, you must base the service on a WSDL port or on a WSDL binding:
- When you create a new service based on a binding in a WSDL resource, you are choosing the protocol and data format defined in the selected element in the WSDL resource.
- When you create a new service based on a port in a WSDL resource, you are choosing the binding and the network address defined in the element.
When creating or modifying the service, you can change the transport, but you cannot override the data format.
The port and binding definitions from the original WSDL resource are modified in the effective WSDL depending on a number of factors, as described below.
If the service is based on a binding:
- If the service is generated from binding Y in the WSDL resource, the effective WSDL defines a new service and port (QSService and QSPort). None of the ports defined in the WSDL resource are included in the effective WSDL.
- There may be multiple ports in that WSDL associated with that binding. Each port can use a different URL. Therefore, the effective WSDL uses the binding but generates an artificial port from the configuration on the service for that binding. All other ports will be removed.”
The bold part is what is causing issue. It is always better to use port instead of binding as OSB modifies the effective WSDL as explained above.
来源:https://stackoverflow.com/questions/20669742/how-wsdl-is-used-in-oracle-service-bus