Getting the file name using ehdr:getRequestHeader function in style sheet

Hi, I am facing an issue while using ehdr:getRequestHeader function to get the name of the file, which was placed in FTPS server and read by FTP Adapter. In style sheet I am trying to get the file name as below.
<xsl:variable name="fileName"
select="ehdr:getRequestHeader('/fhdr:InboundFTPHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;')"/>
and based on the file name I am trying to fetch the values from Property file, map it to a schema and make a SOAP service call.
When i use the above functionality in style sheet exception occurs and in ESB instance I am not able to view the exception.
It is saying as 'Details of the message are not available, The message details would have been purged'. In logs it is showing the following error trace.
<MSG_TEXT>Failed to process deferred message</MSG_TEXT>
<SUPPL_DETAIL>oracle.tip.esb.server.common.exceptions.BusinessEventRejectionException: Error occured while handling monitor message dequeued from monitor topic. Message text is "&lt;activityMessages>&lt;activityMessage order='10' type='6'>&lt;flowId>cRfy7g6a-8HDUKqyf4GsKw==&lt;/flowId>&lt;subFlowId>1245307693657&lt;/subFlowId>&lt;timestamp>1245307703862&lt;/timestamp>&lt;operationGUID>2F1C13905B3F11DE8F0BD923A1148BB1&lt;/operationGUID>&lt;operationQName>ESBTest.InvokeESB&lt;/operationQName>&lt;errorMessage>&lt;![CDATA[An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception on JaxRpc invoke: serialization error: java.lang.IllegalArgumentException: getSerializer requires a Java type and/or an XML type
        at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1714)
        at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1460)
        at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeInputOnlyOperation(WSIFOperation_JaxRpc.java:1141)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:894)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:810)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:832)
        at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:227)
        at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:136)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:407)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:165)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:205)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:136)
        at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:310)
        at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(InitialEventDispatcher.java:547)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(InitialEventDispatcher.java:529)
        at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:161)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:119)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:65)
        at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(ESBListenerImpl.java:722)
        at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(ESBListenerImpl.java:407)
        at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:281)
        at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:1173)
        at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:882)
        at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWork.java:342)
        at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:224)
        at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
        at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
        at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:825)
        at java.lang.Thread.run(Thread.java:595)
]]&gt;&lt;/errorMessage>&lt;exception>&lt;![CDATA[oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception on JaxRpc invoke: serialization error: java.lang.IllegalArgumentException: getSerializer requires a Java type and/or an XML type
        at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1714)
        at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1460)
        at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeInputOnlyOperation(WSIFOperation_JaxRpc.java:1141)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:894)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:810)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:832)
        at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:227)
        at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:136)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:407)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:165)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:205)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:136)
        at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:310)
        at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(InitialEventDispatcher.java:547)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(InitialEventDispatcher.java:529)
        at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
        at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:161)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
        at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:119)
        at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:65)
        at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(ESBListenerImpl.java:722)
        at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(ESBListenerImpl.java:407)
        at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:281)
        at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:1173)
        at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:882)
        at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWork.java:342)
        at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:224)
        at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
        at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
        at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:825)
        at java.lang.Thread.run(Thread.java:595)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:1020)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:810)
        at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:832)
        at oracle.tip.esb.server.service.impl.outadapte]]&gt;&lt;/exception>&lt;retryable>false&lt;/retryable>&lt;/activityMessage>&lt;/activityMessages>"
at oracle.tip.esb.monitor.manager.ActivityMessageReceiver.handleMessage(ActivityMessageReceiver.java:96)
at oracle.tip.esb.server.dispatch.agent.ESBWork.process(ESBWork.java:178)
at oracle.tip.esb.server.dispatch.agent.ESBWork.run(ESBWork.java:132)
at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:825)
at java.lang.Thread.run(Thread.java:595)
Caused by: oracle.tip.esb.monitor.MonitorException: Due to the error "", the activity message could not be stored.
at oracle.tip.esb.monitor.manager.database.AbstractFaultPersister.persist(AbstractFaultPersister.java:107)
at oracle.tip.esb.monitor.manager.database.DBActivityMessageStore.persistMessage(DBActivityMessageStore.java:340)
at oracle.tip.esb.monitor.manager.database.DBActivityMessageStore.store(DBActivityMessageStore.java:131)
at oracle.tip.esb.monitor.manager.ActivityMessageReceiver.handleMessage(ActivityMessageReceiver.java:83)
... 7 more
Caused by: java.lang.NullPointerException
at oracle.tip.esb.monitor.manager.database.oracle.OracleFaultPersister.persist(OracleFaultPersister.java:102)
at oracle.tip.esb.monitor.manager.database.AbstractFaultPersister.persist(AbstractFaultPersister.java:105)
... 10 more
</SUPPL_DETAIL>
When I use the same function getRequestHeader for FileAdapter, it is working fine. Do anyone know why this issue occurs? Is this an issue with environment?

