wood burning stoves 2.0*
The moose likes Web Services and the fly likes Downloading wsdl from service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Downloading wsdl from service" Watch "Downloading wsdl from service" New topic
Author

Downloading wsdl from service

A Eniac
Greenhorn

Joined: Jan 18, 2013
Posts: 3
Hi All,
I am maintaining a SOAP service and I am trying to fix an issue where I am unable to download wsdl using a call like http://host:port/path/versionetc/?wsdl, where the URL for a normal service call would be http://host:port/path/versionetc/. I am expecting the entire service wsdl to be downloaded, not just the wsdl for a single call.

Unfortunately I get an HTTP 405 error saying "This service does not suppport GET method. Now this is actually true. It is a SOAP service and all the implemented operations are POSTs. Do I have to implement a dummy GET to enable this behavior? Or does the version of the library I am using not support this functionality(sun-jaxws-2.1.5)? Or am I wrong in expecting this behavior at all?

Here are some more specifics:

Operating System: Windows 7
Container: Tomcat 5.5.17
Libraries: jaxws-api-2.1.5.jar, jaxws-rt-2.1.5.jar
Java 6 (build 1.6.0_29-b11)

sun-jaxws.xml



web.xml

Adithya Parvatam
Greenhorn

Joined: Jan 17, 2013
Posts: 4
http://host:port/path/versionetc?wsdl try with this

because on a webservice you will have WSDLwith specific to operations

suppose you have an operation like getVersion

then
http://host:port/path/versionetc/getVersion is the service to be accessed and ?wsdl will download the wsdl

you can download operation specific wsdl form here ..hope this helps
A Eniac
Greenhorn

Joined: Jan 18, 2013
Posts: 3
Thanks for your response Adithya. If I understand your response, you are suggesting a way to get wsdl for a specific operation. Is this correct? Would that be a GET or a POST? The service I am maintaining is a SOAP service and does not care about the operation name in the URL. It only looks at the SOAP request in the Content Body. Also, any GET is immediatley rejected.

In any case, I need a way that users can download wsdl for the entire service.
Adithya Parvatam
Greenhorn

Joined: Jan 17, 2013
Posts: 4
Yes,we need to use operation specific WSDL and the ?WSDL is the GET operation

so if get is blocked by the service ?WSDL do not work.

So we need to get the WSDL from loacation for these type of services...am trying to figure out how to enable url for these type of services..will reply once found.

but for further information

http://www.w3.org/TR/wsdl#_7.__

please refer to this for the usage with GET or POST ,with detailed information.

webservice which is SOAP/HTTP or SOAP/JMS(which has queues/topic driven)

for SOAP/HTTP the operation is the thing which will give the complete WSDL.

Run the URL in the browser ,which should say something like "Hello Axis Service" this type of message. on which you can view a WSDL.

If the Service is a REST(these are the services which work mainly on GET/POST) ,need to look into the RESTful services documentation
http://www.oracle.com/technetwork/articles/javase/index-137171.html

see the webservice address element in the WSDL where you developed the service for the correct URL with operation name.this is the thing which should be used for constructing clients to the webservices.

if in eclipse:- right click on the wsdl of the service and test the service using webservices test explorer,so that a complete understanding on the url and operation will come.

tried my level best to answer..if does not help ..sorry



A Eniac
Greenhorn

Joined: Jan 18, 2013
Posts: 3
Thank you for your effort in answering Adithya. I am still wondering if this feature was supported in the 2.1.5 library at all. In any case, if it only returns the operation specific wsdl I should look for another way of doing it.
 
Consider Paul's rocket mass heater.
 
subject: Downloading wsdl from service
 
Similar Threads
Invalid content taglib
Is webservices.xml only for JAXRPC services?
Eclipse 3.3, Glassfish, WebServices and wsimport
Deploy JAXWS (Mustang) WS to Tomcat?
Trying to deploy JAX WS webservice on Tomcat 7.0.32