Error while using “Routing Table” option in Proxy Service in OSB


I have created Business and Proxy services in my OSB console. I have used “Custom Query” option while creating the Database Adapter and I’m passing one input parameter to the query. My input parameter is “Name“.

Based on the input values for this parameter, I need to pass a corresponding values to the query. For example, If I pass the following values to “Name” input parameter (India) I need to pass “Value1” to my query –

India –> Value1
China –> Value2
America –> Value3

To achieve this requirement, I have used “Routing Table” option. I have specified the values as follows –

Expression – $body/fet:FetchCustDataInput/fet:Name
Operator- ‘=’
Compare value – India
Service – “My Webservice”
Operaton- “My Service Operation”

In the “Request Actions:” I have added the “Add an Action –> Messaging Processing –> Replace” and provided the following values –

Replace <XPath> = $body/fet:FetchCustDataInput/fet:Name
in Variable = “Name”
with Expression = xs:string(‘Value1’)
and selected “Replace node contents” option.

No validation errors I faced. I have created the Routing table in Proxy service. But when I try to execute the proxy service in my Test Console, I get the following error message –

“The invocation resulted in an error: Unknown error while processing message for service ProxyService OSBQueryService/FetchByCustomQuery/FetchByCustomQueryPS.”

I have even enabled “Direct call” and “Include Tracing” options as well. The message under “Tracing” give “(echoing request)
Routed Service. No Service has been invoked, the request is echoed.

After struggling and trail and error method, I have found the solution for this issue. I was using wrong value for my “in Variable” tag. It should be as follows –

Replace <XPath> = $body/fet:FetchCustDataInput/fet:Name
in Variable = body
with Expression = xs:string(‘Value1’)
and selected “Replace node contents” option.

By changing the “in Variable” value form “Name” to body, My proxy service worked as expected.

This entry was posted in Oracle Service Bus (OSB) and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s