Thanks for responding.
I changed the way I get the XMLReader like below and it worked - I am able
to move forward now -
The issue might have been with teh way I got the reader???Not sure about the
difference and why it didnt work with my first approach.

Instead of :
OMElement docElem = AXIOMUtil.stringToOM(reqMessage);
XMLStreamReader reader = docElem.getXMLStreamReader();
StAXSOAPModelBuilder builder =
OMXMLBuilderFactory.createStAXSOAPModelBuilder(new SOAP11Factory, reader);
SOAPEnvelope envelope = builder.getSOAPEnvelope();
........

Changed to:

ByteArrayInputStream bis = new ByteArrayInputStream(reqMessage.getBytes());
XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(soapFileReader);
StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(parser, null);
SOAPEnvelope envelope = (SOAPEnvelope)builder.getDocumentElement();
SOAPBody body = envelope.getBody();
OMElement elem = body.getFirstChildWithName(....);
XMLStreamReader elemReader = elem.getXMLStreamReaderWithoutCaching();
MYStub.ElemType elemReq = MYStub.ElemType.Factory.parse(elemReader);



On Wed, Jun 17, 2009 at 8:36 AM, ibrahim demir <[email protected]>wrote:

> Hi;
>
> Was there any output element in your wsdl that says that applicationID will
> return. If not than this happens.
>
> The element names and orders shuold be static in order to work with ADB. I
> mean the response should be in the right order and there  should be no more
> element in the response .
>
> Yours
>
> Ibrahim DEMIR
> CyberSoft Yazilim Muh.
> http://www.ibrahimdemir.org
>
>
>
>
>
> ------------------------------
> *From:* Ramya K Grama <[email protected]>
> *To:* [email protected]
> *Sent:* Wednesday, June 17, 2009 2:46:00 PM
> *Subject:* Unexpected subelement - bug in Stub.parse
>
> Hello,
>   I am stuck with the "Unexcpected subelement applicationID" ADBException
> in my Client stub.
>   I used Eclipse code generator plugin to generate the client code for my
> wsdl.
>   I created a wrapper client which calls the stub class, has a hard coded
> input soap xml and calls the Stub's parse method with an XMLStreamReader.
>   My input xml is:
>   <?xml version='1.0' encoding='utf-8'?>
>
>   xmlns:ns1="http://service.wellsfargo.com/entity/message/2007";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>   xmlns:ns3="
> http://service.wellsfargo.com/provider/System2/bntService/getBankerNotes/2007/
> "
>   xmlns:ns2="http://service.wellsfargo.com/entity/message/2007/";>
>   <soapenv:Header/>
> <soapenv:Body>
>  <ns3:getBankerNotes>
> <applicationID>20091133500003</applicationID>
>   <requestorLoc>02604</requestorLoc>
>   <requestorID>NWCB0090</requestorID>
>   </ns3:getBankerNotes>
>   </soapenv:Body>
>   </soapenv:Envelope>
>   I debugged through the parse method and the point where the exception is
> thrown is:
>   if (reader.isStartElement() && new
> javax.xml.namespace.QName("","requestorLoc").equals(reader.getName())){
>   since reader.getName() is still stuck at "applicationID" whereas the flow
> has gone to "requestorLoc"
>   It seems like reader.next() is actually not moving the pointer or
> something.
>   Your quick reply and help with this is highly appreciated!!
> -wsnewbie
>
>

Reply via email to