Hi Sebastian,

What's the servicemix version you are using? Would you please try with the 3.2.2 snapshot?
And please change the locationURI for your provider configuration
locationURI="http://10.11.10.10:8080/BusyServiceWSImpl";  (no need ?wsdl)
If you still have problem. if possible could you append your whole test case, especially the wsdl you are using, I'd like to see the fault in your wsdl Actually we have a test very similar with your scenario, and the exception handle part is always ok, please see [1],
the
//test exception handle
part
[1]http://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderTest.java

Regards

Freeman

Sebastian Kuligowski wrote:
Hello,

I've created proxy scenario using cxf-bc and cxf-se components using

CXF-BC (1) --- CXF-SE bean (2) with injected provider --- CXF-BC (3) to external
endpoint (as described in all tutorials)

The problem:

After receiving fault from external endpoint (3) with a parameter
('errorDesc') included which describes bussiness cause of the fault, that 
parameter
is empty/null after catching exception in my proxy bean.

In logs I could find that the falut is wrapped properly in JBIFalut
object after receiving soap fault from external endpoint: errorDesc
parameter is set with proper message.

  fault: <?xml version="1.0" encoding="UTF-8"?><JBIFault
  xmlns="http://cxf.apache.org/bindings/jbi";><ns2:BusyServiceFault
  xmlns:ns2="http://busy-service.pl/busy/ws";><errorDesc>Defined busy
  period should be independent of other date
  regions.</errorDesc></ns2:BusyServiceFault></JBIFault>
<JBIFault xmlns="http://cxf.apache.org/bindings/jbi";><CalculatorFault xmlns="http://apache.org/cxf/calculator/types";><faultInfo>Numbers: 1, -1</faultInfo><message>Negative number cant be added!</message></CalculatorFault></JBIFault>
But not in catched exception below. My bean with proxied busyService provider:

public class BusyServiceESBImpl implements BusyService {
  private BusyService busyService;  // injected proxied provider

  // exposed by CXF-BC (1)
  public Integer addBusyPeriod(String number) throws BusyServiceFault_Exception 
{
    try {
       return getBusyService().addBusyPeriod(number);
       // external endpoint returns business exception defined in WSDL
    } catch (BusyServiceFault_Exception e) {
       System.out.println(e.getFaultInfo().getErrorDesc());
       // is NULL!!!!!!!!! errorDesc inside BusyServiceFault object is
       lost
       System.out.println(e.getMessage()); // returns faultstring
    }
}

I would be very grateful for any help, I've spent a lot of time on
searching any solution.

Details:

CXF-BC xbean.xml

<cxfbc:consumer wsdl="classpath:BusyService.wsdl"
                targetService="busy-service:BusyService"
                targetInterface="busy-service:BusyService"/>

<cxfbc:provider wsdl="classpath:BusyService.wsdl"
                locationURI="http://10.11.10.10:8080/BusyServiceWSImpl?wsdl";
                service="busy-service:BusyServiceProxy" 
endpoint="BusyServiceProxyPort"
                interfaceName="busy-service:BusyService" />

CXF-SE xbean.xml

<cxfse:endpoint>
   <cxfse:pojo>
     <bean class="busy.esb.BusyServiceESBImpl">
        <property name="busyService">
           <cxfse:proxy service="busy:BusyServiceProxy" context="#context" 
type="busy.ws.BusyService" />
        </property>
     </bean>
   </cxfse:pojo>
</cxfse:endpoint>


Best regards
Sebastian Kuligowski



Reply via email to