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 lucky <un...@gmail.com> on 2008/02/20 08:03:12 UTC

ADB Binding error - Probably BUG

Hi,

We are developing a Axis2 Top-Down WebService and while invoking WS we are
getting following exception at client side -



Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

      at ws.schemas.EmployeeRs_TypeSequence_type1$Factory.parse(*
EmployeeRs_TypeSequence_type1.java:388*)

      at ws.schemas.EmployeeRs_TypeSequence_type2$Factory.parse(*
EmployeeRs_TypeSequence_type2.java:562*)

      at





After debugging it is noticed that, it is going in an infinite loop in class


EmployeeRs_TypeSequence_type2.java generated from schema -



while (!loopDone2) {

                            // Step to next element event.

                            while (!reader.isStartElement() &&

                                    !reader.isEndElement())

                                reader.next();



                            if (reader.isEndElement()) {

                                //two continuous end elements means we are
exiting the xml structure

                                loopDone2 = true;

                            } else {

                                list2.add(
ws.schemas.EmployeeRs_TypeSequence_type1.Factory.parse(

                                        reader));

                            }

                        }



Corresponding Schema causing trouble –



<*xsd:sequence* minOccurs="0">

                <xsd:element name="EmpNo" type="xsd:int"/>

                <*xsd:sequence* minOccurs="0" maxOccurs="unbounded">

                    <xsd:element name="Role" type="xsd:string" minOccurs="0"
/>

                </*xsd:sequence*>

               <xsd:element name="Salary" type="xsd:long"/>

</*xsd:sequence*>



While going through the inner sequence, its never coming out of while loop
mentioned above.



 We can't change our WSDL and Schema at this stage and have to make it work.
Is it a defect in AXIS 2 ADB binding? Or we doing something wrong here?

Any help is much appreciated.Thanking you all in anticipation.

P.S.

We are using following command to create the stub and other classes from
Schema. –



wsdl2java -uri D:.....\Sequence.wsdl -o D:....\Sequence -p wsdl.Sequence -s
-ss -sd -d adb -g -ns2p urn:sequence:XSD:1=ws.schemas,urn:sequence:XSD:a=
wsdl.Sequence -ssi

Re: ADB Binding error - Probably BUG

Posted by Amila Suriarachchi <am...@gmail.com>.
What is the Axis2 version you use? if you get this error with a nightly
build please log a jira.

thanks,
Amila.

2008/2/20 lucky <un...@gmail.com>:

> Hi,
>
> We are developing a Axis2 Top-Down WebService and while invoking WS we are
> getting following exception at client side -
>
>
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>
>       at ws.schemas.EmployeeRs_TypeSequence_type1$Factory.parse(*
> EmployeeRs_TypeSequence_type1.java:388*)
>
>       at ws.schemas.EmployeeRs_TypeSequence_type2$Factory.parse(*
> EmployeeRs_TypeSequence_type2.java:562*)
>
>       at
>
>
>
>
>
> After debugging it is noticed that, it is going in an infinite loop in
> class
>
> EmployeeRs_TypeSequence_type2.java generated from schema -
>
>
>
> while (!loopDone2) {
>
>                             // Step to next element event.
>
>                             while (!reader.isStartElement() &&
>
>                                     !reader.isEndElement())
>
>                                 reader.next();
>
>
>
>                             if (reader.isEndElement()) {
>
>                                 //two continuous end elements means we are
> exiting the xml structure
>
>                                 loopDone2 = true;
>
>                             } else {
>
>                                 list2.add(
> ws.schemas.EmployeeRs_TypeSequence_type1.Factory.parse(
>
>                                         reader));
>
>                             }
>
>                         }
>
>
>
> Corresponding Schema causing trouble –
>
>
>
> <*xsd:sequence* minOccurs="0">
>
>                 <xsd:element name="EmpNo" type="xsd:int"/>
>
>                 <*xsd:sequence* minOccurs="0" maxOccurs="unbounded">
>
>                     <xsd:element name="Role" type="xsd:string"
> minOccurs="0" />
>
>                 </*xsd:sequence*>
>
>                <xsd:element name="Salary" type="xsd:long"/>
>
> </*xsd:sequence*>
>
>
>
> While going through the inner sequence, its never coming out of while loop
> mentioned above.
>
>
>
>  We can't change our WSDL and Schema at this stage and have to make it
> work. Is it a defect in AXIS 2 ADB binding? Or we doing something wrong
> here?
>
> Any help is much appreciated.Thanking you all in anticipation.
>
> P.S.
>
> We are using following command to create the stub and other classes from
> Schema. –
>
>
>
> wsdl2java -uri D:.....\Sequence.wsdl -o D:....\Sequence -p wsdl.Sequence-s -ss -sd -d adb -g -ns2p urn:sequence:XSD:1=
> ws.schemas,urn:sequence:XSD:a=wsdl.Sequence -ssi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>



-- 
Amila Suriarachchi,
WSO2 Inc.