You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2008/03/11 03:24:50 UTC
[jira] Commented: (CXF-1458) SOAPFaultException thrown from
@WebServiceProvider class is not correctly populated
[ https://issues.apache.org/jira/browse/CXF-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577283#action_12577283 ]
Daniel Kulp commented on CXF-1458:
----------------------------------
We now have a systest that does this exact thing:
http://svn.apache.org/repos/asf/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/provider/HWDOMSourcePayloadProvider.java
and that is passing.
Any chance this could be retested with the latest snapshots? If it still fails, I'll probably need a full reproduceable example since the tests created based on the above information pass fine.
> SOAPFaultException thrown from @WebServiceProvider class is not correctly populated
> -----------------------------------------------------------------------------------
>
> Key: CXF-1458
> URL: https://issues.apache.org/jira/browse/CXF-1458
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0.4, 2.0.5
> Environment: Windows XP, JDK1.5.0_12, Tomcat 5.5.25
> Reporter: Steve Wu
>
> My issue is similar to cxf-1417. I downloaded cxf 2.0.5 (2-22-08) but it doesn't solved my problem.
> @WebServiceProvider()
> @ServiceMode(value = Service.Mode.PAYLOAD)
> public class TestGreetingProvider
> implements Provider<DOMSource>
> {
> @Resource
> private WebServiceContext context;
> //~ Constructors -------------------------------------------------------------------------------
> public TestGreetingProvider()
> {
> }
> //~ Methods ------------------------------------------------------------------------------------
> public DOMSource invoke(DOMSource request)
> {
> try
> {
> // do some thing
> }
> catch(Exception e)
> {
>
> SOAPFactory factory = SOAPFactory.newInstance();
> SOAPFault soapFault = factory.createFault();
>
> soapFault.setFaultString("Test Fault String ****");
> Detail detail = soapFault.addDetail();
> detail = soapFault.getDetail();
> QName qName = new QName("http://www.Hello.org/greeter","TestFault","ns");
> DetailEntry de = detail.addDetailEntry(qName);
> qName = new QName("http://www.Hello.org/greeter","ErrorCode","ns");
> SOAPElement errorElement = de.addChildElement(qName);
> errorElement.setTextContent("errorcode");
>
> throw new SOAPFaultException(soapFault);
>
> }
> // return DOMSource here
> }
> }
> I am expecting the following fault message in the client:
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <soapenv:Fault>
> <faultstring>Test Fault String ****</faultstring>
> <detail>
> <ns:TestFault xmlns:ns="http://www.Hello.org/greeter">
> <ns:ErrorCode xmlns:ns="http://www.Hello.org/greeter">errorcode</ErrorCode>
> </ns:TestFault>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> But I got the following in the client when using cxf 2.0.4. NOTE: The detail section is missing.
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soap:Server</faultcode>
> <faultstring>Test Fault String ****</faultstring>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> If I use cxf 2.0.5(2-22-08) I didn't see any response in my TCPMonitor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.