Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between ?wsdl and ?singleWsdl parameters

My messaging provider gives me two different kinds of WSDLs to use.

http://my.amazonaws.com:8000/webservice/?wsdl http://my.amazonaws.com:8000/webservice/?singleWsdl 

The first one is an embedded WSDL. Can NOT use it to generate WSDL2java packages and can NOT use JAX-WS to create a connection.

The second one is a single WSDL. It can generate Java packages with CXF 3.0's WSDL2java and can use JAX-WS to create a connection. It works very well.

Please let me know what is the difference between these two kinds of WSDLs.

like image 394
yw173 Avatar asked Aug 13 '14 03:08

yw173


People also ask

What is difference between WSDL and XSD?

XSD is to validate the document, and contains metadata about the XML whereas WSDL is to describe the webservice location and operations.

Can a WSDL have multiple services?

A WSDL can contain any number of services (the bindings). A binding exposes an interface for the specified protocol. In the example above, the WSDL file exposes two bindings: one for SOAP 1.1 (“CurrencyConverterSoap”) and one for SOAP 1.2 (“CurrencyConverterSoap12”).

What is the difference between endpoint and WSDL?

A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings.


1 Answers

Without knowing what those links return we can only guess, but here are some details that might help you....

Suffixing the web service endpoint with ?wsdl get's you a WSDL file. The WSDL can be generated by the framework at runtime based on the web service skeleton code or can be an actual physical file that the server just sends back when the URL parameter is specified.

The WSDL contains an XML Schema that can be specified either inside the WSDL itself or as separate files that are imported by the WSDL. And now a problem occurs...

Some web service stub generators can only handle a full WSDL, with the Schema inside. If the WSDL imports other files the tools can't resolve the imports and fails. This made web services hard to consume because clients had issues creating stubs to interact with the web service. So much so that service providers either used an actual WSDL to respond to the ?wsdl request or started writing all sorts of hacks and plugins to make the web service generate the full WSDL.

But some providers didn't even bother so clients had to write the hacks to parse the WSDL or they had to download all files, assemble them manually into a single file and use that instead.

With time people recognized this as a problem and frameworks adapted to provide the full WSDL, not one with imports. But this generated another problem. Changing what the ?wsdl URL returned could break all those hacks created around it to fix the import problem. For this reason another convention was chosen to return the full WSDL: ?singleWsdl.

So there are frameworks that generate a full WSDL, some that generate it with imports, some allow you to specify an actual physical file, some that support the ?singleWsdl convention, some that don't. Not relevant to this question, but just for completion, there is also a ?wsdl2 convention that get's you a WSDL 2.0 definition (?wsdl get you a WSDL 1.1). Some frameworks support ?wsdl2, some don't.

My guess is the issues you have are caused by Schema imports, but without the WSDLs themselves I can't tell. Hope at least that these details help you better identify the problem.

like image 80
Bogdan Avatar answered Oct 11 '22 12:10

Bogdan