Sorry we don't support xmlns:soap="http://www.w3.org/2001/12/soap-envelope";.

Please use either "http://www.w3.org/2003/05/soap-envelope"; for SOAP 1.2 or "http://schemas.xmlsoap.org/soap/envelope/"; for SOAP 1.1.

Anyway, there is a small bug in the code, thats why you haven't got the correct 
error message. Will fix it soon.

-- Chinthaka

[EMAIL PROTECTED] wrote:

Hi,

When I execute the following code, I always receive an exception (plz, see
below) using Axis 2 version 0.91. The read Soap-Msg is listed below, too. What's wrong??

Thanks for your help!
Chris


--- <Code fragment> ---

// create SOAP Envelope
String filename = "I:\\SoapMsg.xml";
XMLStreamReader xmlr = XMLInputFactory.newInstance()
                .createXMLStreamReader(new FileInputStream(filename));
StAXBuilder builder = new StAXSOAPModelBuilder(xmlr, null); //exception here

--- </Code fragment> ---


--- <Exception> ---

Exception in thread "main" org.apache.axis2.om.OMException:
java.lang.NullPointerException
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.next(StAXSOAPMo
delBuilder.java:345)
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.getSOAPEnvelope
(StAXSOAPModelBuilder.java:149)
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.identifySOAPVer
sion(StAXSOAPModelBuilder.java:104)
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.<init>(StAXSOAP
ModelBuilder.java:98)
        at de.iken.pure.server.PUREClient.request(PUREClient.java:89)
        at de.iken.pure.server.PUREClient.main(PUREClient.java:66)
Caused by: java.lang.NullPointerException
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.constructNode(S
tAXSOAPModelBuilder.java:196)
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.createOMElement
(StAXSOAPModelBuilder.java:164)
        at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.next(StAXSOAPMo
delBuilder.java:302)
        ... 5 more

--- </Exception> ---


--- <TestSOAP.xml> ---

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope";
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding";>

 <soap:Body xmlns:m="http://www.stock.org/stock";>
   <m:GetStockPrice>
     <m:StockName>IBM</m:StockName>
   </m:GetStockPrice>
 </soap:Body>

</soap:Envelope>

--- </TestSOAP.xml> ---






Reply via email to