Get filename from EBS to BPEL

Hi to all,
I have an ESB process that has a file adaptor, that reads xml files from a certain folder and then routes them to a BPEL process.
I want FROM Bpel to get the filename, becauase i need to store that filename in my database.
Can anyone please help me?
Thank you

Antonis
Hope this helps. I had wanted to write files and store the filenames in a database table.
I haven't it, but I am sure it will work for read as well.
Edit the adapter WSDL to add an output:
<portType name="Write_ptt">
<operation name="Write">
<input message="tns:resultset_msg"/>
<output message="hdr:OutboundHeader_msg"/>
</operation>
</portType>
then edit die .esbsvc file:
change the
mepDisplayName="One Way" mep="OneWay"
to[b]
mepDisplayName="Request Response" mep="RequestResponse"
in the Reply part of the Routing Service you would be able to use call a database adapter or a BPEL process
Message was edited by:
user638991

Similar Messages

  • How to get FILENAME from FILE PATH

    does anyone know how to get filename from a file path for example
    FILE PATH: C:\Project\uploadbean\web\uploads\Button.txt
    returns
    FILENAME: Button.txt

    @BalusC
    ust for a reference cause i'm new in JSP This has nothing to do with JSP, but with basic knowledge of an essential API. I have given you the link to the File API. Are you saying that you refused to read the API documentation, which clearly explains you how to use the File and shows which methods are all available to you undereach the straightforward getName() method, and expecting that the others may chew the answers for you? Loser.

  • How to get response from an asynchronous BPEL process in Java

    I'm experimenting with BPEL and doesn't seem to be able to get response from an asynchronous BPEL process. Here's the deal:
    I have a BPEL process that takes a string as input, and gives another string as output. This is a asyncronous process.
    I want to initiate this BPEL process as a web service so I generate a Webservice Proxy in JDeveloper 10g (10.1.3.0.4). The function to call the process is now called "initiate" and takes three arguments: the input string, a "org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo" and a
    "org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID".
    HTTP-Analyzer shows that invoking the BPEL process with initiate("somestring", null, null) results in sending a SOAP message to the BPEL process, which returns a "202 Accepted". How do I get the response from the process? My intuition tells me that I have to use that second argument, that EnpointReferenceType thing. How do I use that?
    Another question: If a asynchronous BPEL process does not exists (so the endpoint does not exist) the Java proxy does not throw an error when runned. It does not even sends a message. It exits with status 0! (This happens for example when deploying a new version of a process and when the "old" version is undeployed). Calling a non-existing synchronous BPEL process, the Java proxy DOES throw an error.

    Clemens,
    That all sounds logical. But somehow it is still a mystery for me ... Somehow I don't see what should be done.
    To call the async BPEL process I have the following procedure:
    initiate(String input, org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo, org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID)
    The first argument is the input for my BPEL process. The second is the address to a webservice that should handle the callback, right? The third is a messageID (makes sense, but why of the type AttributedURI?).
    Here lies my problem. It is not clear to me how these EndpointReferenceType & AttributedURI work. I can't find anything on the net about it. The AXIS examples as where mentioned earlier use other types (namely the "org.xmlsoap.schemas.ws.addressing.MessageID" and "org.xmlsoap.schemas.ws.addressing.ReplyTo") which are completely different.
    What I did so far:
    - I created an webservice proxy that listens on the onResult endpoint of the BPEL process.
    - I created an webservice proxy that calls the BPEL process through the initiate procedure, but it is not completely clear to me how to construct the EndPointreferenceType replyTo, and the MessageID. I did something like this:
    EndpointReferenceType replyTo = new EndpointReferenceType();
    // callback service running on local machine
    // This URI class is the java.net's version
    URI replyToURI = new URI("http://vaccinatie:8988/syncro-callback-context-root/stringconcatCallbackBindingPort");
    // This AttributedURI is the org.xmlsoap.schemas.ws._2003._03.addressing's version
    AttributedURI address = new AttributedURI();
    // the only public methos that made sense to me:
    address.set_value(replyToURI);
    replyTo.setAddress(address);
    // call the BPEL process
    myPort.initiate("test123", replyTo, address);
    But the above doesn't work (largely because I don't know what I'm doing here prob.:-) ) It does send the "test123" message, and the BPEL process does process it, but I don't seem to get the callback right.
    I hope this makes my problems somewhat clearer. I hope someone can help me, because I'm just a beginner in this whole "web service area" and seems to do something terribly wrong here, because it should be very simple. Thx.

  • Get filename from file sender adapter

    Hi Experts,
    I have a question regarding the file/ftp adapter (sender).
    I have a directory with xml and pdf files. for every xml file there is a pdf file with the same filename. for example:
    file1.xml
    file1.pdf
    file2.xml
    file2.pdf
    file3.xml
    file3.pdf
    Now I want to read the xml file with the file sender adapter. afterwards I want to read the related pdf file. for example: If I read the file file1.xml afterwards I want to read the pdf file file1.pdf with the file sender adapter. For this it is nessessary to get the filename from the xml file so that I can read afterwards the pdf file. How can I realise it?
    Thanks and best regards
    Christopher

    Hi srinivas,
    thanks for your quick answer.
    That the file adapter is not able to read pdf files is clear to me. In this case I only want to transport the pdf. that works fine. I tested it.
    the problem is the following:
    I have a xml file with the name "file1.xml". I read the xml file with the sender file/ftp adapter configured with filename "*.xml". Then I want to import the pdf file with the name "file1.pdf". Therefor I need the filename from the xml file.do you know what I mean? So XI has to know the filename of the xml to import the pdf with the same name ...
    regards

  • How to get filename from mail attachment

    Hi all,
    I have a XI scenario Mail->XI->RFC. I have created my own adapter module which handle all attachments from incoming mail.
    Everything work fine, but in my module I try to get information about filename of mail attachment. I use getContentType() metod to get the filename but this method return only the mimetype of the document. The getDescription() method return olny string "mail attachment". I need to get the original filename of the attachment or at least the file extension. 
    Is it possible to get the whole filename from mail attachment?
    Thanks
    Peter

    Hi,
    You can tryout with adapter modules . You can make use of following Adapter attributes also -
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm
    Similar discussion-
    Email attachment file names
    PayloadSwapBean-
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    Regards,
    Moorthy

  • Getting filename from HttpServletRequest

    hi,
    i am doing a simple servlet for uploading file.
    i have been googling around, but i could't find a way to retrieve the filename from the HttpServletRequest object. most solution uses another party's code.
    below is the simple code from the html that takes in the file
    <form action="/TestJSP/test2" method="post" enctype="multipart/form-data">           
                <input type="file" name="test">
                <p>
                <input type="submit" value="Upload File!">
    </form>on the servlet side, i tried using
    String filename = request.getParameter("test") ;but i keep getting a null value for the filename.
    thanks in advance!

    of lots of apache package, like the FileItemFactory
    and ServletFileUpload, even the FileItem class.The package is written for a much wider audience, it is designed to do a lot more than just read the name of the file being uploaded. I don't know if you read their Guide.
    Keep in mind that the solution posted on the other thread was custom written to solve the posters problem, which is a lot more than reading the file name.
    If you want shrunken code, then it's not that difficult:
    package test71;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.*;
    import javax.servlet.http.*;
    import java.util.List;
    public class AnotherFileUploadServlet extends HttpServlet {
        public void doPost(HttpServletRequest request, HttpServletResponse response) {
            FileItemFactory factory = new DiskFileItemFactory();
            ServletFileUpload upload = new ServletFileUpload(factory);
            List<FileItem> items = null;
            try {
                items = upload.parseRequest(request);
                for (FileItem item : items) {
                    if (!item.isFormField()) {
                        String fileName = item.getName();
                        System.out.println("File Name is: " + fileName);
            } catch (FileUploadException e) {
                e.printStackTrace();
    }

  • Getting filename from a string including filepath and filename

    How I can get a filename from a string which includes both
    filepath and filename? The filepath is not always the same. For
    example, the variable could include a "C:\temp\test.doc" or
    "C:\files\docfiles\test.doc" and I need to get the filename
    "test.doc" and save it to another variable. Thanks in
    advance.

    on getFilenameFromPath vPath
    oldDelim=the itemDelimiter
    the itemDelimiter=the last char of the moviePath
    iFilename=the last item of vPath
    the itemDelimiter=oldDelim
    return iFilename
    end
    Put that into a movie script. Then you can call the function
    any time
    to retrieve the last part of the path- like this:
    put getFilenameFromPath("C:\temp\test.doc")
    -- "test.doc"
    As an added bonus, it is cross-platform so it will work on a
    Mac as well
    as a PC.

  • Need to get filename from custom extension

    Hello,
    I am currently writing a custom extension and I'm having a tough time trying to get the filename of the document (java file) of the currently selected (and opened) file. So I have a java file open and right click on it to launch my extension. How do I get information on that document?
    Also is there javadocs for the extsnsion API's? If so where are they located.
    Thanks in advance!
    Bill

    Hi Bill,
    You can find javadoc on the extension API via the help system (JDeveloper Extension SDK topic under the Reference section). Alternatively, you can extract the contents of the ${jdevhome}/jdev/doc/ohj/jdev-doc.jar to a directory somewhere to view the javadoc in a browser.
    To get the filename of a document, assuming you're using 10g (not much different from 9.0.x), you need to get an instance of oracle.ide.addin.Context. Normally, you'll have a Context instance because you're implementing your logic in a Controller or a Command subclass. If not, you can obtain one using:
    Ide.getMainWindow().getLastActiveView().getContext()Once you have the context, you can get the current selection from it. If that selection implements oracle.ide.model.Locatable, it has a URL. From the URL, you can get the filename:
    import oracle.ide.model.Element;
    import oracle.ide.model.Locatable;
    import java.net.URL;
    import oracle.ide.net.URLFileSystem;
    Element[] selection = context.getSelection();
    if ( selection != null )
      if ( selection[0] instanceof Locatable )
        URL url = ((Locatable)selection[0]).getURL();
        String filePath = URLFileSystem.getPlatformPathName(
          url
    }One final thing, if the current view is an editor, the selection may be empty or will not contain Locatables. If that's the case, you might want to get the Document from the Context instead. I.e.:
    URL url = context.getDocument().getURL();
    String filePath = URLFileSystem.getPlatformPathName(
      url
    );Thanks,
    Brian
    JDev Team

  • Getting filename from ahref

    Hi guys...
    <a href="<%=retrieveFileFromDatabase%> target="main">Hello!</a>
    I need to get the filename of the file retrieve from database (that is retrieveFileFromDatabase) at the time the user clicks the link but all i get is all the filename of the files retrieve... Not the filename the user click at that time... Any help here? Thanks in advance...

    <a href="<%=(((Recordset1_data =
    Recordset1.getObject(file_doc"))==null ||
    Recordset1.wasNull())?"":Recordset1_data)%>"
    target="main" ><%=(((Recordset1_data =
    Recordset1.getObject("topic"))==null ||
    Recordset1.wasNull())?"":Recordset1_data)%></a>
    This is the actual code in my program..Okay, got that. First step done.
    I need to get the value, "<%=(((Recordset1_data =
    Recordset1.getObject("file_doc"))==null ||
    Recordset1.wasNull())?"":Recordset1_data)%>, once the
    user clicks the link...Right, and that is what the code says, in JSP scriptlet. So you execute this on a page, and the HTML is sent to your browser, and ...
    What Happens? An error? Or it just doesn't give you what you want. For instance, Take a look at the source code, find that link, and see what is there. Compare this to what you think it should look like. For instance, I would guess, what you think should happen is the html should be:
    Topic Of Document
    But what you are actually getting is:
    Topic of Document
    Is this correct?

  • Unable to get filename from mail to XI to file scenario

    Hi
    How could i get the name of an attachment to be used as the file name on my File Adapter in a Mail to file scenario? 
    I recieve the files as attachments and I have used the payload swap bean to swap my actaull message content to attachment. That works perfect, the contents of the file are saved successfully on my file system.  The file is sent as a plain text file and not xml and no mapping is done, I just get the files from the mail and save them into a file server for further processing.
    Your help will be highly appreciated
    Ronny

    Hi
    I have installed my Module, but when I try to call it from within the adapters I get an error
    exception caught during processing mail message [614]com.sap.aii.af.mp.processor.ModuleProcessorException: Error during processing local bean: localejbs/mailAttachmentFileNames caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of mailAttachmentFileNames.
    I have searched all the logs and the module is active. I even restarted my J2EE engine, twice but still nothing..
    please assist
    Ronny

  • Get filename from list of measurement files

    Hi,
    I would like to have the user select from a list of measurement files and pass that name and path to the write to measurement file VI.
    Ideally, when the data is written to the measurement file the user could add comments.
    Any ideas?
    Thanks
    Joel

    Hi Joel,
    maybe your questions a too generic?
    To select from a list of files you use the FileDialog (either ExpressVI or plain function) and it will give you a (full) path to the selected file.
    To save "comments" with data you can use TDMS file functions which allow to set "properties" for channels of data.
    To get more help than that you should better describe your problems and it's always a good idea to attach a VI of your tries to solve them...
    Examples are found by the help menu in LabVIEW: simply start the example finder
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Get filename from Watched folder start point

    I have a watched folder as a start point and I can use the
    symbols %F and %E in order to save the output documents in the Result folder.
    This is easy.
    What I cannot do, is getting in a string variable the same filename in order to use it within the Process:
    Is it possible?
    I would like to exploit this filename to discriminate the activities that the file have to make...
    Thanks you as usual!

    thank you Jasmin, your answer is correct and now it works!
    only I don't understand why my way didn't work...
    Instead of a setValue, I used directly a INSERT SQL activity with getDocAttribute(/process_data/@docXML, "basename") as parameter: as is, it didn't work!
    As you suggest, if I put a setValue between the Watched folder startpoint and the INSERT SQL activity (now with the populated string as parameter), it works...
    Bah!
    Thank you again!
    Fabio

  • Get filename from uploaded file then place in input tags

    i have an upload feature with the use of upBean and i can get the filname thru filename=file.getFileName
    when i place in the input tags it takes an error what i suppose to do
    <input type="hidden" name="getfilename" value="<%=filename%>">
    if (MultipartFormDataRequest.isMultipartFormData(request)) {
                            // Uses MultipartFormDataRequest to parse the HTTP request.
                            MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
                            String todo = null;
                            String filename=null;
                            String description=request.getParameter("txtDesc");
                            String checkfilename=mrequest.getParameter("uploadfile");
                            if (mrequest != null) todo = mrequest.getParameter("todo");
                            if ( (todo != null) && (todo.equalsIgnoreCase("upload")) ) {
                                Hashtable files = mrequest.getFiles();
                                if ( (files != null) && (!files.isEmpty()) && (description!=null)) {
                                    UploadFile file = (UploadFile) files.get("uploadfile");
                                    if (file != null){
                                        filename=file.getFileName();                                    if(checkfilename==null){
                                            filename="";
                                  upBean.store(mrequest, "uploadfile");  // Uses the bean now to store specified by jsp:setProperty at the top.
                                             else out.println("<BR> todo="+todo);
                    %>
                    Message was edited by:
    BlingBling15

    Thanks for reply.
    I replaced messageFileUpload (binded to blob table column) with messageStyledText (binded to filename attribute). Above the table placed single messageFileUpload and submitButton nearby. After user select file on submit I do:
    *if (pageContext.getParameter("DoUploadButton") != null) {*
    .. DataObject fileUploadData = pageContext.getNamedDataObject("FileData");
    .. *if (fileUploadData != null) {*
    .... String fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    .... String contentType = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    .... BlobDomain fileContent = (BlobDomain)fileUploadData.selectValue(null, fileName);
    .... String seqNumber = pageContext.getParameter("seqNumber");
    .... am.insertInstanceAttachRowBlob(seqNumber, fileName, fileContent, contentType);
    .... pageContext.removeNamedDataObject("FileData");
    .. return;
    Edited by: user12086842 on 02.01.2013 2:41

  • How to get filename from selected directory

    Helle experts,
    I've a string variable from a directory with following content:
    G:\SAP_R3_MRSS\SAP_MRS\FAVORIT.PDF
    now I just want to select the filename, in this case FAVORIT.TXT
    How can I do this ? The directory/filename may vary.
    Some ideas ?
    Thanks
    Gerd

    Eric's split is probably the best way, but if you need a way to break the path into drive, path, and file, you could use a standard, well-used regular expression:
    PROGRAM zzfile.
    DATA:
       g_regex     TYPE string VALUE '\b((?#drive)[a-z]):\\((?#folder)[^/:*?"<>|\r\n]*\\)?((?#file)[^\\/:*?"<>|\r\n]*)',
       g_path_file TYPE string VALUE 'G:\SAP_R3_MRSS\SAP_MRS\FAVORIT.PDF',
       g_drive     TYPE string,
       g_path      TYPE string,
       g_file      TYPE string.
    FIND FIRST OCCURRENCE OF REGEX g_regex IN g_path_file SUBMATCHES g_drive g_path g_file IGNORING CASE.
    IF sy-subrc = 0.
    *  WRITE g_drive.
    *  WRITE g_path.
      WRITE g_file.
    ENDIF.

  • Get filenames from SAP App. Server

    Hi,
    Need info on the following.
    Need to fetch all filenames OR filenames using a mask from the SAP Application server directory into internal table.
    Not able to find appropriate Function Module.
    I have used the following function modules for the purpose but to no help.
    EPS_GET_DIRECTORY_LISTING
    RZL_READ_DIR_LOCAL
    Looking forward to your suggestions.
    Thanks.

    Hi Mohammed,
    you can read the files with the following command:
    CONCATENATE 'ls ' p_path INTO ux_com SEPARATED BY space.
    CALL 'SYSTEM' ID 'COMMAND' FIELD ux_com
    ID 'TAB' FIELD i_files-sys.
    p_path contains your Unix filepath.
    i_files is just an internal table with one field for the filename.
    Use SE11 and search a rollname like path, file.
    Take a field that has length 128 (usually is long enough, if not take one with 256 ) and is type char.
    Then you code:
    data: begin of i_files occurs 0,
    filename type <the_fieldname_you_found_char_128>.
    data: end of i_files.
    p_path is your pathname usually 128 is also long enough.
    parameters:p_path(128) deault '/your_paht/'.
    This should work, the -sys is just for the called C-routine relevant.
    Use it the way i suggested.
    Kind regards
    Henner
    <b>Reward if helpful</b>

Maybe you are looking for

  • Hyperlinks from Excel 2010 to external programm

    Hello! I have Microsoft Office 2010. I am interested in addition hyperlinks to pivot table in Excel, which can mouve to the external web application (Global Specification System - the system of documentation management). 1. How can I add hyperlinks t

  • Slow first time execution

    Hi everybody! I 've written simple java application which uses the "substance" look'n'feel and that makes it to run very slowly for the first time when you run it, I used simple splash screen mechanism to show the main frame after executing main meth

  • Can a 2008 Reporting Server Connect to a 2012 SQL Database

    The current report server and database server are both SQL Server 2008 R2 Enterprise.  We have a 2012 SQL Server that we will be migrating the database to so my question is, will there be any problems connecting to the 2012 SQL Sever database from a

  • HT1229 an error message while trying to import photos to IPhoto saying there is not enough room.

    I have an IMac with a SS drive and a regular hard drive (1 TB). I'm starting to get an error message when importing photos to Iphoto that says there's not enough room on the hard drive. The SS drive says it has only 1 GB left on it, so obviously, som

  • Copy control for sales douments

    Hi to all. I just wanted to find out about a minor issue. When creating my sales document with reference to a previous sales document (example a quotation with reference to an inquiry), it does not pick up the line items (material and its quantity) f