File Adapter Write Compilation problem JDev 11.1.1.6 and BPEL 2.0

Hi,
Im creating a simple BPEL Project with a One-way Process template project.
I have added just one Partnerlink with a File Adapter to do a write operation.
I have assigned the main process input to the file Write Invoke operation.
But I am getting a compilation error.
Error(81): inputVariable "inputVariable" of type "client:BPELProcessWriteToFileRequestMessage" is not compatible with WSDL message "ns1:Write_msg".
Can you pl help ?
Here is the BPEL syntax :
<?xml version = "1.0" encoding = "UTF-8" ?>
<process name="BPELProcessWriteToFile"
targetNamespace="http://xmlns.oracle.com/FirstApplication/FileWriter/BPELProcessWriteToFile"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:client="http://xmlns.oracle.com/FirstApplication/FileWriter/BPELProcessWriteToFile"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/FirstApplication/FileWriter/WriteTextToFile"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
<import namespace="http://xmlns.oracle.com/FirstApplication/FileWriter/BPELProcessWriteToFile" location="BPELProcessWriteToFile.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="bpelprocesswritetofile_client" partnerLinkType="client:BPELProcessWriteToFile" myRole="BPELProcessWriteToFileProvider"/>
<partnerLink name="WriteTextToFile" partnerLinkType="ns1:Write_plt"
partnerRole="Write_role"/>
</partnerLinks>
<variables>
<variable name="inputVariable" messageType="client:BPELProcessWriteToFileRequestMessage"/>
</variables>
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcessWriteToFile.wsdl) -->
<receive name="receiveInput" partnerLink="bpelprocesswritetofile_client" portType="client:BPELProcessWriteToFile" operation="process" variable="inputVariable" createInstance="yes"/>
<assign name="Assign">
<copy>
<from>string('$inputVariable.payload/client:input')</from>
<to>$inputVariable.payload/client:input</to>
</copy>
</assign>
<invoke name="InvokeWriteTextToFile"
partnerLink="WriteTextToFile" portType="ns1:Write_ptt"
operation="Write"
inputVariable="inputVariable" bpelx:invokeAsDetail="no"/>
</sequence>
</process>

The error seen in your case typically occurs when the schemas of BPEL valriable and the schema of message in file adapter WSDL are different. You may use a transform activity in BPEL to map the fields of the two schemas.
You may also like to have a look at various file adapter examples at
http://java.net/projects/oraclesoasuite11g/pages/FileAdapters
These samples provide working examples of how to handle various kinds of data when using file adapter.
Regards.

