How to retain the same input filename with FileAdapter

I use FileAdapter to read a file. I need to archive the file using the same filename. So I copied the input file to another FileHeader then write the file to the archived directory using FileAdapter. But the archived file does not retain the original filename. Here is a section of my code:
<variable name="Variable_FileHeader" element="ns2:InboundFileHeaderType"/>
<variable name="Variable_Archive_FileHeader" element="ns2:OutboundFileHeaderType"/>
<receive name="Receive_FileReader" partnerLink="FileReader" portType="ns1:Get_ptt" operation="Get"
variable="Receive_FileReader_Get_InputVariable" createInstance="yes" bpelx:headerVariable="Variable_FileHeader"/>
<assign name="Archive">
<copy>
<from variable="Receive_FileReader_Get_InputVariable" part="opaque"/>
<to variable="Invoke_Archive_Put_InputVariable" part="opaque"/>
</copy>
<copy>
<from variable="Variable_FileHeader" query="/ns2:InboundFileHeaderType/ns2:fileName"/>
<to variable="Variable_Archive_FileHeader" query="/ns2:OutboundFileHeaderType/ns2:fileName"/>
</copy>
</assign>
<invoke name="Invoke_FileArchive" partnerLink="FileArchive" portType="ns3:Put_ptt" operation="Put"
inputVariable="Invoke_Archive_Put_InputVariable" bpelx:headerVariable="Variable_Archive_FileHeader"/>
in the FileArchive.wsdl, I did not remove the FileNamingConvention line because if I removed it, the compiler will complain:
<jca:operation
PhysicalDirectory="D:\projects\Butterfield Bank\BPEL-ESB\FileConverter\files_archived"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="Archive_%SEQ%.txt" <=== what should I put here to retain the same filename?????
OpaqueSchema="true" >
</jca:operation>
The file being archived still have the convention Archive1.txt and not using the original filename.
Thanks for any help
AJ

Hi,
I have done the same thing and I don't face any problem. Below is the code:
<variables>
<variable name="Receive_1_Read_InputVariable" messageType="ns1:Read_msg"/>
<variable name="Invoke_1_Write_InputVariable" messageType="ns2:Write_msg"/>
<variable name="InFile" messageType="ns4:InboundHeader_msg"/>
<variable name="OutFile" messageType="ns4:OutboundHeader_msg"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<receive name="Receive_1" partnerLink="Read" portType="ns1:Read_ptt"
operation="Read" variable="Receive_1_Read_InputVariable"
createInstance="yes" bpelx:headerVariable="InFile"/>
<assign name="Assign_1">
<copy>
<from variable="Receive_1_Read_InputVariable" part="opaque"
query="/ns3:opaqueElement"/>
<to variable="Invoke_1_Write_InputVariable" part="opaque"
query="/ns3:opaqueElement"/>
</copy>
<copy>
<from variable="InFile" part="inboundHeader"
query="/ns4:InboundFileHeaderType/ns4:fileName"/>
<to variable="OutFile" part="outboundHeader"
query="/ns4:OutboundFileHeaderType/ns4:fileName"/>
</copy>
</assign>
<invoke name="Invoke_1" partnerLink="Write" portType="ns2:Write_ptt"
operation="Write" inputVariable="Invoke_1_Write_InputVariable"
bpelx:inputHeaderVariable="OutFile"/>

