cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Mazza (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1136) Custom exception not appearing in SOAP fault response
Date Fri, 26 Oct 2007 13:21:53 GMT

    [ https://issues.apache.org/jira/browse/CXF-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537955
] 

Glen Mazza commented on CXF-1136:
---------------------------------

OK, so once you get a reasonable approximation of your WSDL, why not modify it to add in the
exceptions that you want, and then run wsdl2java, saving the artifacts from the java->wsdl
process (if any) that you wish to reuse?  Your source of record should still be the WSDL,
even if you mocked up java objects to approximate it.

Trying to torture your Java-first code to get a precise WSDL is difficult and time-consuming
if you're not open to manual modification of the WSDL after you generate a workable approximation
of it.  It's beyond my scope of knowledge, but perhaps more experienced users can help you
here.

Have you looked at the WSDL on the server (viewable from your browser) as a result of your
Java-first approach, and determined that it is equivalent to the WSDL that would work with
exceptions under a WSDL-first approach?  I.e., my sample I linked to earlier, definitely handles
exceptions properly, but it is WSDL-first.  Is your Java-first WSDL equivalent in structure?
 If not, exceptions probably aren't going to work the way you want, and efforts would probably
need to be made towards generating an equivalent WSDL--either by manual modification or Java
class manipulation--before exceptions will work properly.


> Custom exception not appearing in SOAP fault response
> -----------------------------------------------------
>
>                 Key: CXF-1136
>                 URL: https://issues.apache.org/jira/browse/CXF-1136
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: WIndows XP
> Java SDK 1.5_0_12
>            Reporter: ed p
>            Priority: Critical
>         Attachments: helloWorld.wsdl, java_first_jaxws.zip
>
>
> I modified the apache-cxf-2.0.2-incubator\samples\java_first_jaxws web service to throw
a custom exception and a custom request and response object like so:
> public interface HelloWorld {
>     Response sayHi(Request text) throws CustomException;
> }
> CustomException is a CustomExceptionBase with two string properties. CustomExceptionBase
is a java.lang.Exception
> The CustomException appears in the WSDL but the CustomExceptionBase is missing. When
the service is invoked and throws a CustomException the soap response is:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>    <soap:Body>
>       <soap:Fault>
>          <faultcode>soap:Server</faultcode>
>          <faultstring>custom error</faultstring>
>       </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
> I am expecting to see the CustomException serialized in the Envelope/Body/Fault/detail
node.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message