I think thats what I said below. Compiled interfaces and abstract class do not have that much information in the class files for axis to use reflection and find out parameter names. That is the java compiler does not include this parameter info in the class files for interfaces and abstract classes. Precisely for this reason, the "-i" switch has been provided so that you can expose the methods in an interface/asbstract class in the WSDL but use the implementation class (class that implements the interface or that extends the abstract class and implements all the abstract methods) to get the parameter names. When normal classes are compiled with debug option, then the java compile puts the parameter info in the class files and hence, when using the normal class with java2wsdl you don't need the -i switch.
Thanks!
-- Niranjan.
-----Original Message-----
From: Yakulis, Ross (Ross)
To: [EMAIL PROTECTED]
Sent: 4/2/2004 5:17 PM
Subject: RE: Naming of parameters in generated WSDL
Here is the catch, if you are just using a Java interface and no
implementation class, you get the
in0, in1, ...., you must have an implementation class. That is run
java2WSDL on an
implementation class file ( public class MyClass {... ) and not an
interface class
file (public interface MyInterface {...). It seem to not really matter
if you specify the -i
if the input is a 'Class'. If however the input is an 'interface', then
you need to use the
-i option to point to a class that implements that interface to get the
parameter names.
Ross
-----Original Message-----
From: Yakulis, Ross (Ross)
Sent: Friday, April 02, 2004 9:02 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Naming of parameters in generated WSDL
I remember that used to work, but I do not believe this works any
longer. Though I would like to be proven wrong!
Ross
-----Original Message-----
From: Ekbote, Niranjan [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 02, 2004 7:51 AM
To: [EMAIL PROTECTED]
Subject: RE: Naming of parameters in generated WSDL
I believe there is a "-i" switch for java2wsdl which takes the name of
the class that implements the interface you are using to generate the
WSDL. The dedug info for that class is used to get the parameter names.
Also when you compile that class make sure you compile it with debug
turned ON. Else even this "-i" won't work.
Thanks!
-- Niranjan.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 02, 2004 10:47 AM
To: [EMAIL PROTECTED]
Subject: Naming of parameters in generated WSDL
Hi all
I have a simple document/literal WS. I use java2wsdl Ant task to
generate a WSDL from my interface class which represents the service.
Previously, the names used for the parameters in the WSDL matched the
names of the parameters i use in the java interface. This was nice
because it was kind of self documenting. For some unknown reasons this
changed and now "in0" - "in4" are generated (with the appropriate
types).
Any idea how i can specify that the names of the parameters of my
interface are used again?
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> "
targetNamespace="http://www.geres.ch/Geres_MeldungAnGemeinde_V1_0
<http://www.geres.ch/Geres_MeldungAnGemeinde_V1_0> "
elementFormDefault="qualified">
<element name="getMeldung">
<complexType>
<sequence>
<element name="in0" type="xsd:int"/>
<element name="in1" type="xsd:int"/>
<element name="in2" type="xsd:dateTime"/>
<element name="in3" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getMeldungResponse">
<complexType>
<sequence>
<element name="getMeldungReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
Thanks,
Thomas