Interfaces and abstract class won't get you that info even when compiled
with the debug option. However it would help if you describe the methods in
the WSDD. Try this. Suppose you have a method 
boolean login(String username, String password) in your interface, then in
the WSDD, put this in.

<service name="LoginService" provider="java:RPC">
  <operation returnQName="success" returnType="xsd:boolean" name="login"
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
   <parameter name="username" type="xsd:string"/>
   <parameter name="password" type="xsd:string"/>
  </operation>
<parameter name="allowedMethods" value="login"/>
<parameter name="className" value="myservice.LoginInterface"/>
</service>

Now the WSDL will contain the parameter names "username" and "password"
instead of in0, in1 etc.... We use it for almost all our webmethods
(including the ones returning complex datatypes). 

Hope this helps. It took us a long time to figure this one out. 

Thanks! 

-- Niranjan. 



-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 1:48 PM
To: [EMAIL PROTECTED]
Subject: RE: Preserving param names in WSDL


Thanks Rhett (and Greg, who answered me off-list). I *was* using -g, but it
looks like -g does not preserve param names for an *interface*, or an
abstract class. Didn't know that (though upon reflection it makes sense, and
isn't a failing with -g, rather it's the kind of thing that happens when you
rely on features that weren't really meant to serve you).

I'm going by inspection of the .class files, where I can see the info in
there when I compile a class but not when I compile the same code as an
interface.

Oh, and I discovered I was wrong in thinking that Java2WSDL coudln't handle
it; from looking at the source a little more, I see all the REAL work is
handled by WSDL4J (sensible), which can handle it just fine.

Thanks again,
- C

Reply via email to