20080207 Thursday February 07, 2008

Meaningful parameter names from java2wsdl

I ran the axis java2wsdl tool, and it spit out WSDL that looked like this:

  <schema elementFormDefault="qualified" ...>
   <element name="in0" type="xsd:string"/>
   <element name="in1" type="xsd:string"/>
   <element name="in2" type="xsd:string"/>

... and so on. This was really depressing, because my java source actually had meaningful parameters name, not "in0" and such. I was sure I had found a bug in java2wsdl. But, as it turns out, it was operator error as usual. The compiled class files I had used to generate the WSDL files had no parameter names.

The trick to get my names back was to add the 'debug="on"' attribute to my ant javac command.

   <javac srcdir="${src}" destdir="${classes}" debug="on" > ... </javac>

You can also replicate this with the command line javac command by adding the -g option.

This basically adds debugging information, such as parameter names, to the compiled class files. When I reran java2wsdl, all was well.

Posted by rickg ( Feb 07 2008, 10:13:03 AM PST ) Permalink Comments [2]
Comments:

Thanks! Debug did the trick!

Posted by Lance (67.130.82.182) on March 21, 2008 at 10:15 AM PDT #

Glad I could help!

Posted by Psuedo Guru (58.93.48.239) on March 21, 2008 at 10:16 AM PDT #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed