This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Creating WSDL 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 » Engineering » XML and Related Technologies
Bookmark "Creating WSDL" Watch "Creating WSDL" New topic
Author

Creating WSDL

M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
I have couple of questions:

1. Are there any tools available which will convert a SOAP to WSDL? I found one when I googled which was an XSL but it doesn't work

2. I manually created a WSDL but I am getting error on namespace on Rational Application Developer editor:

For example how would I write the WSDL for the following SOAP Body? Without the namespace I can get it fine:


Any help will be appreciated.

Thanks
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
Why not start with a Java Class, instead of SOAP.

Write a Java Class, with appropriate methods, and then use 'java2wsdl' command available in Axis2. You will find it in <AXIS2_HOME>\bin\ dir.

This is a good way to arrive at wsdl.
Hemanth H Bhat
Greenhorn

Joined: Apr 14, 2008
Posts: 15
Well i don't think we would be able to create a full wsdl file based on a SOAP XML due to the following reasons

Its not necessary that the SOAP XML that you have would contain all the parameters that are supported by the wsdl as many optional parameters/Tags might be missing from the SOAP request or the SOAP response XML

Also the wsdl may support multiple web service operations so each operation will have a separate set of request and response SOAP XML's hence based on a single SOAP XML it would be hard to derive the complete wsdl file

M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
James Ward wrote:Why not start with a Java Class, instead of SOAP.

Write a Java Class, with appropriate methods, and then use 'java2wsdl' command available in Axis2. You will find it in <AXIS2_HOME>\bin\ dir.

This is a good way to arrive at wsdl.


Hi James,
I would still have the same problem if I create the Java Class. How would I get the appropriate name spaces? I can create the wsdl fine without the namespace. Any thoughts on how this needs to be implemented in Java Class?
M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
Hemanth H Bhat wrote:Well i don't think we would be able to create a full wsdl file based on a SOAP XML due to the following reasons

Its not necessary that the SOAP XML that you have would contain all the parameters that are supported by the wsdl as many optional parameters/Tags might be missing from the SOAP request or the SOAP response XML

Also the wsdl may support multiple web service operations so each operation will have a separate set of request and response SOAP XML's hence based on a single SOAP XML it would be hard to derive the complete wsdl file



Hi Hemanth,
While I agree with what you say, generating wsdl for that particular SOAP would be handy and if there are multiple SOAPs, it could be manually merged. But I digress.

Any thoughts on my original question?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating WSDL
 
Similar Threads
Problem with arrays of primitive types
reading soap-envelop messages
Axis 2 - MTOM Service problem
Mock exam question: SOAP doubt
WSDL2JAVA Namespace Issue