Similar Messages

  • File Adapter Write missing files

    Hello
    I have some trouble with a bpel process containing a file adapter that should write files to disk. Each bpel-process is started when a read file adapter reads a new matching file (*.xml).
    I have tested the process with a few files (5-20) and a new process is started for each file, and at the end of the process a new file is written to disk by the file adapter (Write). But when I am testing with a large number of files (40-50 files) something strange happens.
    A new process is started for each file, but it looks like the file adapter that should write files to disk is not capable to handle the pressure. 10-20% of the processes doesnt complete as expected. In the BPEL Console everything looks ok, it seems like the File Adaper has written a file to disk, no error is trown. But when I look in the directory the file is not there...
    Has this something to do with performance? Is there any parameters or settings I can tune to make the file adapters work better? Sometimes it also looks like the file adapter (read) doesnt manage to start a new process for each incomming file even if they are deleted and archived...

    I ran into a similar issue. As a workaround we ended up just using java to write the files out. When the File Adapter attempts to write out a file it first writes that file to a temp file and then copies that to the appropriate directory.
    I believe that when two or more threads were attempting to write at the same time the write was failing for one (but appearing to work in the console logs). I think a race condition may be created when two threads attempt to write using the File Adapter for access to the temp file. I contacted my oracle rep about it but they are always pretty worthless so I havent ever heard anything back concerning the issue.

  • Receiver File Adapter Content Conversion Problem.

    Hi All,
    I am getting in receiver file adapter due to content conversion setting. Problem is that all the fields coming in file adapter are optional. In content conversion , i have specified fieldfixedlengths. So whenever any optional field is not present , it fails . How should we handle it? is there any option to declare fields as optional, I know that is the there for sender adapter. But no. of fields is also very large, so putting each and every field as optional is very time consuming.
    What should i do?
    Ranjeet Singh.

    Hi Daniele,
    Instead of using the standard funciton , i created a UDF for handling this situation.
    My logic is UDF is like
       //write your code here
    int Size = Integer.parseInt(Truncate_Size);
    String Return_Value = "";
         if  (!("".equals(Input)) )
              if  (Input.length() > Size )
                   Return_Value = Input.substring(0,Size);
              else
                   Return_Value = Input.substring(0, Input.length());
         else
              for(int i = 0; i< Size ; i++)
              Return_Value = Return_Value + " " ;
    return Return_Value;
    SO in this case also , it should be able to handle empy source element. But it is not working.

  • File adapter write to network drive fails

    Hi all,
    I have a problem using the FIle adapter. The situation is as follows:
    - SOA Suite 10.1.3.5.0. installed on Windows
    - SOA Suite runs under windows user soaadmin, a user with local admin rights.
    - A network share is mapped as a network drive on a remote (windows) server, assigned drive letter 'T'.
    - user soaadmin is added to a user group on the remote server that has local admin rights on the remote server.
    - In my BPEL process, the file adapter is configured to write files to 'T' drive.
    - At runtime, ORABPEL-11054 occurs: Directory cannot be created successfully. Directory: T:/ cannot be created successfully.
    - If I configure the file adapter to write to 'C' drive all functions well.
    - From the windows explorer, user soaadmin can create files on 'T' successfully soa apparently has the right privileges on 'T'.
    Any clue as to what may be wrong?
    Thanks in advance,
    Regards Rob

    please use FTP adapter instead of File Adapter.
    Thanks,
    Chandra_

  • File Adapter Writting and Reading strategy

    Hi All,
    When i am trying to write data to file, it was opened by another person and it gave error in the receiver communication channel saying like source is using by another application. Which is well and good
    But in case of Sender channel while writing the data to file even thought it is opened by another person, Sender file adapter is picked the file.
    I didn't get the reason why it is like this. Any one of u had the same issue???
    Regards

    Hi Neetesh,
    >>hmm ... that's weird ... you mean to say that the polling frequency is now (20 + 100) = 120 secs ? Unless and until the file is not being modified or the file is not "open", this parameter shouldn't work ...
    Examples
    Poll interval is 20 sec and MSecs to wait is 100000( 1 MIN 40 Sec)
    1) If file is there and did not opened / modifying
    waiting till 1 min 40sec to pick the file
    2) If the file is there and Modifying it
    Adapter is waiting 1 min 40sec if the files have been changed.
    3) If there is a file and just opened, not writing any files
    Waiting for 1 min 40 sec to pick the file
    >>Can you share the adapter log?
    Processing Details for Cluster Node Server 0 10_31463
         5/20/10 3:49:56 PM           Polling interval started. Length: 20.0 seconds
         5/20/10 3:49:56 PM           Processing finished successfully
         5/20/10 3:49:56 PM           Processing started
         5/20/10 3:49:56 PM            4f1e0c5b-9553-4397-30ef-d3bb55a13a48     Processing finished successfully
         5/20/10 3:49:55 PM            4f1e0c5b-9553-4397-30ef-d3bb55a13a48     Message with ID 4f1e0c5b-9553-4397-30ef-
                                                   d3bb55a13a48 processed
         5/20/10 3:48:15 PM           Processing started
         5/20/10 3:47:55 PM           Polling interval started. Length: 20.0 seconds
         5/20/10 3:47:55 PM           Processing finished successfully
         5/20/10 3:47:55 PM           Processing started
         5/20/10 3:47:35 PM           Polling interval started. Length: 20.0 seconds
    Regards
    Edited by: Vamsi Krishna on May 20, 2010 10:50 PM

  • XI3.0 Receiver file adapter write to windows shared drive

    Hi,
    Our XI server SP09 currently runs on windows 2003 server,  I wish to use the receiver file adapter to create a file on another windows server.  I have created a folder on the other server and set permissions so that anyone can read and write to it. 
    The communication channel has been set-up with a target directory of //server/shared_folder/folder and a transport protocol of 'File system(NFS)'
    When I try and send an XML message to the file adapter I get the following error on the runtime workbench :-
    Last message processing started 09:47:10 2005-06-09, Error: Message processing failed with java.lang.Exception: Message processing failed - configuration error in file receiver adapter (Directory does not exist / cannot be created)
    My questions are as follows :-
    a) Do I have the target directory on the communication channel set-up correctly?  i.e. do I use / or \
    b) What username will need to be set-up on the other server so that the file adapter can write to the shared folder
    c) Is there another way of providing user and password information for connecting to the other server?
    Many thanks
    Ian

    Hi Ian
      as i understood from ur description is that u want ur file to b generated in some other machine then u have to mention that machine in ur SLD using correct specification..
    u go thru this link in order to get more Clearance..
    http://help.sap.com/saphelp_nw04/helpdata/en/31/f0ff69551e4f259fdad799a229363e/frameset.htm
    Hope this ll help u.
    Regards
    Shailesh

  • File adapter - Write - Elapsed Time based batching not working.

    We are creating an asynchronous BPEL process that creates a file every 2 mins with the messages the BPEL process received in the last 2 minutes. We are using a file adapter with only "elapsed time" set to 2 minutes (Number of Messages and File size disabled) . If we deploy this into BPEL console and use bpel console's stress test feature, it doesnt create any file at all. If we use a file adapter based on Number of messages, it works fine. Can any one of you suggest what could be the problem ?

    Unfortunately, this is documented bahaviour (solution/workaround anyone?!):
    Elapsed Time Exceeds:
    Specify a time which, when exceeded, causes a new outgoing file to be created.
    Note:
    The Elapsed Time Exceeds batching criteria is evaluated and a new outgoing file is created, only when an invocation happens.
    For example, if you specify that elapsed time exceeds 15 seconds, then the first message that is received is not written out, even after 15 seconds, as batching conditions are not valid. If a second message is received, then batching conditions become valid for the first one, and an output file is created when the elapsed time exceeds 15 seconds.

  • File adapter(write files with same extension as we read them)

    Hello
    I am trying to read file as an attachment using file adapter (it can be of any extension .pdf,.txt,.xml)
    I want to write this file using file adapter with the same extension i.e. whatever is read as it is....I am least bothered for reading the content inside the file so am reading it as an attachment..
    Please if anyone knows the answer..reply....

    I ran into a similar issue. As a workaround we ended up just using java to write the files out. When the File Adapter attempts to write out a file it first writes that file to a temp file and then copies that to the appropriate directory.
    I believe that when two or more threads were attempting to write at the same time the write was failing for one (but appearing to work in the console logs). I think a race condition may be created when two threads attempt to write using the File Adapter for access to the temp file. I contacted my oracle rep about it but they are always pretty worthless so I havent ever heard anything back concerning the issue.

  • File Adapter Write Operation inserts a new line at the end

    Hi,
    I am using the write operation in the File Adapter from BPEL Process. The data is written successfully to the file and file is also created in the location specified in the adapter wsdl. But in the file created, it creates a new line at the end of the file. This new line has to be avoided when writing data to a file.
    Has anyone faced this and solved this ?
    I am SOA 10.1.3.4.
    Cheers,
    - AR

    It is a bug in 10g and will be resolved in one of the versions of 11g.
    Cheers,
    -AR

  • Need to get file name and directory back from file adapter - WRITE

    I am using the file adapter to write a file. I want to log the file name of the file we just created. Since we use a precise timestamp in the file name, I can't accurately guess.
    I have an invoke in my BPEL process to the file adapter. My first try was to assign the jca.file.FileName property to a variable, but it never comes back. I looked around and saw plenty of ways to SET the file name for a write and GET the file name for a read, but no GET file name for WRITE.
    Anyone have a solution?
    Thanks in advance!

    I think I got your point... You can tell FileAdapter the filename to write, but if you don't then FileAdapter can not tell you the filename that it wrote... I think it is pretty possible Oracle didn't implement the latter, as the write operation is probably asynchronous and the filename is calculated later on...
    If what you want is just log, you may achieve your requirement by increasing verbosity on Adapter logs... Have a look at the link bellow...
    http://docs.oracle.com/cd/E15586_01/integration.1111/e10226/ad_mon.htm#CJHHBBID
    Otherwise, the solution for you will be to calculate filename yourself, and that will be a little bit of reinventing the wheel... But at least you will know the filename...
    Cheers,
    Vlad

  • File adapter custom module problem

    Dear All,
    Currently my file adapter is picking up a flat file and I have writeen a module which will remove junk characters from the start of the file...I have also used FCC to convert the flat file to xml.
    now my question is what is the sequence...
    1. is it that my FCC will convert the flat to xml first and then the module will get xml as input
    2. or is it that module will get the flat file as input , it will perform the maipultaions and then my FCC will be called to convert it to xml
    Actually after running the scenraio what we can see in the audit log is
    1.flat file converted ok and then
    2.processing module
    My requirement : module should get a flat file as input and then that module will remove junk char..after this standard FCC should convert it to XML

    1. is it that my FCC will convert the flat to xml first and then the module will get xml as input
    first FCC will get executed then MODULE
    My requirement : module should get a flat file as input and then that module will remove junk char..after this standard FCC should convert it to XML
    Dont use FCC just read .txt file after removing junk character buid the XML file using DOM parser in the MODULE itself.

  • File Adapter write XML file with special characters

    Hi,
    I have a BPEL processes which use DB adapter to retrieve record and output in a XML document using File Adapter.
    In the table, some records contain these special characters - ">" , "<" , "." . I was expecting the file adapter will convert it to escape characters, but it didn't happen. it just put the same value back to the XML file, which cause other system to reject the file. Do anyone know how to resolve this ?
    The version of SOA is 10.1.3.4
    Thanks for the help.
    Calvin
    Edited by: user12018221 on May 25, 2011 1:48 PM

    one option is to specify validateXML on the partnerlink (that describes the file adapter endpoint) such as shown here
    <partnerLinkBinding name="StarLoanService">
    <property name="wsdlLocation"> http://<hostname>:9700/orabpel/default/StarLoan/StarLoan?wsdl</property>
    <property name="validateXML">true</property>
    </partnerLinkBinding>
    hth clemens

  • Need  file adapter polling with read operation to be triggered by a BPEL without using synchronous read

    The scenario is:-
    Web Service Client -->input-->BPEL-->if input valid-->trigger file adapter with read operation--> receive file
    i am not able to stop the polling until it is required to trigger the polling.
    As soon as i deploy the composite the file adapter starts polling without waiting for input.
    Since i am using two receive activities, the second one which is suppose to receive file from file adapter is always showing pending state. (asynchronous callback)

    Hi there,
    IMHO the traditional read is used only as inbound operation, that means
    that it starts polling the input folder as soon as the composite gets
    deployed - which is the same you are experiencing.
    In your case you need an outbound operation that needs to be invoked at
    a certain moment. I don't know what are the reasons not to use sync
    read, but this is the only outbound read operation supported by the
    adapter. If you can not use the sync read, then you would have to design
    some custom solution where you call a web service or EJB for instance
    that reads the desired files.
    Another option I can think of, though have not use personally is using
    the adapters programatically in Java - take a look at this blog post as
    it seems related to this topic -
    https://technology.amis.nl/2012/01/22/using-the-oracle-weblogic-technology-adapters-with-custom-java-message-driven-bean-mdb-triggered-by-file-adapter-part-of-the-story/.
    Hope this helps,
    A.

  • File Adapter write operation behaviour

    Hi,
    We actually have a process which read JMS Messages, and write a file.
    We don't want to have one file for each JMS Message, so we try to use "Number of Messages equals" and "Elapsed time exceeds".
    This is an example of the behaviour we are expecting :
    Elapsed time exceeds = 10s
    Deploy process BPEL / ESB
    0s - 1 JMS incoming
    10s - a file with 1 record is created.
    3 JMS incoming
    20s - a file with 3 record is created.
    2 JMS incoming
    30s - a file with 2 record is created.
    What happens in reality :
    0s - 1 JMS incoming
    10s - No file generation
    1 JMS incoming => a file with the previous record is created.
    2 JMS incoming
    20s - No file generation
    1 JMS incoming => a file with the 3 previous records is created.
    1 JMS incoming
    30s - No file generation
    If no JMS are incoming during 3 month... didn't have any file for my 2 last JMS Messages.
    The trigger to check the condition of creation of the files seems to be a new process call.
    So... is it the normal behaviour ? Is it a bug ? Are we making something wrong ?
    The problem exist also for "Number of Messages equals".
    I think many people use this, how do you do to resolve this problem ?

    Unfortunately, this is documented bahaviour (solution/workaround anyone?!):
    Elapsed Time Exceeds:
    Specify a time which, when exceeded, causes a new outgoing file to be created.
    Note:
    The Elapsed Time Exceeds batching criteria is evaluated and a new outgoing file is created, only when an invocation happens.
    For example, if you specify that elapsed time exceeds 15 seconds, then the first message that is received is not written out, even after 15 seconds, as batching conditions are not valid. If a second message is received, then batching conditions become valid for the first one, and an output file is created when the elapsed time exceeds 15 seconds.

  • File Adapter Write: Howto read partnerLinkBinding "logical path"-property?

    A process writes a file to a fileserver, and further down the process I'd like to publish the path+filename of the written file to an external partnerLink.
    I'm looking for something similar to ora:getPreference(), but instead reading a spesific partnerLinkBinding property not just the preferences-section property of bpel.xml.
    alternative 1) From within the BPEL-process I configure a logical path, but I can't see any api for reading that value (my property "OutBoundFiles").
    The value is read and used by the jca:operation within the FileWriter, and I supply a static value for it in the bpel.xml, like in:
    <partnerLinkBinding name="OutboundFileWriter">
    <property name="wsdlLocation">FileWriter.wsdl</property>
    <property name="OutBoundFiles">\\fileserver\OutboundDir</property>
    </partnerLinkBinding>
    alternative 2) The FileWriter wsdl OutboundHeader_msg has the one-and-only element "fileName", which also contains what I'm looking for.
    But I can't see how to read this element either, probably because the BPEL-team don't expose the value, due to the fact that they don't support writing to the element (there is no support for writing files to a dynamic path in version 10.1.2).
    Current workaround:
    Currently I use a preference property in which I copy the "OutBoundFiles"-value, and read it runtime using ora:getPreference(). Not a beauty.

    alternative 3)
    One could use a simple copy rule, by reading the bpel.xml-file:
    <copy>
    <from expression="ora:doc( 'bpel.xml', '/BPELSuitcase/BPELProcess/partnerLinkBindings/partnerLinkBinding[ @name = &quot;OutboundFileWriter&quot; ]/property[ @name = &quot;OutBoundFbFiles&quot; ]') "/>
    <to variable="emailpayloadUNCPath"/>
    </copy>

Maybe you are looking for

  • Instead of Trigger Error

    Hi ALL, I am trying to create INSTEAD OF trigger on the existing VIEW, but I getting error as:- Not found The requested URL /apex/wwv_flow.show was not found on this server I'm creating trigger as :- CREATE OR REPLACE TRIGGER "trigger_name" INSTEAD O

  • ITunes crashes when I try to sync. HELP!!!

    I have a 60gb "new to me" iPod. I have the latest software updates for my iPod and iTunes but when I connect my iPod to my computer for it to automatically sync, iTunes crashes!!!! I've already tried to restart my computer and restore my iPod several

  • Mail sending from 2 gmail accounts at the same time

    I currently have 2 gmail accounts, one is a Personal account that I use 90% of the time and the other is a Family account. I have them set up to sync through Apple Mail. Since upgrading to Mavericks, whenever I send an email from my Personal account,

  • Change DNS Order

    I'd like to know if there is a way to change dns order. I know in Tiger, in the network preferences, it was just a textbox and all I had to do was move them around. Leopard comes out and the dns servers interface is now a + and - thing. There's no wa

  • Apps in the backround

    why wont apple lets apps run in the backround like aim?