axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Kumar Yadav (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (AXIS2-3195) AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of OMDocument and Rampart is engaged
Date Wed, 28 Mar 2012 12:36:32 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240376#comment-13240376
] 

Rajesh Kumar Yadav edited comment on AXIS2-3195 at 3/28/12 12:35 PM:
---------------------------------------------------------------------

Please answer , its urgent for me.

Thanks,
Rajesh

                
      was (Author: rajyadav):
    Please provide the answer , its urgent for me.

Thanks,
Rajesh

                  
> AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of
OMDocument and Rampart is engaged
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3195
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3195
>             Project: Axis2
>          Issue Type: Bug
>         Environment: Windows XP SP2, Axis2 1.2, Tomcat 6.0.13
>            Reporter: Christopher Weiss
>            Assignee: Ruchith Udayanga Fernando
>         Attachments: BugDemoConfigFiles.zip, RampartBugDemo.zip
>
>
> Please see attached project to demonstrate the issue. With the axis2-1.2 release and
earlier, the AXIOM parser throws a NullPointerException when processing requests using Rampart:
> Thread [main] (Suspended (exception NullPointerException)) 
>  OMStAXWrapper.updateNextNode() line: 981 
>  OMStAXWrapper.updateLastNode() line: 950 
>  OMStAXWrapper.next() line: 913 
>  StAXSOAPModelBuilder(StAXOMBuilder).next() line: 111 
>  SOAPEnvelopeImpl(NodeImpl).build() line: 469 
>  SOAPMessageImpl(DocumentImpl).build() line: 476 
>  Axis2Util.getDocumentFromSOAPEnvelope(SOAPEnvelope, boolean) line: 107 
>  RampartMessageData.<init>(MessageContext, boolean) line: 146 
>  MessageBuilder.build(MessageContext) line: 56 
>  RampartSender.invoke(MessageContext) line: 59 
>  Phase.invoke(MessageContext) line: 382 
>  AxisEngine.invoke(MessageContext) line: 522 
>  AxisEngine.send(MessageContext) line: 655 
>  OutInAxisOperationClient.send(MessageContext) line: 237 
>  OutInAxisOperationClient.execute(boolean) line: 202 
>  EchoStub.EchoOperation(OMElement) line: 127 
>  Client.main(String[]) line: 47 
> The cause of the exception is the AXIOM parser's setting the boolean variable needToThrowEndDocument
in the DOMStAXWrapper to true if the current node being parsed has a parent node of type OMDocument..
> Temp fix: In the code, when creating an AXIOM compatible schema, we did the following:
>  
> try {
>   // Get the schema is it is already AXIOM compatible, or convert it if it isn't.
>   OMElement schema = docSchema instanceof OMDocument ? (OMElement) docSchema
>     .getDocumentElement() : org.apache.axis2.util.XMLUtils.toOM(docSchema.getDocumentElement());
>   
>   // Workaround to fix an issue with the building the OMElement if the
>   // parent is an OMDocument. Detach the element from the parent Document...
>   if (schema.getParent() != null && schema.getParent() instanceof OMDocument)
{
>     schema.detach();
>   }
>   elementList.add(org.apache.axis2.databinding.utils.Constants.OM_ELEMENT_KEY);
>   elementList.add(schema);
> } catch (Exception e) {
>   throw new java.lang.RuntimeException("Can't convert schema to AXIOM!", e);
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message