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 S Pole <sb...@gmail.com> on 2006/11/03 11:31:47 UTC

Axis2: doc/lit client stubs

One of the known issues right now is not being able to generate client stubs
with doc/lit type of services. Does anyone know if/when this will be
addressed?
Thanks.

Re: Axis2: doc/lit client stubs

Posted by Thilina Gunarathne <cs...@gmail.com>.
Please open a JIRA with the resources(your service archive if
possible) to regenerate the problem...

thanx,
~Thilina

On 11/3/06, S Pole <sb...@gmail.com> wrote:
> 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
> stubs.
> 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
> com.test.services.Powerservices2Stub.fromOM(Powerservices2Stub.java:5401)
>     at
> com.test.services.Powerservices2Stub.getProducts(Powerservices2Stub.java:149)
>     at Test.main(Test.java:26)
>
> 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:sequence>
>           <xs:element name="applicationKey" nillable="true"
> type="xs:string"/>
>           <xs:element maxOccurs="unbounded" name="products" nillable="true"
> type="ax21:Product"/>
> </xs:sequence>
> </xs:complexType>
>
> 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 = http://dataobjects.test.com/xsd
>          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();
>             }
>
>         }


-- 
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2: doc/lit client stubs

Posted by S Pole <sb...@gmail.com>.
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
stubs.
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 com.test.services.Powerservices2Stub.fromOM(Powerservices2Stub.java
:5401)
    at com.test.services.Powerservices2Stub.getProducts(
Powerservices2Stub.java:149)
    at Test.main(Test.java:26)

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:sequence>
          <xs:element name="applicationKey" nillable="true"
type="xs:string"/>
          <xs:element maxOccurs="unbounded" name="products" nillable="true"
type="ax21:Product"/>
</xs:sequence>
</xs:complexType>

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 = http://dataobjects.test.com/xsd
         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();
            }

        }

Re: Axis2: doc/lit client stubs

Posted by Thilina Gunarathne <cs...@gmail.com>.
You can shift to 1.1-RC2[1].. We'll be releasing 1.1 soon...

~Thilina
[1] http://apache.org/~thilina/axis2/1.1-RC2

On 11/3/06, S Pole <sb...@gmail.com> wrote:
> Thank you.
>
> I was using the 1.0 release and was referring to:
>  http://ws.apache.org/axis2/
>
> "No support yet for unwrapping of doc/lit WSDL files (in stub generation)"
>
>
>
> On 11/3/06, Thilina Gunarathne <cs...@gmail.com> wrote:
> >
> > > One of the known issues right now is not being able to generate client
> stubs
> > > with doc/lit type of services.
> > Hmm...  I did not know it ;-)
> >
> > Axis2 supports doc/lit... The known issue is  "No support yet for
> > soapenc:array in rpc/encoded style WSDL documents (in stub
> > generation)"..
> >
> >
> http://people.apache.org/~thilina/axis2/1.1-RC2/release-notes.html
> >
> > ~Thilina
> >
> > >Does anyone know if/when this will be
> > > addressed?
> > > Thanks.
> > >
> >
> >
> > --
> > http://webservices.apache.org/~thilina/
> > http://thilinag.blogspot.com/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>


-- 
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2: doc/lit client stubs

Posted by S Pole <sb...@gmail.com>.
Thank you.

I was using the 1.0 release and was referring to:
 http://ws.apache.org/axis2/

"No support yet for unwrapping of doc/lit WSDL files (in stub generation)"


On 11/3/06, Thilina Gunarathne <cs...@gmail.com> wrote:
>
> > One of the known issues right now is not being able to generate client
> stubs
> > with doc/lit type of services.
> Hmm...  I did not know it ;-)
>
> Axis2 supports doc/lit... The known issue is  "No support yet for
> soapenc:array in rpc/encoded style WSDL documents (in stub
> generation)"..
>
> http://people.apache.org/~thilina/axis2/1.1-RC2/release-notes.html
>
> ~Thilina
>
> >Does anyone know if/when this will be
> > addressed?
> > Thanks.
> >
>
>
> --
> http://webservices.apache.org/~thilina/
> http://thilinag.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Axis2: doc/lit client stubs

Posted by Thilina Gunarathne <cs...@gmail.com>.
> One of the known issues right now is not being able to generate client stubs
> with doc/lit type of services.
Hmm...  I did not know it ;-)

Axis2 supports doc/lit... The known issue is  "No support yet for
soapenc:array in rpc/encoded style WSDL documents (in stub
generation)"..

http://people.apache.org/~thilina/axis2/1.1-RC2/release-notes.html

~Thilina

>Does anyone know if/when this will be
> addressed?
> Thanks.
>


-- 
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org