OSB - Processing Http errors from Restful service in Proxy Service

I'm invoking a REST service from an OSB Proxy Service, which is working fine if the rest service response is a valid response, i.e., there's no errors. However if the rest service replies with an http error code (e.g. 400 Bad Request), I'm not able to capture anything else except the http error code:

$fault variable in OSB:

<con:fault  xmlns:con="http://www.bea.com/wli/sb/context">
OSB Service Callout action received an error response
<con1:ErrorResponseDetail   xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">

But the rest service, is not only replying with 400 Bad Request, but also adding a message:

    <Message>The message header contains an invalid brand code.</Message>

Which I'm not able to process in my proxy service. Does anyone knows if it is possible to access this message details in OSB or is it a limitation?

The rest service is clearly sending the message, because invoking it directly through soap-ui I'll get the following response:

 HTTP/1.1 400 Bad Request
 Cache-Control: no-cache
 Pragma: no-cache
 Content-Length: 84
 Content-Type: application/xml; charset=utf-8
 Expires: -1
 Server: Microsoft-IIS/8.5
 X-AspNet-Version: 4.0.30319
 X-Powered-By: ASP.NET
 Date: Mon, 09 Feb 2015 16:15:32 GMT

 <Error><Message>The message header contains an invalid brand code.</Message></Error>



I've just found out this is an OSB bug, in case of an HTTP Error code 400 being returned, if the http-content is "Application/XML" the message is ignored.

Oracle released a Patch at the end of last month to fix this issue, which I've tested and it works. I can get the message details in the $body variable now.

Patch: 16986497

If I understand your question, you want to get in addition to the http code, the message error?

I think you should use, in your message flow, an errorHandler , so that you can catch the error and do whatever you want with.

The proxy service operation selection algorithm cannot determine the operation name from the request or returns an invalid operation (one which is not in the WSDL or null). Possible reasons include the following:

An error occurs while computing the operation.

The operation selection algorithm returns null.

The operation selection algorithm returns an operation that is not of the of the operations declared by the WSDL.


Need Your Help

Would using a WSDL to generate REST clients be the wrong direction?

java python perl rest soap

I'm out to create a fairly simple web service for intranet use. The service will ultimately be the interface to a DB that will allow me to keep track of what the various internal tools within the

Upgrading C# project from VS 2010 to 2013; need to make it work for Windows 8 and 10

c# visual-studio-2013 operating-system upgrade

I inherited a C# app written in Visual Studio 2010 professional. From the compile done in VS 2010, the C# app works perfectly in Windows XP and Windows 7.