Reputation: 2520
I have a web service deployed on Jetty. I use the SOAP UI to call it via link like http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import
and it works.
I have always worked with service which had ?wsdl at the end of url, but now I confused.
Why there is no ?wsdl at the end of url?
Upvotes: 2
Views: 20478
Reputation: 1192
A Web Service endpoint usually has an url that looks like this:
http://server:port/services/myservice
It does not have a wsdl
parameter. This is the url of the web service itself, the one that will be called by the clients.
Most web service frameworks have a convenient feature in which they map the url of the endpoint with a wsdl
url parameter to a webpage that shows the content of the WSDL for that web service. So this url:
http://server:port/services/myservice?wsdl
Is like telling the server: "Show me the wsdl file for this web service endpoint". The content that you see in that webpage is not a wsdl file stored in disk, it is just the content of the wsdl generated by the framework.
This feature is very useful because if we want to create a client for that web service we don't need to go ask for the wsdl file, we can just go and fetch it from that url.
All this means that in SoapUI you would create a new project and tell him that the wsdl file can be found here: http://server:port/services/myservice?wsdl
. If you tell him that the wsdl file is: http://server:port/services/myservice
it will throw an error as that is not a wsdl file.
Alternatively you could enter the location of the wsdl file that you have in disk instead of the url and it should create the same ws client.
Then SoapUI will read the wsdl and he will see that the endpoint for the web service is http://server:port/services/myservice
so this is where he will send the requests.
In your case, since you are already passing url parameters to the endpoint, you can consider that your webservice will be called at this url:
http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import
And if you want to see the wsdl for that web service, you just add a wsdl
parameter to the url. Note that just as any other url query the symbol ?
just denotes that the url ends there and next characters are url parameters which are separated by &
. In your case you have 3 parameters (workflow, soapAction and now wsdl):
http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import&wsdl
now it returns a text like Company type: blah blah... Region: blah blah...
This is the wsdl content, which of course includes the xml types used in the web service, all normal.
Maybe it looks strange to you because in the wsdl file you have in disk it does not show all these types and instead it imports the xsd
files that contain those definitions. The wsdl you see in your browser will never have imports like that, and will always show all the types embedded in the wsdl file.
Scroll down past all those types definitions and you will see the rest of the wsdl.
I hope it helped to make clear that the url with ?wsdl
at the end is not the web service and it's just the wsdl content.
Upvotes: 5