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.)
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.
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.
Joined: Aug 19, 2005
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.