aspose file tools*
The moose likes Web Services and the fly likes How to create axis wsdl with user friendly names Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to create axis wsdl with user friendly names" Watch "How to create axis wsdl with user friendly names" New topic
Author

How to create axis wsdl with user friendly names

Atul Kadam
Greenhorn

Joined: May 05, 2006
Posts: 3
Hi,
I'm using JAVAC ANT task to create .class file with debug="on".
then i run java2wsdl to create wsdl file. Everything works fine
but when i open wsdl file in editor i see like

<wsdl:message name="doBookingValidationResponse">
<wsdl art name="doBookingValidationReturn" type="impl:BookingValidationResult" />
</wsdl:message>
<wsdl:message name="doPassProductSearchRequest">
<wsdl art name="in0" type="xsd:string" />
<wsdl art name="in1" type="xsd:string" />

Here I want in0, in1 should get those names which i used in my java file.
As user is confused with in0,in1 names. He wants these variable names should
be user friendly. (ie names used in interface from which we created wsdl.)

Any Help is appreciated.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
The obvious solution is to write the WSDL yourself (or with the help of a WSDL authoring tool) and use WSDL2java instead. Java-to-WSDL should only be treated as a stopgap or used only in the simplest of circumstances.
3.4.1 Designing the Interface.
Atul Kadam
Greenhorn

Joined: May 05, 2006
Posts: 3
Peer,
thanks for the reply and nice link.

However some one asked me to compile interface with -g option which is same as debug="on" in ANT task, and then use java2wsdl. compiler produces all debug information and java2wsdl uses that debug information to give variable names in wsdl file.

I have done above exercize but still i get wsdl which doesn't contain user friendly varaible names.

Peer pls let me know if I was correct and using -g option while compiling interface will help me. OR pls do let me know if I'm missing some thing.
I'm going through link u posted in above reply.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
The approach you described will only work if the parameters come from a method on an implementing class � it won't work for a method on an interface. For an interface you have to tell java2wsdl which implementing class should be used as the source for the parameter names. You do that with the -i --implClass <argument> option of java2wsdl.

Java2WSDL Reference
New Java2WSDL Feature: Parameter Names -> WSDL Part Names
Atul Kadam
Greenhorn

Joined: May 05, 2006
Posts: 3
Peer,
Thanks a lot, I got it done using -i <implclass>

Atul
 
Don't get me started about those stupid light bulbs.
 
subject: How to create axis wsdl with user friendly names