You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/01/08 21:46:39 UTC

DO NOT REPLY [Bug 15903] - WSDL2Java stomping my service class

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15903>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15903

WSDL2Java stomping my service class





------- Additional Comments From gdaniels@macromedia.com  2003-01-08 20:46 -------
For the moment, this is working as designed.

WSDL2Java will create an interface called Test and an implementation class 
called TestImpl (or something very like that).  We're a little arbitrary about 
overwriting - I think we'll happily overwrite anything but the implementation 
class itself.  So if you had a class called TestImpl kicking around, it 
wouldn't overwrite *that*, because it thinks that's where your implementation 
would be, but it thinks Test.java is just the interface, and so can be 
overwritten freely.

WSDL2Java ALWAYS makes separate interface and implementation classes, with the 
interface class named the same as the class you started with in Java2WSDL.  So 
if you really need to use WSDL2Java, you should copy your Test.java to 
TestImpl.java before running it.

Why are you bothering with WSDL2Java at all, though?  If you want all the 
functionality of your Test class exposed, you could just use a minimal 
deploy.wsdd:

<deployment [namespaces deleted for brevity]>
  <service name="TestService" style="rpc">
    <parameter name="className" value="test.Test"/>
    <parameter name="allowedMethods" value="*"/>
  </service>
</deployment>

That said, there is probably some call to have both a "--force" (overwrite 
everything) and a "--noOverwrite" option on WSDL2Java... this might be a good 
enhancement request.