Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 9839 invoked from network); 10 Oct 2007 20:22:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2007 20:22:24 -0000 Received: (qmail 31583 invoked by uid 500); 10 Oct 2007 20:22:11 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 31568 invoked by uid 500); 10 Oct 2007 20:22:11 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 31559 invoked by uid 99); 10 Oct 2007 20:22:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 13:22:11 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2007 20:22:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 35347714241 for ; Wed, 10 Oct 2007 13:21:52 -0700 (PDT) Message-ID: <4627319.1192047712215.JavaMail.jira@brutus> Date: Wed, 10 Oct 2007 13:21:52 -0700 (PDT) From: "Daniel Kulp (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Resolved: (CXF-1028) Fault is being returned as general SOAPFaultException instead of specific fault In-Reply-To: <6196471.1189991492072.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/CXF-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-1028. ------------------------------ Resolution: Fixed Fix Version/s: 2.0.2 > Fault is being returned as general SOAPFaultException instead of specific fault > ------------------------------------------------------------------------------- > > Key: CXF-1028 > URL: https://issues.apache.org/jira/browse/CXF-1028 > Project: CXF > Issue Type: Bug > Affects Versions: 2.0.1, 2.1 > Environment: Mac OS X 10.4.10 > Reporter: Richard Mixon > Assignee: Daniel Kulp > Fix For: 2.0.2 > > Attachments: acmeSTP.jar > > > I posted on the cxf-user list - my WSDL and the SOAP log. On the surface things looked like they should be working. both Daniel Kulp and Jervis Liu responded. > Jervis Liu suggested I zip up my code and post it as a JIRA incident so it could be better looked at. > I have zipped up a simplified version of my code that still shows the wrong exception being caught. I did ommit the jar files (commons-logging, cxf, etc) to reduce space - so the zip is very small ~ 115KB. > I have dummied things out - no database access or anything. > My original post is titled "Not able to catch desired Fault type" and was posted at 8:15MST on September 12. > Below is the text of the original post. I will attach my code (as I mentioned above). > Thank you - Richard Mixon > ------ Forwarded Message > From: Richard Mixon > Date: Wed, 12 Sep 2007 20:15:46 -0700 > To: > Conversation: Not able to catch desired Fault type > Subject: Not able to catch desired Fault type > I would appreciate some help trying to understand how to catch faults that are defined in my WSDL in a Java client. > My web service appears to be correctly throwing a specific Fault - MemberExistsFault - when trying to add a record and the member already exists. > However when I catch it on the client, I am not able to catch a MemberExistsFault. Instead the exception can be caught as a > javax.xml.ws.soap.SOAPFaultException > which in turn has a cause of > org.apache.cxf.binding.soap.SoapFault. > Here is what the log shows on the server: > INFO: Outbound Message > -------------------------------------- > > > > > soap:Receiver > > > > Member cannot be added, it is already in the database > > > > > myEmail3@myDomain.com > myLastName > myFirstName3 > > > > > > -------------------------------------- > Below are the key parts of the WSDL (I can send the whole thing if necessary). > Thanks in advance - Richard > > targetNamespace="http://service.webservice.acme.com/" > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > xmlns:ns1="http://service.webservice.acme.com/" > xmlns:tns="http://types.webservice.firedrum.com/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> > > xmlns:tns="http://types.webservice.acme.com/" > attributeFormDefault="unqualified" elementFormDefault="unqualified" > targetNamespace="http://types.webservice.acme.com/"> > ... > type="tns:MemberIdInfoType"> > > > > > > > > > > > ... > > > > > ... > > > > > message="ns1:addMemberResponse"> > > message="ns1:InvalidClientFault"> > > message="ns1:MemberExistsFault"> > > message="ns1:InvalidEmailAddressFault"> > > message="ns1:CategoryNotFoundFault"> > > message="ns1:CustomFieldTypeNotFoundFault"> > > > > > type="ns1:MemberService"> > transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" /> > > > > > > > > > > > > > > > > > > binding="ns1:MemberServiceServiceSoapBinding"> > > > > > ------ End of Forwarded Message -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.