Try:
javac -g FamilyImpl.java

The interface class will NEVER get the original parameter names.

Regards,
Dies


Rhimbo wrote:
Hello again all,


Does anyone know how to generate a WSDL that uses the formal parameter names from the original source file... either the Java interface or the implement class?
I've tried every combination I can think of using the -implClass
command line argument to Java2WSDL, but I can't get it to work.

I want to generate my WSDL so it uses the formal parameter names in
my methods instead of "in0", "in1", etc.
I found the following URL:

http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rwbs_java2wsdl.html

This page has a much better explanation that the Apache documentation. Nevertheless, I still can't generate a WSDL with my formal parameter names.
Here is an excerpt from the explanation on the above URL:

"If the class is compiled without debug information, or if the class is an interface, the method parameter names are not available. In this case, you can use the -implClass argument to provide an alternative class from which to obtain method parameter names. The impl-class does not need to implement the class if the class is an interface, but it must implement the same methods as class. "


So I tried the following:

interface         : Family.java
implementing class: FamilyImpl.java

First try by compiling interface with debug:

$ javac -g Family.java
$ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
    -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
    -n urn:familyAccounts \
    -p"disney.dis.family" urn:familyAccounts \
    disney.dis.family.Family


Doesn't work. family.wsdl still has "in0", ... etc.
Then tried specifying alternate class file containing the
implementation class:

$ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
    -implClass FamilyImpl \
    -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
    -n urn:familyAccounts \
    -p"disney.dis.family" urn:familyAccounts \
    disney.dis.family.Family

Error:
java.lang.ClassNotFoundException: mplClass
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
...

"The <class-of-portType> has already been specified as, FamilyImpl. It cannot be specified again as disney.dis.family.Family."
     Java2WSDL emitter


Next tried compiling the FamilyImpl.java file, and then ran above Java2WSDL command again:

Got same exception and error message.

Next, tried:

$ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
    -implClass FamilyImpl \
    -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
    -n urn:familyAccounts \
    -p"disney.dis.family" urn:familyAccounts \
disney.dis.family.Family
Error:
"The <class-of-portType> has already been specified as, FamilyImpl. It cannot be specified again as disney.dis.family.FamilyImpl.
     Java2WSDL emitter"


Next, tried:
$ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
    -implClass FamilyImpl \
    -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
    -n urn:familyAccounts \
    -p"disney.dis.family" urn:familyAccounts \
disney.dis.family.Family
Error:
"java.lang.NoClassDefFoundError: FamilyImpl (wrong name: disney/dis/family/FamilyImpl)"

Next tried:

$ java org.apache.axis.wsdl.Java2WSDL -o family.wsdl \
  -implClass FamilyImpl \
  -l"http://10.196.130.245:8080/axis/services/familyAccounts"; \
  -n urn:familyAccounts \
  -p"disney.dis.family" urn:familyAccounts


Error:
    java.lang.ClassNotFoundException: mplClass
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at j



Thanks much.

Vartan


Reply via email to