DB Adapter in OSB

I have configured a JCA DB Adapter in OSB with a custom SQL query which is
INSERT INTO "SYSTEM"."LOG_DETAIL" (LOG_ID, LOG_MESSAGE) VALUES (#logID, #logMessage)
I created a business service (using WSDL of the DB Adapter). I am calling this business service from my proxy service using the 'Publish' activity. In the request action of the publish activity I have assigned $body values to logID, logMessage. But this is not working and the adapter errors out.
I want to insert the data from $body to my table. Any suggestions?

AFAIK, there is a defined structure of body for DB operations and for insert, it looks like below -
<dat:TableNameCollection xmlns:dat="http://xmlns.oracle.com/pcbpel/adapter/db/top/DatabaseOutbound">
<!--Zero or more repetitions:-->
<dat:TableName>
<dat:C1>value</dat:C1>
<dat:C2>value</dat:C2>
<dat:Cn>value</dat:Cn>
</dat:TableName>
</dat:TableNameCollection>
You may like to use x-query to prepare this structure using inputs from the $body of incoming request, and then you need to replace the current $body content with the content prepared by X-query and then you may successfully call BS.
Regards,
Anuj

Similar Messages

  • FTP Adapter on OSB - how to specify logical directory path

    I am using the ftp adapter on osb 11g (Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Thu Aug 19 02:10:08 PDT 2010 ] Oracle Weblogic Server Version: [WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 ])
    I defined the ftp adapter using jdev and imported the jca artifacts into osb.
    I created a business service using jca adapter to put the file to the ftp server.
    The problem is the write directory on the ftp server is different for each environment - DEV, QA, PROD.
    I used a physical directory specification when defining the adapter in JDEV because it wasn't clear from the help how i would override a logical directory during deployment to osb (it is clear if deploying to soa suite).
    Is there a way to override this dynamically override this directory at runtime. Or even better a way to override during deployment time?

    You do it either way....
    Import the SBConfig jar into the sbconsole and change the value in the JCA file
    or
    Re: Customizing JCA FTP Adapter properties in OSB

  • File adapter in OSB

    Hi ,
    I am trying to use file adapter in OSB. My intention is the OSB should write a file in a specified location in my sytem. I have configured the Business Service with Messagin service in (general tab), request msg as text and response msg as none in(messagin tab), protocol as file in (transport tab), prefix as AddUser suffix as *.txt* in (file transport tab).
    whenever i give input in proxy service it writing the file at the specified location, but the issue is,it writes the file name as AddUser3225734920456246193--12c3763f.132dd1769a3.-7f5b.txt . i dont need this part(AddUser3225734920456246193--12c3763f.132dd1769a3.-7f5b) in file name which is written. can anyone tell me how i can solve this?
    Any help is appreciated.
    thanks

    Hi,
    We can go with transport JCA FILE for file writing into the specified location.
    Create a file adapter in jdeveloper with all specified things like (file name,physical path location and schema).This creates the jca and wsdl file in jdevloper copy this to eclipse(OEPE) and later u can create business service based on jca file in eclipse.Or else in osb sbconsole copy import related jca and wsdl files and create business service based on this.This process wil create file in particular location with name specified in the jca file in particular location.....

  • FTP Adapter in OSB

    Hi Guys,
    I have used an FTP adapter in OSB and it is working fine. What I want to do is to override the Delete File setting for the adapter.
    I don't want to delete(or archive) the file/s (scenario e.g. is that I have to send the same file over and over again).
    Please suggest. Thanks in advance.

    Hi,
    You can overide the Delete File setting by using a logical name instead of a physical path to the folder.
    When you use logical names for the file read and archive locations, two properties are added to the service/reference binding with the name you have given them in the wizard.
    The value between the tags can be overwritten. Initials they''re blank/empty.
    <property name="fileDelLoc" type="xs:string" many="false" override="may">c:\temp\out</property>
    <property name="fileLoc" type="xs:string" many="false" override="may">c:\temp\in</property>
    These properties can be changed on deployment time with a configuration plan or on runtime via the EM in the settings page of the service binding.
    <service name="ReadFileService">
      <property name="fileDelLoc">
         <replace></replace>
       </property>
       <property name="fileLoc">
         <replace></replace>
       </property>
       <binding type="jca"/>
    </service>
    Cheers,
    Robert van Mölken
    Senior Oracle Integration Specialist

  • How to use Oracle File Adapter in OSB

    We are trying to use File Adapter in OSB 11g. Is it supported in this version? If yes then some one can specify a document which contains File Adapter - OSB integration steps.

    according to the ESB JCA transport:
    [ESB JCA|http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jca.htm#i1106345]
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jca.htm#i1106345
    there is only these adapters:
    _25.2.1 Adapter Support_
    The Oracle Service Bus JCA transport lets you interact with the following JCA-compliant adapters:
    Oracle Adapter for Oracle Applications
    Oracle JCA Adapter for AQ
    Oracle JCA Adapter for Database
    Oracle JCA Adapter for Files
    Oracle BAM Adapter (Business Activity Monitoring)
    PeopleSoft (Oracle Application Adapters 10g)
    SAP R/3 (Oracle Application Adapters 10g)
    Siebel (Oracle Application Adapters 10g)
    J.D. Edwards (Oracle Application Adapters 10g)
    See the following guides for more information on Oracle adapters:
    I wanna use FTP Adapter and MQ Adapter in Oracle ESB 11.1.1.3, can we make it?

  • SOA BAM Adapter for OSB 11g ?

    Hi,
    I would like to find out if SOA 11g BAM adapter is certified for use with OSB 11g. Please let me know if you have information regarding this.
    Thank you

    pls refer
    https://svgonugu.wordpress.com/2011/10/01/using-bam-adapter-in-osb/
    http://docs.oracle.com/cd/E14571_01/doc.1111/e15866/jca.htm

  • File Adapter in OSB 11g

    Hi
    I am using a File Adapter created to read a file using OSB 11.1.1.3.0. But after i publish that osb project, i am getting the below warning and file is not been polled by the proxy.
    ####<Feb 23, 2011 10:08:30 AM IST> <Warning> <JCA_FRAMEWORK_AND_ADAPTER> <wipro-e16351a68> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <dcc2d8a908de630a:59887477:12e50cc23d3:-7ff2-0000000000000084> <1298435910015> <BEA-000000> <PollWork::run exiting, Worker thread will die>
    After 600 secs i could see StuckThread error in server.
    ####<Feb 23, 2011 10:15:01 AM IST> <Error> <WebLogicServer> <wipro-e16351a68> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <dcc2d8a908de630a:59887477:12e50cc23d3:-7ff2-0000000000000092> <1298436301203> <BEA-000337> <[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "601" seconds working on the request "weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl@dd20cd", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
         java.lang.Object.wait(Native Method)
         oracle.tip.adapter.file.inbound.FilesToProcess.dequeueToProcess(FilesToProcess.java:101)
         oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:269)
         weblogic.work.ContextWrap.run(ContextWrap.java:41)
         weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please help what is going wrong in my approach.
    Thanks,
    Sesha

    I even tired creating a new WM thread and assigned to this proxy.
    I have chosen MaxThreadsConstraint option with Maximum of 5 concurrent thread.
    Also i have enabled Ignore Stuck Threads in that WM thread.
    Now i dont see any thread stuck in the server log, but sametime the file is not been picked by the Proxy which means the error is suppressed alone from displaying in logs..
    Thanks,
    Sesha

  • How to set 'error' status with DB poll Adapter in OSB

    1. Configured DB Adapter to poll rows with status 'notprocessed' and set the status to 'processed'
    2. Configured FTP Adapter to write fetched rows from DB into a CSV file
    Now my requirement is if any error like FTP server is not available, how to set the status in DB table to 'error'

    Yes Vlad you are right, this will avoid another DB connection created in Error Handler.
    I hope this will provide some lights on the usefulness of "Transaction"
    http://www.nysolutionsltd.com/transaction-handling-in-oracle-service-bus/
    http://kd-blog-tech.blogspot.com.au/2010/12/transaction-management-for-osb-service.html
    Regards
    RK
    Edited by: RK.. on 27/03/2013 17:10

  • Singleton JCA DB Adapter in OSB

    Hi,
    I am planning to use the JCA DB Adapter for polling insert/update events in a database in OSB 11g. Basically I am creating the jca adapter in JDeveloper, then generate the proxy service from OEP Eclipse and import the project into OSB. The Proxy is working fine by polling the events, but it needs to run in cluster and so I want to know how to make the adapter as a singleton ?
    Any thoughts are really appreciated.
    Thanks!

    aren't the default cluster aware settings enough for this ?
    http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    Scalability
    you could enable a few in the adapter wizards

  • When we should use JMS based proxy services and when JMS Adapter in OSB

    Hi,
    Can somebody explain me when we could go for JMS Adapter and when we should go for JMS based service in OSB?
    The one scenerio i can think of is when my provider/consumer is using jms provider other than WLS jms provider we should use jms adapter.
    Edited by: user12883209 on Jan 5, 2012 5:29 AM

    I don't think there are clear guidelines available, however here is my view.
    1) OSB 11gR1 is not certified with Oracle JMS Adapter. It is certified with Oracle FTP, Database, AQ and application adapters.
    http://docs.oracle.com/cd/E21764_01/doc.1111/e15867/interop.htm#OSBAG1403
    2) In addition of the Weblogic JMS, OSB can also integrate with following provider without using adapter.
    - WebSphere MQ
    - Tibco EMS
    3) if you need to integrate JMS with BPEL Process or Oracle SOA suite composite, it has built in support for generic Oracle JMS adapter. Oracle generic JMS adapter can integrate with AQ JMS (JMS providers OJMS 8.1.7, 9.0.1.4, and 9.2), TIBCO JMS, IBM Websphere MQSeries (IBM MQSeries JMS 6.0), Weblogic JMS, Apache, and Active MQ
    http://docs.oracle.com/cd/E14571_01/integration.1111/e10231/adptr_jms.htm
    4) If you need to integrate OSB with Weblogic JMS, WebSphere MQ, Tbco EMS it does not need JMS adapter.
    Hope this helps !!!
    Jayesh Patel
    http://jayesh-patel.blogspot.com/
    http://www.yagnasys.com/

  • Poll the new or changed records use DB Adapter in OSB Cluster

    Hi!
    I have an OSB Cluster which is included two servers: osbServer1 & osbServer2.
    I need to poll a view V_TMS_GOODS, and I use the "SequencingPollingStrategy" to implement it. The following is my JCA config:
    <adapter-config name="getGoodsInfoFromERP" adapter="Database Adapter" wsdlLocation="getGoodsInfoFromERP.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/DB/shaphar" UIConnectionName="shaphar" adapterRef=""/>
    <endpoint-activation portType="getGoodsInfoFromERP_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="getGoodsInfoFromERP.VTmsGoods"/>
    <property name="QueryName" value="getGoodsInfoFromERPSelect"/>
    <property name="MappingsMetaDataURL" value="getGoodsInfoFromERP-or-mappings.xml"/>
    <property name="PollingStrategy" value="SequencingPollingStrategy"/>
    <property name="SequencingColumn" value="LAST_MODIFY_DATE"/>
    <property name="PollingInterval" value="60"/>
    <property name="MaxRaiseSize" value="50"/>
    <property name="MaxTransactionSize" value="unlimited"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    <property name="SequencingTable" value="EDI_TRANS_TIMELOG"/>
    <property name="SequencingTableKeyColumn" value="TRANS_TYPE"/>
    <property name="SequencingTableValueColumn" value="LAST_TRANS_DATE"/>
    <property name="SequencingTableKey" value="V_TMS_GOODS"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    The question is:
    If I check the "Distributed Polling" box in the JCA Configuration Wizard, the sequence table will have two records for the polling Sequencing, just like the following:
    TRANS_TYPE LAST_TRANS_DATE
         V_TMS_CLIENT     2011/12/19 16:23:36     
    V_TMS_CLIENT     2011/12/19 16:23:36
    If I don't check it, the records is single
    And weither I check "Distributed Polling" box or not, the two servers will poll the view twice(one server one times); For example: There are one thousand records in this view, but all the records will be polled twice by the osbServer1 & osbServer2. Finally the client will get tow thousand duplicate records。
    So, how can I make a balance with the two servers or use the one server to execute the polling?
    Thank you for your help!

    aren't the default cluster aware settings enough for this ?
    http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    Scalability
    you could enable a few in the adapter wizards

  • Reading large file with JCA Adapter in OSB

    Hello,
    We are searching for a solution how to read large file (>50M) from network drive and deliver it to queue via OSB 11gR4 (10.3.4). The problem is when reading the file with JCA File Adapter. It seems that it cannot handle as large files as we have. The documentation provides a way to bypass file size limitation by using Chunk Read but it seems to require BPEL Process execution which is not possible in our environment. Does anyone know if there are ways to implement this without having BPEL Process?
    Our usecase:
    read file from network drive -> transfer with OSB -> deliver MQ
    Other options than JCA File Adapter can be considered, if anyone can advice...

    If it's a plain routing use case and no message processing is required then you may simply use OSB's FILE transport instead of JCA adapter. Create a messaging type proxy service and select request message type as "binary". Also enable the content streaming (Disk buffer, compression).
    From OSB Dev guide -
    Oracle JCA Adapter for FTP and Files – Attachments (large payload support), pre- and post-processing of files, using a re-entrant valve for processing ZIP files, content streaming, and file chunked read are not supported with Oracle Service Bus.
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/jca.htm#BABBICIA
    You may also refer -
    Reading huge flat file in OSB 11gR1
    Regards,
    Anuj

  • High Availability File Adapter in OSB

    If you use the JCA FileAdapter in OSB, it is necessary to use the eis/HAFileAdapter version, to ensure that only one instance of the adapter picks up a file; you must then configure a coordinator, by setting the
    controlDir, inboundDataSource, outboundDataSource, outboundDataSourceLocal, outboundLockTypeForWrite
    parameters.
    controlDir refers to the filesystem, the others to the DB
    This document http://www.oracle.com/technetwork/database/features/availability/maa-soa-assesment-194432.pdf says
    "Database-based mutex and locks are used to coordinate these operations in a File Adapter clustered topology. Other coordinators are available but Oracle recommends using the Oracle Database."
    Using a Oracle Database as coordinator means using RAC, otherwise no HA.
    I wonder if anybody has been successful setting up HAFileAdapter without using a DB?
    If DB is required, I am considering using the good old "native" OSB File Poller, since it doesn't require complicated setup to be run in a cluster... but I don't want to use MFL, I would rather use the XSD-based Native Format. Here comes the second question:
    Is it possible to use the nXSD translator using the OSB Native File Poller - instead of the JCA Adapter?
    Thank you so much for your help - it will be rewarded with "helpful/answered" points .
    pierre

    I wonder if anybody has been successful setting up HAFileAdapter without using a DB?
    I have not tried it but I think there are several options available invlucing writing your own custom mutex. Please find the details in Oracle File and FTP Adapters High Availability Configuration section on this link
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10106/ha_soa.htm#sthref434
    Is it possible to use the nXSD translator using the OSB Native File Poller - instead of the JCA Adapter?
    When you create a JCA Adapter based Proxy Service to read the files, the nXSD translation happens before the proxy service is invoked. JCA Engine first reads the data, translates using nXSD and then invokes the Proxy with the translated content. (You can verify this easily by creating a JCA based file read service and open the test console for it in sbconsole, it will show you XML request instead of native).
    So you can not read the text content using File Transport of OSB and then calling nXSD directly or calling an nXSD based Proxy Service.
    HOWEVER, you certainly can use file and nXSD in a combination if thats what you want.
    1. Create a Synchronous Read File Adapter with an nXSD created for it
    2. Create a Business Service for that Synchronous Read JCA in OSB
    3. Create a File Transport based service in OSB which will read the content of file and then call the Business Service to again read the content (which will include the translation using nXSD defined in step one to convert the content to XML).
    So basically you will need to read the file twice! Once using File Transport Proxy service (which will take care of polling in cluster) and then using Sync Read JCA based business service(which will do nXSD translation). To reduce the impact of reading the file twice you can use trigger files. File Proxy to read trigger file and and invoke JCA business service to read the actual file for that trigger.
    Another alternative can be to create a similar class as present here(http://blogs.oracle.com/adapters/entry/command_line_tool_for_testing) but instead of writing a file it will just return the translated content. Call this class with native content from the File Transport proxy using a Java Callout to do the translation.

  • Problem with File Adapter in OSb

    Hi All,
    I have a scenario where I need to read 2 data files based on a trigger file.Ex: ABC.TRG file should poll ABC1.DATA and ABC.2 DATA files from the same directory.If by any chance,If the second data file is not read, I need to rollback the first one also.I just need to pass only metadata of my .DATA files.I am able to do one .TRG file and one .DATA file in OSB. But I am struck with processing 2 different DATA files and one TRG file.I have tried like this:Using read operation I created a proxy service and in my message flow ,using service callout I tried to get metadata of  .DATA files (I used synchread  for this JCA) .But when I use service callout, I was not able to get metadata of my .DATA files.
    Any help would be appreciated.
    Thanks,
    PK.

    Can you try this :
    <getWidgetsResponse>
              <getWidgetsResult>           
    for $widget in $yourwidgetresponseelement/widgets/widget
    return
    <widget>
    <widgetnumber> { data($widget/widgetnumber) }</widgetnumber>
    <widgetclass> { data($widget/widgetclass) }</widgetclass>
    </widget>
              </getWidgetsResult>
    </getWidgetsResponse>
              or change the
              { data($widget/widgetnumber) }</widgetnumber> }
    { data($widget/widgetclass) }</widgetclass> }
    in
              $widget/widgetnumber
                   $widget/widgetclass
    Good luc.
    havent tested it, but should be something like this

  • Configuring File adapter for OSB

    Hi,
    I wish to process invoice data that will be in the csv file . The structure of the file is as following :
    $H$<<Supplier Name>>,<<Supplier Site>>,<<Invoice Number>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    $H$<<Supplier Name>>,<<Supplier Site>>,<<Invoice Number>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    The intent is to configure the file adapter in such a fashion that it rejects the entire invoice if there are any errors in any of the lines that belong to that invoice. The invoices that follow the erred inovice should be processed normally. How do I configure the adapter to achieve this? Any help is greatly appreciated.

    Hi,
    Configuring the adapter for rejecting the invalid invoice rows is not possible. Adapter should be configured as usual to read all the rows. Once the rows are read, you can have all validation in the proxy service. If you find any invalid rows, you can write those rows to a saperate file so that it can be corrected and fed again. And all the other valid rows can be sent for further processing.
    Thanks,
    Vishwa

Maybe you are looking for