axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S Pole" <>
Subject Re: Axis2: doc/lit client stubs
Date Fri, 03 Nov 2006 15:04:48 GMT
I just tried deploying my services using the RC2 jars. The wsdl is generated
dynamically a the url and I use this wsdl to generate (RC2) wsdl2java client
The SOAP request/response on the wire seems to be fine. The client stub for
the TestResponse element also seems to reflect the schema element.

However, on the client side, I get the fol. RuntimeException:
Exception in thread "main" java.lang.RuntimeException:
java.lang.RuntimeException: Unexpected subelement products
    at Test.main(

According to the wsdl and my server side java code, this element is
perfectly valid in the SOAP response. Is this a potential bug on the client
side deserialization?

My wsdl parts looks like this:
<xs:complexType name="TestResponse">
          <xs:element name="applicationKey" nillable="true"
          <xs:element maxOccurs="unbounded" name="products" nillable="true"

and the corresponding client stub code looks like this:
       public static class TestResponse implements
            org.apache.axis2.databinding.ADBBean {
        /* This type was generated from the piece of schema that had
         name = TestResponse
         Namespace URI =
         Namespace Prefix = ns1

         * field for ApplicationKey

        protected java.lang.String localApplicationKey;

         * Auto generated getter method
         * @return java.lang.String
        public java.lang.String getApplicationKey() {
            return localApplicationKey;

         * Auto generated setter method
         * @param param ApplicationKey
        public void setApplicationKey(java.lang.String param) {

            this.localApplicationKey = param;


         * field for Products
         * This was an Array!

        protected Product[] localProducts;

         * Auto generated getter method
         * @return Product[]
        public Product[] getProducts() {
            return localProducts;

         * validate the array for Products
        protected void validateProducts(Product[] param) {

            if ((param != null) && (param.length < 1)) {
                throw new java.lang.RuntimeException();


View raw message