You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2007/11/12 17:33:50 UTC
[jira] Assigned: (AXIS2-3149)
org.apache.axis2.saaj.SOAPConnectionImpl(line # 181) Null checking is
required
[ https://issues.apache.org/jira/browse/AXIS2-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepal Jayasinghe reassigned AXIS2-3149:
----------------------------------------
Assignee: sumedha rubasinghe
> org.apache.axis2.saaj.SOAPConnectionImpl(line # 181) Null checking is required
> ------------------------------------------------------------------------------
>
> Key: AXIS2-3149
> URL: https://issues.apache.org/jira/browse/AXIS2-3149
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: client-api
> Affects Versions: 1.1.1
> Reporter: Jayanta Sarkar
> Assignee: sumedha rubasinghe
> Priority: Blocker
>
> I have written a client program as below to send a soap message. When I response envelope reaches if it does not contain any soap header it throws a null pointer exception. I found that there is no null checking at the line # 181 of the org.apache.axis2.saaj.SOAPConnectionImpl class and respOMSoapEnv.getHeader() returns null value.
> Below is the client code to send the request envelope.
> ..............................................
> String xmlInput = "<xml payload>";
> Document docBody = loadDocument(new StringReader(xmlInput));
> MessageFactory factory = new MessageFactoryImpl();
> SOAPMessage soapMsg = factory.createMessage();
>
> SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
> SOAPConnection con = conFactory.createConnection();
> // Point to the service we want to call, and then call it. Store the response
> // in the "reply" object.
> URL endPoint = new URL("http://localhost:8080/WebServiceTrn/services/CTSTrainingService");
>
> SOAPPart sp = soapMsg.getSOAPPart();
> SOAPEnvelope se = sp.getEnvelope();
>
> SOAPBody sb = se.getBody();
> sb.addDocument(docBody);
> SOAPMessage reply = con.call(soapMsg,endPoint);
> reply.writeTo(System.out);
> ..............................................
> As the Axis2 implementation is the urgent requirement of our project, please advise accordingly as soon as possible.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org