You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Prasanta Behera <pr...@netscape.com> on 2002/06/04 17:53:47 UTC

WSDL2Java bug ?

With the attached WSDL,  there are 2 problems
(Using AXIS Beta 2 , JDK 1.4, Win2k)

1.  It doesnot generate any set/get() methods for Holder objects. This 
is the generated code.
public final class ArrayOfstringHolder implements 
javax.xml.rpc.holders.Holder {
    public String[] value;

    public ArrayOfstringHolder() {
    }

    public ArrayOfstringHolder(String[] value) {
        this.value = value;
    }

    // ?++?
}

2. The return type is not correct (.  The resp is expected to be int 
 but it is not. I had to
do this to get around the problem ( I added the set/get method in the 
Holder objects)

TestServiceStub.java

            // Put the resp in the holder object
            holder.setValue ((String[]) resp);
       
            /* AXIS BUG ???
            try {
                return ((Integer) resp).intValue();
            } catch (java.lang.Exception e) {
                return ((Integer) 
org.apache.axis.utils.JavaUtils.convert(resp,
int.class)).intValue();
            }
            */
            return 0;

The Apache Bugzilla  (nagyoa.apache.org) site seems to be down.
Will be happy to provide more info.

thanks,
/prasanta