As far as I can see the problem is the invoke of the SOAP service. This could be because of an empty filename but maybe there are other issues. First, make sure that the filename is read correctly by looking it up in the BPEL runtime process. Maybe the content is different than you expected it so that the read action for the properties give wrong result. Are you sure that ehdr is the correct prefix for the ftpheader?

Similar Messages

  • Get the file name using XSLT mapping

    Hi
    How to get the file Name at receiver side using XSLT mapping.
    Could any one please help me
    Regards
    sowmya

    Sowmya
    If you will use Grpahical Mesage Mapping then this can be achieved using Adapter-Specific Attribute u201CFileNameu201D
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Code Snippet -->
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
    u201Chttp://sap.com/xi/XI/System/Fileu201D,
    u201CFileNameu201D);
    But in case you have to ONLY use XSLT mapping then I would suggest to use the same jave code & call it from your XSLT mapping. I never tried such thing you might use couple of jar files too.
    - lalit -

  • How to get the file name from directory

    Hi,
    I have a directory called test inside i have only one .txt file. i dont know that file name.
    Is it possible get the file name using PL/SQl code. ???
    Using that .txt file i have to create a dynamic table.
    If i have use *.txt also not working
    Anyone suggest me its possible to do or not????
    Cheers,
    Shan

    Hi Saubhik ,
    Wheni execute the function i am getting the following error
    Warning: compiled but with compilation errors
    Errors for FUNCTION LISTDIR
    LINE/COL                                                                       
    ERROR                                                                          
    7/3                                                                            
    PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SEARCHFILES' must be declared       
    7/3                                                                            
    PL/SQL: Statement ignored                                                      
    8/54                                                                           
    PL/SQL: ORA-00942: table or view does not exist                                
    8/20                                                                           
    PL/SQL: SQL Statement ignored                                                  
    10/11                                                                          
    PLS-00364: loop index variable 'EACH_FILE' use is invalid                      
    10/2                                                                           
    PL/SQL: Statement ignored      Cheers,
    Shan

  • How do I get the file name?

    I'm kind of new to javascript -- working with a colleague who has Adobe Acrobat Professional -- I've got an *old* version of Adobe Acrobat and most of the functions don't work -- but how do we get the file name -- we're trying to develop an application -- so if the user opens c:\something.pdf, we'd like to know the file name (something.pdf).
    If we get a fully qualified path, that's fine -- I think I can parse it.
    Thank you in advance.

    The 'paty' property of the 'doc' object has been available since version 3.01.
    Using the following in the JavaScript console when the Acobat JS API Refenece is open:
    this.path;
    returns:
    this.path;
    /C/Program Files/Adobe/Acrobat 8.0/Help/ENU/JS_api_reference.pdf

  • Get the file name into a Odi variable

    Hi,
    I need to get the file name into odi variable like ..A/ETC/file.txt
    For eg.the filename file.txt should get store in a variable.
    Then i want to compare the file name stored in the variable with some other value.
    Please suggest.
    Thanks.

    in package,
    declare the variable, then evaluate it with another variable, generally using # syntax
    if the variable is date type, suggest to use : syntax, because # will treat the variable value as text value
    in loadplan
    use case when syntax,

  • How to get the file name from Oracle B2B 10g

    Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
    In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
    Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
    I tried using the b2b.filename property in the receive activity and it is not getting the file name.
    <sequence name="main">
        <receive name="Receive_Note" partnerLink="GetB2BNote"
                 portType="ns1:Dequeue_ptt" operation="Dequeue"
                 variable="Receive_Note_Dequeue_InputVariable"
                 createInstance="yes">
                 <bpelx:property name="b2b.fileName" variable="WriteFileName"/>
        </receive>
      </sequence>
    Can you help me to get the file name from Oracle b2b 10g ?
    Thanks,
    b2b user

    Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
    In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
    Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
    I tried using the b2b.filename property in the receive activity and it is not getting the file name.
    <sequence name="main">
        <receive name="Receive_Note" partnerLink="GetB2BNote"
                 portType="ns1:Dequeue_ptt" operation="Dequeue"
                 variable="Receive_Note_Dequeue_InputVariable"
                 createInstance="yes">
                 <bpelx:property name="b2b.fileName" variable="WriteFileName"/>
        </receive>
      </sequence>
    Can you help me to get the file name from Oracle b2b 10g ?
    Thanks,
    b2b user

  • How to get the file name in one of the Xml node field?

    Hi Experts,
    i have one requirement with file name in xml file.
    i need to get <b>the file name of file</b> in one of the node in xml content of that file.
    how can i achieve that req?
    treat this as Very Urgent.

    Hi Bheem,
    Explain your scenario in detail..
    >>i need to get the file name of file in one of the node in xml content of that file.
    1. Create an node <b>Filename</b> in the target datatype.
    2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.
    3. Use the following UDF and map it to the Filename field in the target message type.
    public String getFileName(Container container)
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Regards
    San

  • File adapter polling and getting the file name 11g Jdeveloper

    I am using JDeveloper 11g. My process is something like;
    A file adapter reads a XML file
    This triggers the BPM process, file content is sent to start activity as message
    I have to get the file name that is read by file adapter.
    How to do that? Any help is appreciated.
    I have seen couple of answers like bellow in forum but did not help me much
    This is a very simple task in JDeveloper 11g, file adapters are linked to the receive activity, here there is a tab called Properties which you can use to extract the file name. Please follow the steps below:
    1. Create a Simple Type variable of string type, call it fileName_var or any name you wish.
    2. Open the Receive activity in your bpel project.
    3. Scroll down to jca.file.FileName and double click on the value column, click on the browse button (...), select Variable, then click the search icon
    4. Locate your recently created variable
    5. Now when your project runs it will assign the file name to this variable, you can use this same approach also to pull the directory, file size, etc.
    *************************/

    hi,
    Like you said.. steps are simple and clearly mentioned in guide.
    1. create a variable of type string
    2. after configuring the file adapter , go to corresponding receive activity , go to properties tab
    3. search for a property with name as jca.file.FileName . This basically keeps track of file name
    4. for this property, give the value as name of variable created in step 1 above
    5. Use this variable anywhere in assign / transform
    HTH,
    Ketan

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • Can you get the file name of the current executing TSQL script?

    Can you get the file name of the current executing TSQL script? I wrote entries to a generic log file and would like to include the script name.

    Okay, So What you can do is
    1. Read get the version from your  database and redirect it to a text file(SQLCMD outout can be directed to text file using -o option or windows redirection operator >)
    2. Now you can read this value from the text file either inside a batch file or a powershell script and decide what operations you can do. 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Problem with getting the file name and type from OAMessageFileUploadBean

    Hi Tapash,
    I am trying the code below to get the file name and mime type from OAMessageFileUploadBean,
    DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("Documents");
    String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    String contentType = fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    But this piece of code gives errors saying that selectValue selectValue(null, java.lang.String) not found in class oracle.svc.DataObject
    Any ideas? why this code is giving error?
    Can i handle the event of browse button for OAMessageFileUploadBean?
    Regards,
    Nagesh Manda.

    Try using class oracle.cabo.ui.data.DataObject
    --Shiv                                                                                                                                                                                                       

  • How do I get the file names on a customized proof sheet?

    How do I get the file names on a customized proof sheet?

    Actually, I really don't know what you say.
    But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
    Therefore, I would like to know the size on disk but not just the size.

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

  • Get the File Name received from FTP Adapter

    Hi,
    How to get the File name reived through the FTP Adpater. I have created a variable with the Message type from ftpAdapterinboundheader.wsdl. from there I mapped the filename attribute to a local string variable.
    But I did not receive the file name. The output in the Audit trail is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Invoke_File_Process_FileProcess_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/PIERS/SP_FILE_PROCESS_UPDATE/">
    <AS_DIR xmlns="">I</AS_DIR>
    <AS_FILE_NAME xmlns="" />
    </InputParameters>
    </part>
    </Invoke_File_Process_FileProcess_InputVariable>
    Can any one let me know how to get the recevied file name from FTP adapter.
    Thanks

    you have to define variable of type InboundHeader_msg. Then in receive activity click on Adapter tab and for header variable chose your newly created variable (InboundHeader_msg). Once you receive message from FTP you should see in this variable fileName.

  • File adapter polling and getting the file name

    I have a requirement where I have to poll a file and dump the data into the DB. But while polling a file for a particular file name, I also need to get the name of the file to do some operations on the file. The file name should be passed from the adapter in order to do some operations based on the file name. Is it possible to get the file name by any chance?

    Hi,
    its easy to get the file name..by creating the variable for the fileAdapterInboundHeader.wsdl
    just follow the below link.
    http://abhishek-soablog.blogspot.com/2008/06/bpel-getting-file-name-from-file.html
    Edited by: Oraacler on Mar 19, 2010 2:59 AM

Maybe you are looking for

  • Adobe Photoshop Elements 4 won't open

    It worked fine from the day of buying until today.  I clicked the link in All Programs as usual and it opened onto the welcome page but none of the options will work at all. I use Windows XP Home Edition version 2002 Service Pack 3 with an AMD Athlon

  • 2702-UX-K9 Access Point will not associate with controller.

    Hi, I recently purchased nine new 2702 APs.  Two of them will not associate with the controller.  I realized they they had a different part number.  They ended with UX-K9 instead of -K9 like the others.  It turns out that these are new AP that are un

  • Timer problem

    Hi there, I have a strange thing with some timers. I have a main timer: This one is running during a specific time: Set time. When he reaches the Set time is stops. This is ok This timer activates 2 other timers: 1 - Run timer                        

  • Query Issue with Inner JOIN

    I need to create the following SQL query in Toplinks, but cannot figure out how to do it. I just want to get all Contacts that have their InitialEventID set to some integer, or have a mapping in the ContactEvents table set to that integer. The mappin

  • Passing in parameters to Data Instance

    Hi I read in OSM 7.2 Release Notes on vf:instance : You can now add explicit parameter values from within an XQuery or XPath that augment or override the parameters defined in the OSM data dictionary using vf:instance() My question is, how do I make