Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 79279 invoked from network); 18 Apr 2008 04:14:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2008 04:14:34 -0000 Received: (qmail 60049 invoked by uid 500); 18 Apr 2008 04:14:33 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 59997 invoked by uid 500); 18 Apr 2008 04:14:33 -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 59986 invoked by uid 99); 18 Apr 2008 04:14:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Apr 2008 21:14:32 -0700 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; Fri, 18 Apr 2008 04:13:57 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 07FEE234C0DB for ; Thu, 17 Apr 2008 21:11:22 -0700 (PDT) Message-ID: <349166961.1208491882018.JavaMail.jira@brutus> Date: Thu, 17 Apr 2008 21:11:22 -0700 (PDT) From: "Amila Chinthaka Suriarachchi (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-3749) Invalid soap fault In-Reply-To: <2102183005.1208442442157.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-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590281#action_12590281 ] Amila Chinthaka Suriarachchi commented on AXIS2-3749: ----------------------------------------------------- private static void setFaultCode(MessageContext messageContext, String faultCode, String faultSubCode) { SOAPFactory soapFac = OMAbstractFactory.getSOAP12Factory(); SOAPFaultCode soapFaultCode = soapFac.createSOAPFaultCode(); if (messageContext.isSOAP11()) { soapFaultCode.setText(faultCode); } else { SOAPFaultValue soapFaultValue = soapFac.createSOAPFaultValue(soapFaultCode); soapFaultValue.setText(SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX + ":" + SOAP12Constants.FAULT_CODE_SENDER); SOAPFaultSubCode soapFaultSubCode = soapFac.createSOAPFaultSubCode(soapFaultCode); SOAPFaultValue soapFaultSubcodeValue = soapFac.createSOAPFaultValue(soapFaultSubCode); soapFaultSubcodeValue.setText(AddressingConstants.WSA_DEFAULT_PREFIX + ":" + faultCode); if (faultSubCode != null) { SOAPFaultSubCode soapFaultSubCode2 = soapFac.createSOAPFaultSubCode(soapFaultSubCode); SOAPFaultValue soapFaultSubcodeValue2 = soapFac.createSOAPFaultValue(soapFaultSubCode2); String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION); if (namespace == null) { namespace = Final.WSA_NAMESPACE; } OMNamespace wsaNS = soapFac.createOMNamespace(namespace, AddressingConstants.WSA_DEFAULT_PREFIX); soapFaultSubcodeValue2.declareNamespace(wsaNS); soapFaultSubcodeValue2 .setText(AddressingConstants.WSA_DEFAULT_PREFIX + ":" + faultSubCode); } } messageContext.setProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, soapFaultCode); } have a look at this method. I think this line cause this error soapFaultSubcodeValue.setText(AddressingConstants.WSA_DEFAULT_PREFIX + ":" + faultCode); first of all why it sets the faultCode as sopaFaultSubcodeValue? is this a mistake. I'll have another look and attached a patch > Invalid soap fault > ------------------ > > Key: AXIS2-3749 > URL: https://issues.apache.org/jira/browse/AXIS2-3749 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Reporter: Amila Chinthaka Suriarachchi > Priority: Blocker > > I invoke a service which has engaged Addressing with an invalid action (by a mistake) and I got this exception > java.lang.NullPointerException > at org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(AddressingInFaultHandler.java:96) > at org.apache.axis2.engine.Phase.invoke(Phase.java:295) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) > at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:363) > at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) > at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:441) > at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) > at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) > at java.lang.Thread.run(Thread.java:595) > this exception happens at here. > faultLocalName = subCode.getValue().getTextAsQName().getLocalPart(); > Then I look at the soap fault. > > > http://www.w3.org/2005/08/addressing/fault > urn:uuid:6C771F78868CBF931B1208441597970 > > > > > soapenv:Sender > > wsa:ActionNotSupported > > > > The [action] cannot be processed at the receiver. > > > > urn:PlainTestInOutOperation1 > > > > > > if we look at this line > wsa:ActionNotSupported > the prefix wsa is not declared. > I think this means Axiom does not serialize soap envelop properly when there a TextQNames. -- 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