How to modify Fileadapter filename with val from JMS msg using xsl?

In my case I need to name the file based on information received in a JMS message.
I would like to receive an xml document from a JMS queue, the document will contain content as well as the name of a file to be saved off. I found references to something similar in the BPEL and ESB documentation for the file adapter by using "ehdr:setOutboundHeader(" as a means to set the outbound header value but I cannot find the mechanics of how to accomplish getting that set with a value that is selected from an incoming message in XSL code.
The examples shown indicate the creation of a pass through mechanism that would take a message from a request header and pass it along to the outbound header which is great but I need a snippet of code to get me through setting the outbound header with an element value that is sourced from the inbound message.
I also found an incomplete reference in a "Oracle SOA Suite Enterprise Server Bus" powerpoint presentation that indicates JMS custom properties support for "Property[@name="Country"]/@value" but no details were provided to assist further.
I would greatly appreciate any information you can provide.
Thank You,
John

Ok I was able to get fileadapter filenames modified.
First you cannot do this after a dbadapter query as that functionality seems to be broken. The best way to solve it for me was to simplify the problem, I started with placing the setoutbound header data after reading a simple file and ignoring the files content altogether. I do the set inside a match of the xslt using a constant value, again for simplicity. For the test just put in 'ateststring.txt' in the setoutbound header call, no need to select data from the document at this point; we will get to that. Now get that to work.
Once you have that working take a value from the incoming document and select it into a variable named myvariable then replace the 'ateststring.txt' with $myvariable. So basically its a three step process for the final solution. Select the data of interest from the document into a variable. add a select statement to make the method call just after that. Make the method call inside the select statement and prepend the variable name with the $ symbol.
So far I have only tested this file to file and file to ftp, I suspect that jmsadapter to file will work fine too. So the trick for me was to understand that if an incoming document is the result of a query that just wont do. My requirement was to take an input JMS request, use that to drive a query, take the data from the query and write it to a filename as defined in the JMS request. No matter what I did to set the frustrating fileadapter/ftpadapter filename in the header I was unable to do so. I used constant strings etc in every part of the document ( before select, inside select, outside select etc ). It wasnt until I went file to file that I was able to get this to work at all. And then not in the xslt header etc, it MUST be in an area of the document that resulted in a select match, which after review makes sense.
To work around the query to file issue, I place the results of the data query into a temporary filename%SEQ%.tmp, along with the query results I add the real filename inside the document. I have a file listener that listens for the filename using wildcards filename*.tmp, it takes the file reads it in, pulls the permanent filename from the incoming document, and sets that filename in the header using the steps worked out above by selecting the filename into myvariable.
You cannot ( to my knowlege ) store variables in ESB so I found I had to put them inside the documents to move the data around. When I am all done with the work through the routing service I strip out the variable data fields that I needed to carry along with the data.
I hope this saves someone else a bit of frustration!
John

