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.....

Similar Messages

  • 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?

  • 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

  • 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.

  • 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

  • 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

  • Base64Binary OSB and File Adapter Issue

    Hi all,
    I am converting an xml to flat file after that i want to write the flatfile to a file using File Adapter in OSB.
    So using java callout we converted the binary content to base64 string and we are able to write the data using file adapter .
    But the file contains as extra line in between each line which my legacy system wont accept.
    I printed the base64 string in the output file and when i decode that file using the website as safe decode as text i am able to get the correct file.
    So where is the problem ? File Adapter ? Why i am getting extrace line in between each line . How to write safely using file adapter.
    If i use file transport of OSB i am able to write without any issues but i want to write dynamic location so i am looking for file transport of OSB.
    Thanks
    Phani

    Hi Anju,
    Thanks for the response . If i decode the base64 binary data using this website if i use Notepad++ i cant see an extra line in the notepad++ it showing as below
    Its a fixed length file 1 to 513 then next line so for the file transport it showing as below
    ISA ............................
    1 to 513 CRLF
    For file adapter it is showing as below in the same notepad++ editor
    ISA..........................
    1 to 513 CR
    CRLF
    an extra CR so an extra line .
    I used MFL and converted the xml to non-xml ( flat file fixed length file) for file transport i am i created another proxy message type Text .It is working fine
    Added to the above problem i have another few questions on the file transport
    How can append to an exiting file using File transport ?
    How to change the File directory dynamically ?

  • OSB Error in deploying a project with jca file adapter

    Hi,
    I am facing an issue where I am getting an error when deploying a service from Eclipse. I am using OSB/SOA 11.1.1.5 2 node cluster. I have an OSB service where I am writing to a file and am using file adapater. I created a composite with file adapter to write a file then imported .jac, .wsdl and composite into eclipse and generated a business service out of .jca file. When I deploy the project from eclipse I am getting the below error and am not able to deploy the project.
    Conflicts found during publish.
    Invalid JCA transport endpoint configuration, exception: javax.resource.ResourceException: Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    I have FileAdapter deployed and pointed to OSB manage servers cluster. Here is a snippet of config.xml.
    <app-deployment>
        <name>FileAdapter</name>
        <target>SOA_Cluster,OSB_Cluster</target>
        <module-type>rar</module-type>
        <source-path>/app/oracle/fmw/Oracle_SOA1/soa/connectors/FileAdapter.rar</source-path>
        <deployment-order>321</deployment-order>
        <plan-dir xsi:nil="true"></plan-dir>
        <plan-path>/app/oracle/shared/SOA_Cluster/dp/FileAdapterPlan.xml</plan-path>
        <security-dd-model>DDOnly</security-dd-model>
        <staging-mode>nostage</staging-mode>
      </app-deployment>
    Also inside console -> deployments  -> FileAdapter -> Targets and OSB_Cluster is checked also.
    Here is the .jca file
    <adapter-config name="writeFile" adapter="File Adapter" wsdlLocation="writeFile.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory location="eis/HAFileAdapter"/>
      <endpoint-interaction portType="Write_ptt" operation="Write">
        <interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
          <property name="PhysicalDirectory" value="C:\ORACLE"/>
          <property name="Append" value="false"/>
          <property name="FileNamingConvention" value="a_%SEQ%.doc"/>
          <property name="NumberMessages" value="1"/>
        </interaction-spec>
      </endpoint-interaction>
    </adapter-config>
    Any idea what might be wrong.
    Thanks.

    I already have the fileAdapter JNDI is already configured in console. The error I am getting is during the deployment
    Conflicts found during publish.
    Invalid JCA transport endpoint configuration, exception: javax.resource.ResourceException: Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    Thanks

  • File Adapter Transactional in SOA and OSb

    Hi All,
    Is file adapter transactional in SOA and OSB. I have a requirement where a inbound file adapter polls for a file and it is consumed by a topic.If topic is down,how can I know that the same file will goes to topic when is up(how can I make it transactional).I want to do this both in SOA ans OSB.
    Any help would be appreciated.
    Thanks,
    Kumar.

    Hi Kumar,
    File Adapter itself is NON TRANSACTIONAL...
    4.2.9 Nontransactional
    The Oracle File Adapter picks up a file from an inbound directory, processes the file, and sends the processed file to an output directory. However, during this process if a failover occurs in the Oracle RAC back end or in an SOA managed server, then the file is processed twice because of the nontransactional nature of Oracle File Adapter. As a result, there can be duplicate files in the output directory.
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/adptr_file.htm#BABIEBJF
    Cheers,
    Vlad

  • Capability of File Adapter Framework in OSB

    Hi,
    Has anyone ever used the file adapter framework within Oracle Service Bus to capture data / transform using XSLT and then publish that data out to a service?
    Would greatly appreciate any experiences in this area, I know that this functionality exists in SOA suite and can be enhanced with BPEL.
    If anyone know of any limitations of OSB in this area that would also be good to know.
    Thanks
    K

    Hi,
    There's no problem in doing this. You can use a file adapter or the file transport.
    When using the file transport, it is possible to convert a flat-file structure to XML (and vice-versa) by using MFL. For more information on MFL: [http://biemond.blogspot.com/2008/12/flat-file-to-xml-with-oracle-service.html]

  • File Adapter debatching in OSB

    Hi,
    I have to debatch a large XML file using File Adapter. I imported the JCA service into OSB project and the debatching works well. Now I need to find out if the current batch is the last batch read from the file? Is there some property etc to find this?
    Thanks for your help.
    Regards,
    sagol

    Thanks !
    I am now facing another problem:The flow is like this
    Proxy Service polls the data --->Business Service--->File
    My requirements are:
    1.convert this into csv--> For this I have created a MFL and used XQuery to map from the database xsd to the MFL
    2.Updated the BS to use MFL.(A small doubt:Where do I specify that I file to be written is csv)
    3.Where do I specify the name of the file to be written
    4.In the proxy service I used routing to the BS.But I didnot apply the messaging constructs such as assign,insert etc ..But the csv file is not written by BS(actually I donot know the usage)
    Please let me know if I am missing any step!
    The error message it shows
    <Jun 17, 2009 7:37:19 PM IST> <Error> <JCATransport> <BEA-381951> <JCA inbound r
    equest only invocation failed, exception: java.security.PrivilegedActionExceptio
    n: com.bea.wli.sb.transports.TransportException: General runtime error: Failed t
    o transform MFL content from XML to binary
    java.security.PrivilegedActionException: com.bea.wli.sb.transports.TransportExce
    ption: General runtime error: Failed to transform MFL content from XML to binary
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:373)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.bea.wli.sb.transports.jca.binding.JCAInboundRequestListener.sendM
    essage(JCAInboundRequestListener.java:156)
    at com.bea.wli.sb.transports.jca.binding.JCAInboundRequestListener.post(
    JCAInboundRequestListener.java:71)
    Truncated. see log file for complete stacktrace
    com.bea.wli.sb.transports.TransportException: General runtime error: Failed to t
    ransform MFL content from XML to binary
    at com.bea.wli.sb.transports.TransportException.newInstance(TransportExc
    eption.java:195)
    A lot of thanks!!!
    Regards
    Prabal
    Edited by: user123 on Jun 17, 2009 7:08 AM

  • 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

  • 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 or File  Transport which one will give more performance

    Hi all,
    File Adapter or File Transport which one will give more performance ? in OSB?
    Which one to select any one did performance analysis?
    Thanks
    Phani

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • File attachment in OSB

    Hello,
    I need your help in dealing with File attachments in OSB using JCA integration.
    My requirement is Read file as attachment with File Adapter and write to a remote location with FTP adapter.
    I successfully created the business and proxy services to do so and it can transfer the file to new location too. But in the remote server I see the attachment reference instead of original file contents.
    InputFile:
    customer_1234.txt
    asldfkjsadf
    akdshfksajdh
    aksjdfafasdf
    output file in remote server:
    cust_1234.txt
    <?xml version="1.0" encoding="UTF-8" ?><attachmentElement href="-1172596423/cust_12345.csv_1351025265000" xmlns="http://xmlns.oracle.com/pcbpel/adapter/file/attachment/"/>
    so my question is how to get the contents of the file in the remote location instead of its reference when file attachment option is used. what could be in either business or proxy service to get it correctly.
    Thanks,
    Nex.

    Hi,
    You need an assign to extract the content of the attachment into a variable before passing it to the business service.
    http://docs.oracle.com/cd/E23943_01/admin.1111/e15867/context.htm#i1103309
    As an alternative, see if this sample can help you... It's a totally different approach though...
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#BABJBIAD
    Cheers,
    Vlad

Maybe you are looking for

  • Accounts merge on my new iPhone 5

    Hi, I connected my new phone to my computer and my wife's iTunes account merged with mine. Now when I go to my app store it always ask me for her password. I have on my phone my apple id, and in the computer I'm login to my account. how can I fix thi

  • Gmail apple id to .me?

    How do is switch from using my gmail account as my apple id to only having the .me account I made through it? I would just rather have full use over apple's icloud than using multiple servers and accounts.

  • Material Determination - quantity check in sales order

    Hi everyone. Hope all is good. I have a doubt in Material Determination. If I need to substitute a product in Material Determination, how can I come to know whether the quantity of the replacement material that is replacing the substitute material is

  • Is there a way to automatically display a Word document in Print Layout view?

    I am using Report Generation Toolkit (v.1.0.1). After displaying the report, the view in Microsoft Word is always "Normal." It would be really nice to automatically show it in "Print Layout" view. (i.e. in Word, go to View >> Print Layout) Is there a

  • HELP DateTimeAxis

    Hi, I want to display the horizontal axis in the linear graph as DateTimeAxis. I am using Date.parse() function to convert string to date. such as.. Date.parse("2005/12/23 12:00:33") Now.. the label in the graph only displays "2005/12/23"), but not t