axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-3149) org.apache.axis2.saaj.SOAPConnectionImpl(line # 181) Null checking is required
Date Tue, 26 Feb 2008 19:00:51 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Davanum Srinivas resolved AXIS2-3149.
-------------------------------------

    Resolution: Fixed

> 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


Mime
View raw message