Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 51671 invoked from network); 26 Feb 2008 19:01:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2008 19:01:50 -0000 Received: (qmail 25555 invoked by uid 500); 26 Feb 2008 19:01:40 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 25235 invoked by uid 500); 26 Feb 2008 19:01:39 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 25213 invoked by uid 99); 26 Feb 2008 19:01:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 11:01:39 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 19:01:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 20A3029A0015 for ; Tue, 26 Feb 2008 11:00:51 -0800 (PST) Message-ID: <994690955.1204052451132.JavaMail.jira@brutus> Date: Tue, 26 Feb 2008 11:00:51 -0800 (PST) From: "Davanum Srinivas (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Resolved: (AXIS2-3149) org.apache.axis2.saaj.SOAPConnectionImpl(line # 181) Null checking is required In-Reply-To: <4920563.1187881591008.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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 = ""; > 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