Question

I am experiencing a problem with soap webservices: when a fault occurs, the request gets echoed as a response.

The flow of the request is the following:

Html -> OSB#1 -> Java -> OSB#2 -> BackEnd Service

When the input request raises no errors, I get what was expected and everything works fine.

Instead, when I should be getting an error, some weird stuff happens:

  1. If I call the service from the debugging console of OSB#2, I get the error message I expected.
  2. If I call from the OSB#1 (or Html aswell) I get a Java error (XMLStreamReaderException) because OSB#2 echoed the XML I sent as a request.

My question is: is this a documented behaviour? How can I avoid it?

I tried googling, but I didn't find anything useful.

Was it helpful?

Solution

I am not sure where I should refer you regarding the documentation of this behavior, but I had the same issue. In order to get an SOAP fault whenever an error occurs, in all your proxy services:

  1. Add an Error Handler to the service
  2. Add a Stage inside the error handler
  3. Add a Reply inside the stage and select the With Error option

So the flow will be like below:

enter image description here

OTHER TIPS

Request is echoed when you are not using the route node. I am not really clear about how are you making call to OSB#2 - is it through Java code which you call or through Service callout?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top