axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Jordan" <skjor...@worldnet.att.net>
Subject Re: WSDL2Java issue (samples/userguide/example5)
Date Sun, 31 Mar 2002 22:59:29 GMT
I finally figured out why WSDL2Java fails on this example.  The key is to
(carefully!) examine this line in the deployment descriptor:
  <beanMapping qname="myNS:Order" xmlns:myNS="urn:BeanService"
The upper case B in "urn:BeanService" is trouble!!!  When you create a wsdl
file and stubs, you end up with an interface (below) which will not compile
because of a *name-collision* between the interface (BeanService) and
argument (BeanService.Order).  One way to fix the problem is to put a lower
case 'b' in the deployment descriptor:
  <beanMapping qname="myNS:Order" xmlns:myNS="urn:beanService"
Now when the interface (below) is generated by WSDL2Java, the argument name
is "beanService.Order" and all is well.

I still say this is a bug in WSDL2Java.  It should be smart enough to avoid
such a name-collision because the collision produces code that will not
compile.
Cheers.
Stan
I used axis-beta1 for this exercise.
----------------------------------------------
/**
 * BeanService.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis Wsdl2java emitter.
 */

package localhost;

public interface BeanService extends java.rmi.Remote {
    public java.lang.String processOrder(BeanService.Order in0) throws
java.rmi.RemoteException;
}





Mime
View raw message