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
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Employee" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
    xmlns:ns="urn:sequence:XSD:a" xmlns:ns1="urn:sequence:XSD:1"
    targetNamespace="urn:sequence:XSD:a">
    <wsdl:types>
        <xsd:schema targetNamespace="urn:sequence:XSD:a" elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            xmlns="urn:sequence:XSD:1"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema";
            xmlns:y="urn:sequence:XSD:a">
            <xsd:import namespace="urn:sequence:XSD:1"
            schemaLocation="SequenceSchema.xsd"/>
            <xsd:element name="DoEmployeeUpdtRq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element ref="ns1:EmployeeRq" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="DoEmployeeUpdtRs">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element ref="ns1:EmployeeRs" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="DoEmployeeUpdtRqMsg">
        <wsdl:part name="request" element="ns:DoEmployeeUpdtRq"/>
    </wsdl:message>
    <wsdl:message name="DoEmployeeUpdtRsMsg">
        <wsdl:part name="response" element="ns:DoEmployeeUpdtRs"/>
    </wsdl:message>

    <wsdl:portType name="Employee_portType">
        <wsdl:operation name="EmployeeUpdt">
            <wsdl:input message="ns:DoEmployeeUpdtRqMsg"/>
            <wsdl:output message="ns:DoEmployeeUpdtRsMsg"/>
        </wsdl:operation>
    </wsdl:portType>


    <wsdl:binding name="Employee_binding" type="ns:Employee_portType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="EmployeeUpdt">
            <soap:operation soapAction="http://tbd/EmployeeSvc/EmployeeUpdt";
            style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="EmployeeSvc">        
        <wsdl:port name="Employee_port" binding="ns:Employee_binding">
            <soap:address location="http://tbd/EmployeeSvc/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Attachment: SequenceSchema.xsd
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to