Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 89984 invoked from network); 20 May 2009 07:31:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 May 2009 07:31:04 -0000 Received: (qmail 63899 invoked by uid 500); 20 May 2009 07:31:17 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 63850 invoked by uid 500); 20 May 2009 07:31:17 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 63840 invoked by uid 99); 20 May 2009 07:31:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 07:31:17 +0000 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; Wed, 20 May 2009 07:31:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C519B234C004 for ; Wed, 20 May 2009 00:30:45 -0700 (PDT) Message-ID: <169753141.1242804645793.JavaMail.jira@brutus> Date: Wed, 20 May 2009 00:30:45 -0700 (PDT) From: "Ashwin Deepak Kondhalkar (JIRA)" To: issues@cxf.apache.org Subject: [jira] Commented: (CXF-1417) SOAPFaultException built programmatically and thrown in a JAX-WS handler are not correctly populated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711045#action_12711045 ] Ashwin Deepak Kondhalkar commented on CXF-1417: ----------------------------------------------- hi, I am still facing this issue, even if I am using CXF2.1. Will you kindly guide, how this issue can be fixed? Thanks & Regards Ashwin > SOAPFaultException built programmatically and thrown in a JAX-WS handler are not correctly populated > ---------------------------------------------------------------------------------------------------- > > Key: CXF-1417 > URL: https://issues.apache.org/jira/browse/CXF-1417 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.1 > Environment: whatever > Reporter: Davide Gesino > Assignee: Daniel Kulp > Fix For: 2.0.5, 2.1 > > > Create a SOAPFaultException filled with a SOAPFault and throw it from a JAX-WS Hander. > On the other side some content of the SOAPFaultException is missing. > Here is a code that can be tried: create a SOAPHandler with the following handleMessage(). > public boolean handleMessage(SOAPMessageContext ctx) { > Boolean outboundProperty = (Boolean) ctx > .get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); > if (!outboundProperty) { > SOAPMessage msg = ctx.getMessage(); > SOAPBody body; > try { > body = msg.getSOAPBody(); > SOAPFault fault = body.addFault(); > QName faultName = new QName(SOAPConstants.URI_NS_SOAP_ENVELOPE, > "Server"); > fault.setFaultCode(faultName); > fault.setFaultActor("http://gizmos.com/orders"); > fault.setFaultString("Server not responding"); > Detail detail = fault.addDetail(); > QName entryName = new QName("http://gizmos.com/orders/", > "order", "PO"); > DetailEntry entry = detail.addDetailEntry(entryName); > entry.addTextNode("Quantity element does not have a value"); > QName entryName2 = new QName("http://gizmos.com/orders/", > "order", "PO"); > DetailEntry entry2 = detail.addDetailEntry(entryName2); > entry2.addTextNode("Incomplete address: no zip code"); > throw new SOAPFaultException(fault); > } catch (SOAPException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > return true; > } > This is what I would expect: > > soapenv:Server > Server not responding > http://gizmos.com/orders > > Quantity element does not have a value > Incomplete address: no zip code > > > And this is what I get: > > soap:Server > Server not responding > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.