Similar Messages

  • How do you move itunes with playlists from one computer to another

    how do you move itunes with playlists from a computer to ext hard drive, so it will play from the ext harddrive and not the computer

    Type "move itunes library to external hard drive" into the google search bar.

  • How to create a interface with NTR from SAP XI?

    How to create a interface with NTR from SAP XI?

    Hi,
        What do you mean by NTR ?...
    What are the details you needed...Please be clear and more elaborative as far as possible..so that you will get straight forward answers...
    HTH
    Rajesh

  • How do you edit photos with photoshop from the new  Photos app?  The edit in external editor menu item seems to be gone.

    How do you edit photos with photoshop from the new  Photos app?  The edit in external editor menu item seems to be gone.

    Tell Apple what additional features you want in Photos via both http://www.apple.com/feedback/macosx.html and http://www.apple.com/feedback/iphoto.html  since they don't have a feedback page for Photos as yet.

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to show screen design in .srf (from Screen Painter) using SDK?

    How to show screen design in .srf (from Screen Painter) using SDK?

    You need to use the LoadBatchActions method of the Application object to load .SRF files.
    John.

  • How can I share photos with others in other places using ICloud?, How can I share photos with others in other places using ICloud?

    How can I share photos with others in other places using ICloud?

    If you have iPhoto on an iOS device rather than a Mac, you can create a 'Photo Journal', which is an online gallery hosted on iCloud: details here -
    http://help.apple.com/iphoto/ipad/1.0/#blnkaf3ef70a
    This facility is not as yet available in iPhoto on a Mac. If you don't have an iOS device you will need to find a third-party alternative. This page examines some options:
    http://rfwilmut.net/migrate4

  • How do you create a still image from a video using IMovies 11?

    How do you create a still image from a video using IMovies 11 on a Pro Mac?

    The simplest way is to do a simple screen capture.  

  • How to modify an existing xml file from java code.

    Hi
    I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile.
    For example if xml file(studlist.xml) is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    Now suppose i have set name to victor using student.setName,
    and set age to 20 using setAge from javacode,
    the new xml file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    <Student>
              <Name>victor</Name>
              <Age>20</Age>
         </Student>
    As observed this is not a valid xml file.But how can i modify without any errors?

    I know it's an old post, but I found this while doing a google search for something else, and don't like to leave it un-aswered
    Just in case anyone has a similar problem... In this case the new elements have been appended outside of the root element
    What you need to do is first get the root element and then append the new children to that, there are several ways of getting the root element, which depend on what you want to do with the elements you get back here's a simple (incomplete) way.
    // gets the root element of the specified file (code not shown)
    Element rootElement= new SAXReader().read(file).getRootElement();Then just append the new elements as below (this is non-generic code and would need to be modified for your situation)
    // write a new student element
    Element student = document.createElement("Student");  // creates the new student
    rootElement.appendChild(student); // ***appends it to the root element***
    Element name = document.createElement("Name"); // creates the name element
    name.appendChild(document.createTextNode("Fred")); // adds the name text to the name element
    student.appendChild(name); // appends the name to the student
    Element age= document.createElement("Age"); // creates the age element
    age.appendChild(document.createTextNode("26")); // adds the age text to the age element
    student.appendChild(age); // appends the name to the studentThen flush ya buffers or whatever and write the file
    Edited by: Dream-Scourge on Apr 23, 2008 11:10 AM

  • How to transfer photo gallery with thumbnails from Fireworks?

    Hi
    I am trying to create a website. I am using Dreamweaver CS3
    and for my main homepage I used one of their templates.
    From my main page I give a link to photo gallery. I intend to
    build a gallery in Fireworks as I will need a thumbnails for my
    photos.
    My question is how can I transfer the created gallery to
    Dreamweaver CS3? I need the same template I used for my homepage
    for my gallery?
    Please help!
    Thanks

    jcdesigns wrote:
    > I am assuming you are building a photo gallery like you
    can in photoshop. In
    > Fireworks, are you going to something like:
    File>Automate>Web Photo Gallery,
    > and pointing to the folder where the images are located,
    and Fireworks builds
    > the pages, thumbnails and larger images by itself? If
    this is the case, then
    > you just need to make a link on your home page to the
    gallery page.
    >
    > If you are building this all by hand, meaning you are
    making and resizing all
    > of the thumbnails and images yourself, you will need to
    create a second page
    > and place all the thumbnails on that, and link them to
    the larger image files
    > or pages with those images.
    >
    > www.projectseven.com has a REALLY good photo gallery for
    Dreamweaver and
    > Fireworks for a good price. That is the way to go.
    Especially if you plan on
    > making more photogalleries.
    >
    Resize your photos as needed to cut down their size use jpg
    or png format.
    save then in an outside folder.
    next inside the directory you use for your web files create a
    directory
    with either the sme name as the outside folder or name
    desired open that
    directory.
    Open up Dreamweaver and create a Blank HTML page.
    Now go to Commands menu and and choose create web Photo
    album...
    next a menu will pop up and ask directory where images are
    located. Then
    will ask the destination directory browse to the new
    directory you
    created. You will also settings for Thumbnail size and
    whether to use
    captions if you do use captions it will use the file name of
    of each
    image and you will have to go in and edit the caption names
    for the
    photos as desired when everything is setup fireworks will
    takeover and
    create the album. it will create three subdirectories one
    with the full
    size photos , one with the thumbs, and one with the html
    information for
    each photo. Plus three other files in main directory one
    being an html
    file. once completed and Fireworks returns editing back to
    Dreamweaver
    close and don't save the blank html file. the index file
    needed will be
    created by Fireworks.
    open the index file inside you album directory and edit
    cations as needed.
    Remember if you do this you'll need a total of 3 times files
    of the
    photos you use for example.
    if you have 30 photos it will be a total of four directories
    and 93 files.
    for 20 it would be 63 files, for 10 33 files and so on.
    If you need to add photos or take away photos the method is
    to start
    over from scratch and use you FTP program to do a recursive
    delete on
    the directory then re-upload.
    Phillip M. Jones, CET |LIFE MEMBER: VPEA ETA-I, NESDA, ISCET,
    Sterling
    616 Liberty Street |Who's Who. PHONE:276-632-5045,
    FAX:276-632-0868
    Martinsville Va 24112 |[email protected], ICQ11269732, AIM
    pjonescet
    If it's "fixed", don't "break it"!
    mailto:[email protected]
    <
    http://www.kimbanet.com/~pjones/default.htm>
    <
    http://www.kimbanet.com/~pjones/90th_Birthday/index.htm>
    <
    http://www.kimbanet.com/~pjones/Fulcher/default.html>
    <
    http://www.kimbanet.com/~pjones/Harris/default.htm>
    <
    http://www.kimbanet.com/~pjones/Jones/default.htm>
    <
    http://www.vpea.org>

  • How to play a slideshow (with movies) from Iphoto to Apple TV second gen

    Hi,
    Does anyone know how to play a slideshow with movies, that I normally play perfect with Iphoto (I even can add music)to let it stream to the Apple tv second gen?
    So I have some movies on Imac from a holiday in Egypt and Iphoto alows me let it play as a movie.
    How can I setup my Apple TV so that it is the same on my Apple TV? So with nice fade ins and outs?
    Thanks

    Ok Thank you, but I have one more question.
    The Iphoto library is loaded with different movies and Photos. They are sorted by date.
    Is there a possibily to make folders in Iphoto. So that I have on folder called for example "vacation Egypt" and put all the movies in this folder within Iphoto?
    And then when I select this map it will make a slideshow from all this movies with music? Just like in Iphoto?

  • How export one table along with data from one location to other location

    Hi All,
    I'm new in export/import practice.
    Can anyone plz tell the steps along with commands to do the following:
    1. I want to export a table with data from one location(computer) to other(computer) that are in same network.
    2.Also from one user to another user.
    I'm using oracle 10g.
    regards
    Sonia
    Edited by: 983040 on Feb 19, 2013 11:35 PM

    First of all read documentation
    Oracle Export/Import : http://docs.oracle.com/cd/B19306_01/server.102/b14215/exp_imp.htm
    Datapump Export/Import : http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_overview.htm
    If you are using Datapump or Traditional Export/import you need to follow following steps
    *1) Take User dump via EXPDP on Computer A .*
    For EXP
    exp username/password owner=Test file=D:\test.dmp log=D:\test.log
    For EXPDP
    expdp username/password schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=TEST.log*2) Copy that to Computer B*
    *3) Import dumpfile.*
    For IMPDP  Use remap_schema optionhttp://www.acehints.com/2012/05/data-pump-impdp-remapschema-parameter.html
    For IMP use fromuser and touser option
    one user to another user imp

  • How export one table along with daya from one location to other location

    Hi All,
    I'm new in export/import practice.
    Can anyone plz tell the steps along with commands to do the following:
    1. I want to export a table with data from one location(computer) to other(computer) that are in same network.
    2.Also from one user to another user.
    I'm using oracle 10g.
    regards
    Sonia

    Wrong forum. This is a database query not an Oracle Secure Backup issue.
    Thanks
    Rich

  • How long we can go with Java from now on?

    Days ago, the forum is blue. But now change to red.
    Java, will it still be hot like along with Sun? How long we can go with you?

    JoachimSauer wrote:
    mrjava wrote:
    What will be the strategy of Oracle with MySQL now?They claim to support it in full and continue development.
    But this is really off-topic here ... we're not the oracle about everything related to Oracle.Not breathing the smoke of the correct kind of leaves, eh?
    :D
    ¦ {Þ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to import whole database (with data) from remote server?

    I am using oracle sql developer 2.1. Our main database server is in USA, we use this from Bangladesh. We also a local copy here time to time updataed.
    Is there any way copy or migrate the whole database with data from usa server to our local serve using sql developer 2.1?
    we use windows server 2003 service pack 2 in local server.

    I replied to you in Import Data wizard not found and stand by my suggestions.
    Regards,
    K.

Maybe you are looking for

  • Can I have multiple stream types in one object?

    For my final project in my data commucnications class I'm writing a client/server socket application that will allow multiple clients to play TicTacToe simultaneously against the game on the server. The teacher is a C/C++ jock, and knows very little

  • Can I make a search rule in Aperture?

    I'm using Aperture 3, and fairly familiar with it but trying to organize a library from scratch.  I want to organize projects into folders by year and then event (e.g. 2012 --> Trip to Chicago, Baby Baptism, etc.).  I already have photos organized by

  • Cannot get into Itunes program -prblm with audio configuration

    The Message I get is: Itunes cannot run because it has detected a problem with your audio configuration. I tried Removing Itunes from my computer a few times and downloading it again and again. I tried RESTORE to reset everything -it DIDN't work- I k

  • Input/Output Error

    After having some progressive troubles with my Powerbook laptop I went and decided to erase the data and start fresh. After going through the seven pass erase and waiting for close to four hours I just got a message stating that "Disk Erase Failed wi

  • Price determination for BOM

    Hi guys, how are you. One scenario : I am using the header level BOM(printer) Alternative 1 : 2tray                 :  1no hard disk(20GB) : 1no Duplex kit          :  1no Alternative 2 : Hard disk(20GB)  : 1no Stand                 :  1no Duplex kit