8 Replies Latest reply on Sep 13, 2014 10:30 AM by Magesh Bojan

    fault handling with resteasy composite reference

    Jeff Bride Novice


        I'm using switchyard version 1.1.1-p5-redhat-1 provided by FSW 6.0.0.GA-redhat-4.

        My application has a composite reference using a resteasy binding making invocations to remote REST services.

        The following is the root stacktrace when the resource that my resteasy composite reference is not available:


      Caused by: org.jboss.resteasy.client.ClientResponseFailure: Error status 404 Not Found returned

      at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:523)

      at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:514)

      at org.jboss.resteasy.client.core.BaseClientResponse.checkFailureStatus(BaseClientResponse.java:508)

      at org.jboss.resteasy.client.core.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:38)

      at org.switchyard.component.resteasy.util.ClientInvoker.invoke(ClientInvoker.java:291)

      at org.switchyard.component.resteasy.OutboundHandler.handleMessage(OutboundHandler.java:138)


      I'd like my app to be a bit more specific about the actual fault. 

      The URL used by the resteasy client is generated dynamically at run-time  (similar to how the URL to invoke the Warehouse resource is generated dynamically at runtime in the rest-binding quickstart ).

      So ideally i'd like my app to be overt about the HTTP URL that was actually used by the composite reference when the fault occurs.


      Any thoughts on how best to do that ?

      Enabling Messaging Trace in the SY composite doesn't provide these resteasy specific details.

      also, I don't seem to be able to get to these details via either a SY Interceptor nor an Auditor.

      org.switchyard.component.resteasy.util.ClientInvoker alludes to a set of ClientErrorInterceptors that could be potentially added .... but i'm not sure if this is actually possible (maybe in the SY subsystem of standalone.xml )?


      thank you!  jeff