If a POX messege is sent to the ESB with a content-type of text/xml The ESB 
tries to build the message as SOAP
--------------------------------------------------------------------------------------------------------------

                 Key: ESBJAVA-529
                 URL: https://wso2.org/jira/browse/ESBJAVA-529
             Project: WSO2 ESB
          Issue Type: Bug
            Reporter: Keith Godwin Chapman
            Assignee: Asankha Perera
            Priority: Blocker


The issue is that the content-type text/xml is mainly used for SOAP, but 
unfortunately some sites use text/xml to send POX messages too. The way Axis2 
uses to resolve this issue is follows,

SOAPAction header is mandatory in SOAP 1.1
Hence if the content-type is text/xml test the existence of SOAPAction, if its 
present build the message as SOAP, if its not build the message as 
application/xml.

I encountered this issue in wso2esb-1.7-beta2 but this worked perfectly in the 
1.6 release. It fails with the following exception 

org.apache.axis2.AxisFault: First Element must contain the local name, Envelope 
, but found notify
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:277)
        at 
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:238)
        at 
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must 
contain the local name, Envelope , but found notify
        at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:251)
        at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:209)
        at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191)
        at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172)
        at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)
        at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105)
        at 
org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:53)
        at 
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:164)
        at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)
        at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:270)
        ... 5 more



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to