Showing posts with label OSB. Show all posts
Showing posts with label OSB. Show all posts

Wednesday, 19 June 2013

Oracle Serive Bus: Get file name from proxy service

The following is how to get the file name of a file that is being processed by a proxy service in OSB.

1. We can get the URI via the $inbound context variable with the following XPath:
$inbound/ctx:transport/ctx:request/tp:headers/file:fileName

This results in:
<file:fileName
xmlns:file="http://www.bea.com/wli/sb/transports/file">
c:\temp\input\2635978486281_
test.xml</file:fileName>

2. To get the filename only, use the tokenize function (which returns the characters after the last "\\":
tokenize($inbound/ctx:transport/ctx:request/tp:headers/file:fileName, "\\")[last()]

Monday, 26 November 2012

Unexpected error during Oracle Service Bus synchronization.

I was attempting to export my OSB project as a Jar in Eclipse OSB 11g, but I was getting this error (visible in the Problem tab) which was halting my progress:

Unexpected error during Oracle Service Bus synchronization. Please see the logs for more information.

A solution I found for this was:

  1. Close all projects (including the OSB Configuration Project) in the Eclipse Project Explorer, except for the OSB Project you are trying to export.
  2. Refresh the OSB Project
  3. Reopen the OSB Configuration Project that corresponds to the OSB project