Hi, I have a service based on the Provider class and have tried the following faultTo tests, in both cases triggering the fault by having "schema validation" enabled and sending an invalid message: 1. Use no decoupled endpoint on the client for replyTo (normal two way web service), and specify a faultTo of "http://localhost:9003/faultPath". The server throws the fault from the invalid message and sends it back as a normal reply- ignoring the faultTo address. 2. Using a decoupled endpoint on the client for replyTo(one way web service with callback), and specify a faultTo of "http://localhost:9003/faultPath". The server throws the fault from the invalid message and sends it to the replyTo URL instead of the faultTo URL.
Are there only some types of faults that cause faultTo to be used? The CXF-4382 issue seems to indicate that both one-way and two-way messages should work: https://issues.apache.org/jira/browse/CXF-4382 Following is CXF debug logging from the client I created to test this (showing the #1 case for normal two way web service), with the outbound message violating schema to get the fault. I checked this with Wireshark and it's clearly a normal two-way operation with the faultTo address ignored. ************************************ INFO: Outbound Message --------------------------- ID: 3 Address: http://localhost:9003/xdsregistryb Encoding: UTF-8 Http-Method: POST Content-Type: application/soap+xml Headers: {Accept=[*/*]} Payload: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing">http://cxf.apache.org/jaxws/dispatch/DocumentRegistry_PortType/InvokeRequest</Action><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:2eae8433-d42a-4749-b053-f5b5805fe8e9</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:9003/xdsregistryb</To><ReplyTo xmlns="http://www.w3.org/2005/08/addressing"><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo><FaultTo xmlns="http://www.w3.org/2005/08/addressing"><Address>http://localhost:9003/faultBack</Address></FaultTo></soap:Header><soap:Body><query:xyz xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"></query:xyz></soap:Body></soap:Envelope> -------------------------------------- Jul 23, 2013 12:59:05 PM org.apache.cxf.services.DocumentRegistry_Service.DocumentRegistry_Port_Soap12.DocumentRegistry_PortType INFO: Inbound Message ---------------------------- ID: 3 Response-Code: 500 Encoding: UTF-8 Content-Type: application/soap+xml; charset=UTF-8 Headers: {content-type=[application/soap+xml; charset=UTF-8], Server=[Jetty(8.1.7.v20120910)], transfer-encoding=[chunked]} Payload: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing"/><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:241ae851-a174-4715-a191-8e9d2fc4e243</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:9003/faultBack</To><RelatesTo xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:2eae8433-d42a-4749-b053-f5b5805fe8e9</RelatesTo></soap:Header><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Sender</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">Could not parse the XML stream caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'query:xyz' ************************************** Thanks, Jesse