Similar Messages

  • How to retain the same resolution while croping a tiff image using jai api

    Hi all,
    I have designed a program to crop a tiff image.But after croping the tiff,the resultant file resolution is not the same as the original source file.
    In the program,the source file Nadeshiko_v1_02.tif has the resolution(X) of 1200 DPI and resolution(Y) has 1200 DPI pixels.
    But after croping the resolution of output file is 100 DPI.
    Please give me some idea on how to retain the same resolution.
    <code>
    package jai;
    import java.awt.Frame;
    import java.awt.image.RenderedImage;
    import java.awt.image.renderable.ParameterBlock;
    import java.awt.image.renderable.RenderableImage;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.imageio.*;
    import javax.imageio.stream.ImageOutputStream;
    import javax.media.jai.Interpolation;
    import javax.media.*;
    import javax.media.jai.JAI;
    import javax.media.jai.PlanarImage;
    import javax.media.jai.RenderedOp;
    import javax.media.jai.widget.ScrollingImagePanel;
    import com.sun.media.jai.codec.FileSeekableStream;
    import com.sun.media.jai.codec.SeekableStream;
    import com.sun.media.jai.codec.TIFFEncodeParam;
    import javax.media.jai.OperationDescriptorImpl;
    import java.io.*;
    import java.util.Iterator;
    import javax.media.jai.operator.*;
    // import javax.media.jai.widget.ScrollingImagePanel;
    public class crop {
              /** The main method. */
    public static void main(String[] args) {
    /* Validate input. */
    /* if (args.length != 1) {
    System.out.println("Usage: java JAISampleProgram " +
    "input_image_filename");
    // System.exit(-1);
    float a=(float) 70.3;
    float b=(float) 70.4;
    float c=(float) 3100.3;
    float d=(float) 5522.4;
    * Create an input stream from the specified file name
    * to be used with the file decoding operator.
    String TIFF="TIFF";
    FileSeekableStream stream = null;
    try {
         stream = new FileSeekableStream("D:\\tif images\\Nadeshiko_v1_02.tif");
    // stream = new FileSeekableStream("D:\\tif images\\Nadeshiko_v1_01.jpg");
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(0);
    // Load the source image from a Stream.
    RenderedImage im = JAI.create("stream", stream);
    RenderedImage image2= CropDescriptor.create(im, a, b, c, d, null);
    ScrollingImagePanel panel = new ScrollingImagePanel(image2, 100, 100);
    // Create a frame to contain the panel.
    Frame window = new Frame("JAI Image Cropping");
    window.add(panel);
    window.pack();
    // window.show();
    // Define the source and destination file names.
    // String inputFile = "D:\\tif images\\Nadeshiko_v1_05.tif";
    String outputFile = "D:\\tif images\\Nadeshiko_v1_04.tif";
    // Save the image on a file. We cannot just store it, we must set the image encoding parameters
    // to ensure that it will be stored as a tiled image.
    TIFFEncodeParam tep = new TIFFEncodeParam();
    tep.setWriteTiled(true);
    tep.setTileSize(80,80);
    JAI.create("filestore",image2,outputFile,"TIFF",null);
    try {
                   stream.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    </code>
    Thanks,
    Sanat Meher

    Try the following,
    TIFFEncodeParam tep = new TIFFEncodeParam();
    // Create {X,Y}Resolution fields.
    TIFFField fieldXRes = new TIFFField(0x11A, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_X, 1}});
    TIFFField fieldYRes = new TIFFField(0x11B, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_Y, 1}});
    tep.setExtraFields(new TIFFField[] {fieldXRes, fieldYRes});

  • How to use the same OC4j server with different port number

    How to use the same OC4j server with different port numbers..?
    I have to OC4J installed on my machine on different hard disk drives....
    I want to be able to run both the server simultaneously..?
    is it possible ..it yes then how..?
    for that i have changed the port number of one server...
    but when i am trying to start the other server with different port number..it says that JVM -Bind already...
    Is there any clues...?
    Nilesh G

    In the config directory:
    default-web-site.xml: Change the port the HTTP listener listens on
    jms.xml: Change the port the JMS service listens on
    rmi.xml: Change the port the ORMI listener listens on.
    Or, you can add another web-site.xml file, and deploy your applications to 1 server, and bind the web applications to the different web sites. This way you only have to deploy your applications to 1 place.
    Rob
    Oracle

  • How to download the same song(track) with different keys? iTunes seems to think I have already downloaded the song and will not download the song in a different key of the Demo Track

    How to download the same song(track) with different keys? iTunes seems to think I have already dowloaded the song and will not let me download the song in a different key or the Demo.

    Hello Jigz19,
    It sounds like you are unable to play a couple of songs from your library becuase you get a message that the computer is unauthorized to play, but other content purchased that same day works without issue. I would verify that the affected songs were purchased with the same Apple ID first:
    Recovering a forgotten iTunes Store account name
    http://support.apple.com/kb/ht1920
    Open iTunes
    Highlight one of the items you have purchased (You can find your purchases in your Purchases playlist).
    Choose File > Get Info.
    Click the Summary tab.
    The Account Name area will list the account used to purchase the item. Unless you have changed accounts, this is your iTunes Store account name.
    If so, then delete the songs:
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store
    http://support.apple.com/kb/HT5772
    Then re download them with this article:
    Download past purchases
    http://support.apple.com/kb/ht2519
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • How to register the same schema with same URL

    I'm getting ORA-31085 error when try to register the same schema with same URl.
    My requirement is that I should be able to reregister the same schema with the same URL .
    I'm using the following function :
    PROCEDURE validateXmlSchema(inp_xmlMsg IN VARCHAR2,
    out_isValidDoc IN OUT NUMBER,
    inp_xmlSchema IN OUT VARCHAR2,
    out_varchar_notused OUT VARCHAR2)IS
    xmldoc XMLType;
    res number;
    BEGIN
    xmldoc := XMLtype(inp_xmlMsg);
    res := xmldoc.isSchemaValid(inp_xmlSchema);
    IF (xmldoc.isSchemaValid = 1) THEN
    out_isValidDoc := 1;
    ELSE
    out_isValidDoc := 0;
    END IF;
    END validateXmlSchema;
    This is used recursively.Until the schema is not validated for a given URL this function should keep on throwing error and once the schema is validated the data should be inserted in the DB.
    But its not happening as of now instead the ORA-31085 is thrown second time.
    Plz provide pointers to solve the issue.

    "mjs" <[email protected]> wrote in message
    news:g7kjk5$o6$[email protected]..
    > "mjs" <[email protected]> wrote in message
    > news:g7gl2g$i3d$[email protected]..
    >> "Zorrrro" <[email protected]> wrote
    in message
    >> news:g7gcjv$a6n$[email protected]..
    >>> I'm completely nuckered trying to find an answer
    for this...
    >>>
    >>> Does anyone know how to keep the same width an
    position of the submenus
    >>> of a
    >>> horizontal dropdown menu?
    >>> Thank you in advance.
    >>>
    >>> Cheers.
    >>
    >> Doesn't a simple style="width:200px" in the input
    tag work?
    >
    > I'll asume the answer is "yes", then. ;) You're welcome.
    I believe the OP is talking about a dropdown menu like this
    one
    http://www.tjkdesign.com/articles/keyboard_friendly_dropdown_menu/default.asp
    not about a "select menu".
    I could be wrong though...
    Thierry
    Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    http://developer.yahoo.com/
    helps you build applications and mashups

  • I have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device?

    i have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device? one is an iphone 6 and the others are ipad mini first gens, each ipad has 64gb and the iphone has 128, need to keep the data seperate as they are not all mine

    Itunes content and pics are NOT part of the backup that itunes performs.
    Backing up, updating, and restoring iPad, iPod touch, and iPhone software
    You should transfer any purchases from iphone regularly:  File>Transfer Purchases  , if they fail to be transferred when you sync.
    You buy one and only one download.  It is your responsibility to move/copy/backup your purchases.
    You can try contacting itunes support and asking for an exception, but they are under no obligation to allow.
    http://www.apple.com/support/itunes

  • My itunes account was set up under an email account that has been deleted. I started a new itunes account but have the same device as with the old account. How do i keep my music thats on my ipod touch from being deleted when i sync it to my new account?

    My itunes account was set up under an email account that has been deleted. I started a new i tunes account but have the same device as with the old account. How do i keep my music thats on my ipod touch from being deleted whin i sync it to itunes after purchasing new music?

    I have the same problem (deleted email account). I think I mistakenly set up an account when I was buying an Apple product online, not realizing that it would be the same ID as my iTunes.
    What is the way to actually contact Apple?
    I have been clicking around in circles for hours! Will I have to pay them to resolve this? I don't have any products still have applecare . . .

  • I have a new ipod and when I sign in to Words with Friends it says that user name is already in use. How can I continue using the same user name with a different ipod?

    I have a new ipod and added all my apps to it. When I sign in to Words with Friends it says that "user name is already in use" because it is linked to my old ipod. How can I use the same user name with my new ipod?

    Was the iPod setup via iTunes on this computer?
    Setup via wifi?
    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    Do the songs play in iTunes?           
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod        
    Try syncing using the manual method                 

  • How can I make two copies of the same picture one with my watermark and one without for printing for clients?

    how can I make two copies of the same picture one with my watermark and one without for printing for clients?

    Export the photo twice, once with a watermark and once without a watermark.

  • How to get a DDE advise link working on a DDE server with more than one topic on the same service, and with an equal item name?

    When I create a DDE server with serveral topics, all on the same service and with the same item name (different topic), it appears that an advise link does not function properly. It doesn't work at all, it update only when the advise link is terminated or only one of the topics can use an advise link.
    eg.
    On one DDE server I have 2 topics:
    topic1:
    servicename: DDEserver
    topicname : C(1)
    itemnames : P(1), P(2), P(3)
    topic2:
    servicename: DDEserver
    topicname : C(2)
    itemnames : P(1), P(2), P(3)
    Only the topicnames differ!
    Now I can't get an advise link working on one of the items (sometimes on one, but not
    on another).
    Normal (non-advise) links are working fine however.
    (In my case there is no other solution since this DDEserver should be compatible with an older one, created earlier.)

    I really don't know DDE very well. It is usually recommended that you switch to using ActiveX. You may not be correctly configuring the netDDE server. There is an example in the reource library that shows how to do this. You may also want to look at the DDE advise examples that came with LabVIEW 5.1 and earlier.

  • How to tell whether one driver(say driver A) is in the same driver stack with another driver(say driver B)?

    I'm new to WDF, so the questions below might be trial. However, I cannot find the answers in MSDN or text book(e.g. Developing Drivers with the Microsoft Windows Driver Foundation)
    The questions below only apply to KMDF on Windows Phone.
    1. Can I say that one *.sys file is one driver?
    2. How to tell whether one driver(say driver A) is in the same driver stack with another driver(say driver B)?
    3. If several *.sys files are included in one *.inf file, can I say that those drivers are in the same driver stack?

    Drivers are not in a stack, the devices created from the driver are.  Consider having two identical pieces of hardware in a single computer, each will have a device object which will come from the same driver, but each device object will be in
    its own stack.  Things can get even more complex since a filter driver can create more than one device object in a single stack. 
    Just as a single driver can create devices that are in different stacks, your question on multiple drivers in an INF has the same answer, there is nothing that says they will be in the same stack.
    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

  • I've installed Flip4Mac WMV in Lion and when I try to listen to audio in some sites, it starts playing and after about 0.5 seconds it starts playing again. So, I have the same thing playing with a delay... What is happening and how to fix it?

    I've installed Flip4Mac WMV in Lion and when I try to listen to audio in some sites, it starts playing and after about 0.5 seconds it starts playing again. So, I have the same thing playing with a delay... What is happening and how to fix it? Is there any other way to play theese kinds of files without using Flip4Mac WMV?

    Use Flash Media Server to stream the files.......set up a timer and have all three of them play at once....and have a button switch the streams depending upon which stream you want to play.....and wallah......
    you can also capture the stream.time from the video playing and resume from that point on the other videos as well....havent done this theoretically so I dont know how smooth the transistion between streams will be....but it can be done....
    plus u may have to use double buffering techniques to make sure it starts up right away......
    thelegendaryghost

  • UDF has 2 different results with the same input

    Hello,
    I have two mappings of the ORDERS idoc.  In both mappings I use the following UDF function to create a long string output:
    public void matConfig(String[] CHAR, String[] CHARTXT, String[] VALUE, String[] VALUETXT, String[] POSEX, String[] LINE, ResultList result, Container container) throws StreamTransformationException{
    int i, j;
    String crlf = "\r\n";
    StringBuffer matConfig;
    j = 0;
    for (i = 0; i < POSEX.length; i++) {
      matConfig = new StringBuffer();
      while (LINE.length > j && Integer.parseInt(POSEX<i>) == Integer.parseInt(LINE[j])) {
        if (matConfig.length() > 0)
          matConfig.append(crlf);
        if ((CHARTXT[j].length() > 0) || (CHAR[j].length() > 0)) {
          if (CHARTXT[j].length() > 0)
            matConfig.append(CHARTXT[j]);
          else
            matConfig.append(CHAR[j]);
          matConfig.append(" : ");
          if (VALUETXT<i>.length() > 0)
            matConfig.append(VALUETXT[j]);
          else
            matConfig.append(VALUE[j]);
          j++;        
      result.addValue(matConfig.toString());     
      result.addContextChange();
    I have checked the queues of all the inbound fields and the values match exactly but in one mapping the output in the queue for this UDF looks like this:
    Correct Result:
    Thickness of Glass: 20 Height: 10 Width: 5 Length: 18
    Thickness of Glass: 10 Height: 15 Width: 8 Length: 14
    Bad Result:
    Thickness of Glass: 20
    Width: 5
    How can the same input using the same java code (cut and pasted to make sure it matched) return 2 different values.  I have verified that they both use the same Imports as well.  The bad one is part of a function library while the good one is a local function. 
    Any ideas?
    Thanks,
    Matt
    Edited by: Matthew Herbert on May 29, 2010 12:09 AM

    You make a good point Stefan but unfortunately I already checked that.  I have even copied the mapping (right click copy) and pasted it from the working Mapping to the bad Map (Paste) to make sure the context values were all the same.
    I also opened all the queues and compared the values in each.  All values match exactly except for the result(out) queue.
    In both tests I am using the same IDOC XML file. 
    These are the only differences I see.
    1.  The IDOC is exactly the same as far as I can tell but they come from two different source SWCV.  SAP APPL 4.7 and Steelcase_Procurement (ECC 6.0). 
    2.  The working map uses a local UDF.  The bad map calls the UDF from a Function Group.  Is there a Java version difference between the two?
    A better sample of the result queues look like this:
    Correct Result:
    Thickness of Glass: 20
    Height: 10
    Width: 5
    Length: 18
    Thickness of Glass: 10
    Height: 15
    Width: 8
    Length: 14
    Bad Result:
    Thickness of Glass: 20
    <null>
    <null>
    <null>
    Width: 5
    <null>
    <null>
    <null>
    I took this chance to redesign my Variant Config output to separate the characteristics/values, but I'm still bothered that I was unable to determine what would cause the differing values.
    Any ideas?
    Thanks,
    Matt

  • I have several layers for this image: Background, Moon, Tree, Grass and Clouds.  When I try to use the Move tool to move the Moon, the tool jumps to the Tree layer.  The same thing happens with the other layers as well (except the background layer).  How

    I have several layers for my image: Background, Moon, Tree, Grass and Clouds.  When I try to use the Move tool to move the Moon, the tool jumps to the Tree layer.  The same thing happens with the other layers as well (except the background layer).  How can I keep the move tool from jumpimg to the Tree layer?

    1. Pre-select (highlight) the layer to move in the Layers panel.  or-
    2. [ALT+Right mouse click]  to select the wanted layer in the image window.
    and maybe
    3. Set the PS option to "Auto-select" a layer with cursor hover.  (can be very confusing!)

  • Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same

    Hello friends , I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding. He started with terminal And used a text editor to compil the c program on his mac.. So please tell me how to do the same and is there any pre stalled text editor on mac if yes then where and if no then which text editor to install and how to install gcc...please help me out thanks in advance !!!

    I have started with writing  c code on mac using xcode .....but one of my friend told me to use gcc for coding.
    Why? If you are developing and writing code on a Mac why would you not use the tools Apple has given you? And Xcode, once you get use to it, is a very nice development environment that will make you life a whole lot easier.
    If you insist on using an editor and the terminal I would recommend  Emacs   but it has a long learning curve so  something like TextWrangler  will work too.
    As for the compiler if you have Xcode installed install the command line tools and you will be able to compile from the terminal.
    good luck

Maybe you are looking for

  • Installation problem :- SAP 4.7 on Linux RHEL 4

    Hi, I am installing SAP 4.7 SR1 on Linux   RHEL Sever 4 on Test system which have one remote window desktop. I have successfully installed central instance by using the putty from remote desktop. But while installing Oracle 9.2 from remote desktop I

  • Pass info from safari to X11 application

    Hi, I am wanting to pass some data from a web page (viewed using Safari) to an X11 application and I was wondering if anyone can suggest how to do this ? The data in question is ascii text and represents a script which is passed to a molecule viewer

  • Flash Container...to big when viewing SWF files

    I have used Flash Professional  CS5.5, to make a SWF.file, that when I save as all, it also includes a FLA file. I use this SWF file in  Dreamweaver CS5.5 , Insert , Media, to view this I have set the Parameters name .swf, . When I select Live View,

  • Netwok settings in my ipad so i can update ?

    I need help, i am trying to update my ipad and i get a message that reads Make sure your network settings are correct......what do i do pleaaseeeeeeeee

  • VPN Settings Server Admin L2TP PPP Authentication Kereberos option dimmed?

    Hi. I set up my 10.4 server as an open directory master. Kerberos works on the LAN for single signon. I am trying to configure VPN service now. When I go to the "Settings" section of VPN in Server Admin, under L2TP, "PPP Authentication", MS-CHAPv2 is