1 Reply Latest reply on Aug 11, 2016 10:31 AM by sonyjop

    JBoss Fuse Camel-CXF Producer endpoint with HTTP 202

    sonyjop

      I am trying to access a WebService operation with 'void' response using camel-cxf endpoint in POJO mode. Appears like it results assuming the call as http 202 for every case including negative scenario, like basic authentication failure.

      Incase of basic authentication failure it does not wait to process http 500 as the endpoint is 'InOnly'.

       

      Could anyone please suggest me what would the workaround be in this scenario.

        • 1. Re: JBoss Fuse Camel-CXF Producer endpoint with HTTP 202
          sonyjop

          I were able to manage this by a tweak.. not sure this can be classified as a actual/perfect solution.

           

          Observation: CXF produces in POJO mode when encountering a oneway operation assumes the endpoint to be "InOnly" hence from a route perspective it is a fire and forget - which indicates that even in an event of exception from the Target WebService provider the route will not wait to receive it.

           

          Tweak-Solution: I have changed the target service's correspondiong wsdl file in such a way that the particular operation is got a response of type String (an arbitrary response) - this made the generated(out of wsdl to java pluggin) client code not having 'one-way' annotation which turn makes the CXF endpoint not to be "InOnly" exchange pattern.

           

          Now, we are able to see response in case of a fault - eg: http 500/401 etc.

           

          It would be helpful in case experts over here could comment so to identify a better approach.