FTP Adapter on OSB - how to specify logical directory path

I am using the ftp adapter on osb 11g (Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Thu Aug 19 02:10:08 PDT 2010 ] Oracle Weblogic Server Version: [WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 ])
I defined the ftp adapter using jdev and imported the jca artifacts into osb.
I created a business service using jca adapter to put the file to the ftp server.
The problem is the write directory on the ftp server is different for each environment - DEV, QA, PROD.
I used a physical directory specification when defining the adapter in JDEV because it wasn't clear from the help how i would override a logical directory during deployment to osb (it is clear if deploying to soa suite).
Is there a way to override this dynamically override this directory at runtime. Or even better a way to override during deployment time?

You do it either way....
Import the SBConfig jar into the sbconsole and change the value in the JCA file
or
Re: Customizing JCA FTP Adapter properties in OSB

Similar Messages

  • FTP Adapter in OSB

    Hi Guys,
    I have used an FTP adapter in OSB and it is working fine. What I want to do is to override the Delete File setting for the adapter.
    I don't want to delete(or archive) the file/s (scenario e.g. is that I have to send the same file over and over again).
    Please suggest. Thanks in advance.

    Hi,
    You can overide the Delete File setting by using a logical name instead of a physical path to the folder.
    When you use logical names for the file read and archive locations, two properties are added to the service/reference binding with the name you have given them in the wizard.
    The value between the tags can be overwritten. Initials they''re blank/empty.
    <property name="fileDelLoc" type="xs:string" many="false" override="may">c:\temp\out</property>
    <property name="fileLoc" type="xs:string" many="false" override="may">c:\temp\in</property>
    These properties can be changed on deployment time with a configuration plan or on runtime via the EM in the settings page of the service binding.
    <service name="ReadFileService">
      <property name="fileDelLoc">
         <replace></replace>
       </property>
       <property name="fileLoc">
         <replace></replace>
       </property>
       <binding type="jca"/>
    </service>
    Cheers,
    Robert van Mölken
    Senior Oracle Integration Specialist

  • How to get folder(directory path only not file path) from local file system

    Hi Firends,
    How to get folder(directory path only not file path) from local file system , whenevr i will click on browse button.
    Please give reply for this one , if anybody knows.
    Thanks,
    Anderson.

    Hi Anderson,
    if you're using flash.filesystem.FileReference - then it is run in black box - except of filename, size and creation data (and few other properties available after some operation succeeded). This is part of security features in Flash runtime (described in header section):
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html
    This for example implies that user can download a content to local machine - but that content cannot be loaded back into Flash runtime. For this you would need either Air runtime flash.filesystem.File:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
    (so you would created Air runtime based application: desktop or mobile but not web, even as standalone project) or you would need one of 3rd party tools that add file access/file information features to standard Flash runtime applications converted to standalone native applications.
    hth,
    kind regards,
    Peter

  • Passing Streaming Content to a JCA FTP adapter in OSB

    Hi,
    Is there any way to pass streaming content represented by e.g.<con:binary-content ref="cid:1b6ff6d0:1416f7a74ab:-1d8a" xmlns:con="http://www.bea.com/wli/sb/context"/> to JCA FTP(business service) adapter?
    My binary content already represents base64Binary format. Content is around 250Mb so there is no possibility to put it to memory(java.lang.OutOfMemoryError).
    FTP Adapter wsdl
    <wsdl:definitions
         name="FTPAdapter"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Adapter/FTPAdapter/FTPAdapter"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/Adapter/FTPAdapter/FTPAdapter"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
         xmlns:FTPAPP="http://xmlns.oracle.com/pcbpel/adapter/ftp/"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
        >
      <plt:partnerLinkType name="SaveFile_plt" >
        <plt:role name="SaveFile_role" >
          <plt:portType name="tns:SaveFile_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
        <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
                xmlns="http://www.w3.org/2001/XMLSchema" >
          <element name="opaqueElement" type="base64Binary" />
        </schema>
        <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/" xmlns="http://www.w3.org/2001/XMLSchema"
                attributeFormDefault="qualified"
                elementFormDefault="qualified" >
           <element name="OutboundFTPHeaderType" >
             <complexType>
               <sequence>
                 <element name="fileName" type="string" />
                 <element name="directory" type="string" />
                </sequence>
               </complexType>
           </element>
        </schema>
        </wsdl:types>
        <wsdl:message name="SaveFile_msg">
            <wsdl:part name="opaque" element="opaque:opaqueElement"/>
        </wsdl:message>
        <wsdl:message name="Output_msg">
            <wsdl:part name="body" element="FTPAPP:OutboundFTPHeaderType"/>
        </wsdl:message>
        <wsdl:portType name="SaveFile_ptt">
            <wsdl:operation name="SaveFile">
                <wsdl:input message="tns:SaveFile_msg"/>
                <wsdl:output message="tns:Output_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>

    aren't the default cluster aware settings enough for this ?
    http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm
    Scalability
    you could enable a few in the adapter wizards

  • How to specify source directory in File sender adpate using (NFS)?

    Hello experts,
    I am doing File-PI-Proxy scenario.
    Input file is available on machine which is within the Network area and FTP is not available on that machine.
    For this reason I am using the NFS Transport Protocol.
    In ID File sender I have specified Source Directory:-
    IP Address\Directory
    I am geeting the Error in RWB as 'Configured source directory '
    IP Address\Directory' does not exist'.
    Please suggest how to specify the Source Directory path.
    Regards,
    Jagesh

    Hi,
    If you want to use NFS protocol, then the file needs to be within the a folder in the XI server and not outside it, In your case if you need to use the file in a different machine which is on a network then try to use the FTP protocol.
    Refer this blog:
    /people/shabarish.vijayakumar/blog/2006/08/01/along-came-a-file-adapter-mr-ftp-and-rest-of-the-gang which shows the details of how you can install a local FTP and use it
    Regards,
    Nithiyanandam
    Edited by: Nithiyanandam A.U. on Mar 18, 2009 10:43 AM

  • FTP Adapter to read multiple files from a directory. Not through polling.

    Dear Friends,
    I would like to know is it possible to configure the FTP adapter in Oracle BPEL 10.1.3.4 to read multiple files (different names, same structure) from a given directory. I do not want the BPEL to do a polling. Instead when I submit the BPEL process it should read all files from the directory.
    I was looking at the option of Synchronous read but I am not able to specify wild card in the file name field. I do not know the file names at the time of reading.
    Thanks for your help!

    Hi,
    While you read the file, you can configure an adapter property in 'Receive'. This will store the filename, this filename can be used for sync read as the input parameter.
    1. Create a message type variable called 'fileheader'. This should be of type Inboundheader_msg (whatever relevant Receive activity).
    2. This variable will contain three parts - filename, FTPhost, FTPPort
    3. Copy this fileheader to 'Syncheader'.
    4. syncheader can be passed as an adapter proerty during sync read of the file.
    During Receive and Invoke, you need to navigate to 'Adapter' tab to choose the created message type variable.
    Let me know if you have further questions.
    regards,
    Rev

  • How to specify the directory in which we want to store the uploaded files

    Hello !!
    I am using apache commonfile upload for uploading my files.I followed the user guide and tried to run a program,but my problem is I am not able to understand as to how to mention the directory in which the uploaded file will be saved..My code is given below :
    package r;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import org.apache.commons.fileupload.*;
    import org.apache.commons.fileupload.servlet.*;
    import org.apache.commons.fileupload.disk.*;
    import org.apache.commons.io.*;
    import java.lang.Exception;
    public class fileupload extends HttpServlet
         public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException
                   // Check that we have a file upload request
                  boolean isMultipart = ServletFileUpload.isMultipartContent(request);
                 System.out.println(isMultipart);
                 if (ServletFileUpload.isMultipartContent(request))
                 // Create a factory for disk-based file items
                   FileItemFactory factory = new DiskFileItemFactory();
                   // Create a new file upload handler
                   ServletFileUpload upload = new ServletFileUpload(factory);
                   // Parse the request
                   try {
                               List items= upload.parseRequest(request);               
                             Iterator iter = items.iterator();
                             while (iter.hasNext())
                                   FileItem item = (FileItem) iter.next();                    
                                 if (item.isFormField()) //NORMAL FORM FIELD
                                 String name = item.getFieldName();
                                  String value = item.getString();
                                  System.out.println(value);                                                             
                                  else
                                 String fileName = item.getName();
                                 System.out.println(fileName);
                                    String contentType = item.getContentType();
                                  File saveTo = new File("/info/upload_files/myFile.jpeg");
                             try
                                       item.write(saveTo);
                                       System.out.println("File written" );                    
                             catch(Exception e)
                                         System.out.println("File not written");
                                   // InputStream fs= item.getInputStream();                    
                                   fileName = FilenameUtils.getName(fileName);
                                    System.out.println(fileName);
                        }//end of try
              catch (Exception e) { }
         public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
                 doGet(request,response);
    The problem is that the control doesn't reach the try statement and I get " File not written" on the console because it enters catch everytime..Please tell me how the path to the directory should be given...Rest of the code is working fine

    No, the problem is that when an Exception is thrown, you ignore it completely and throw away all the information associated with it. That leaves you to guess at what the problem is. So instead of answering your guess at a good question, I'm going to suggest that in all of your catch blocks you put this code:e.printStackTrace();Then you can look at the output in the log file and see what the problem is. Start from there.

  • How to specify the directory of a file created by FileOutputStream?

    I created a file name registry.reg. Can I specify the directory of the file so that it would be located in certain directory. For example I want to put registry in C:\Desktop
    FileOutputStream fileStream = new FileOutputStream ("registry.reg");

    Well, just provide the complete path as file name parameter. On Windows, remember to escape those backslashes:
    FileOutputStream fileStream = new FileOutputStream ("C:\\Desktop\\registry.reg");

  • FTPs connection error:When using Variable substitution for Directory path

    Hi
    I am transferring data from BI to xml file via PI: Here a Client proxy from BI sends the data to PI and the PI FTPs the XML file to a remote location. For FTP I am using FTPs SSL connection.
    It was working fine untill I used Variable susbstitution to determine Directory path dynamically. I am using this because different xml files are intended to goto the different locations.
    I did the variable substitution like this:
    Target Message Structure:
    ---> Target Directory: %var1%
    <?xml version="1.0" encoding="UTF-8" ?>
    <MT_BI_EXTRACT_FILE>
      <Header>
         <Directory>/Customer</Directory>
    </Header>
    <Detail>
    </Detail>
       </MT_BI_EXTRACT_FILE>
    And in the variable substitution I am doing it this way
    payload:MT_BI_EXTRACT_FILE,1,Header,1,Directory,1
    And the error I am getting is:
    Attempt to process file failed with Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure.
    Does anybody have some Idea of this ??
    Regards
    Naina

    Hi,
    I guess the problem is not with Variable Substitution..
    Error when getting an FTP connection from connection pool:
    So its a connection problem..
    Also check the option Disable Security check and try again...
    Try to check again if the interface is executing properly without Variable substitution and let us know..
    Babu
    Edited by: hlbabu123 on Jan 7, 2011 2:46 PM

  • How to get absolute directory path of a resource?

    Hi,
      I wished to retrieve the absolute directory path of a resource, for example, "demo.test" in the folder of "/document/personal". How to I get the value "/document/personal", is there any IPropertyName i could use?
    Thanks for any suggestions.

    Hi,
    first, the accessRID is the RID which was used at creation time, maybe containing links; these are resolved, so you will get the "physical" place where the file is stored by <i>getRID</i>.
    Second, to determine the path without the name of the file, there are at least three possibilities without looping (resource, the file, is an instance of IResource):
    1.) String path = resource.getParentCollection().getRID().toString();
    2.) String path = resource.getRID().toString().substring(0, resource.getRID()().toString().lastIndexOf('/'));
    3.) String path = resource.getRID()().toString().substring(0, resource.getRID()().toString().length() - resource.getName().length());
    Solution 1 seems to be very intuitive (you ask for the folder path, where the file is in), 2 & 3 are shorter than a loop, but not intuitive and in general dangerous (when using substring, you have to take care of exceptions caused by strange parameters).
    Hope it helps
    Detlev

  • Passing file name dynamically in Synchronous read operation of FTP adapter in OSB

    Hi,
    We are implementing the integration in OSB 11g and using FTP JCA adapters to check if the file exists in the FTP location or not. We are using Synchronous read operation of FTP adapters. We need to pass the file name dynamically at run time. In the JCA file we can hard code the file name. How that file name can be taken dynamically using OSB.
    Regards,
    Sharmistha

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

  • How to specify a file path in java code to run on Unix machine?

    Hi
    I have a problem when running my project Swing on Unix machine.
    In my code, the user will press a button and then the program will look for the file "ReadMe" in the folder "Documentation" , and reads the content of this file. My code is "Documentation\\ReadMe" and it works well on PC. (The folder "Documentation" is in the same directory with my Java code).
    But when I try on Unix, the program can not read the file. It can only read the file "ReadMe" if I take this file and put it in the same directory with my Java code ( this means not through another folder). So how can we make it read the file in a folder ? It seems that "Documentation\\ReadMe" does not work in Unix, or the symbol "\\" does not work.
    I would be thankful if anybody can help me with this.
    Thank you very much

    You really shouldn't use any path method, as neither are very consistant or platform independent. The JVM provides a way to grab resources from the classpath. These resources can be any data at all, in fact, it's how java itself locates classes. Here's an example how you would do this in a non-static method.
    public URL getReadMe() {
      // In this context the forward slash is universal
      String docDirectory = "Documentation/"
      // We have to use the classloader to grab the resource
      ClassLoader cl = this.getClass().getClassLoader();
      // Next we get the resource 
      URL readMeURL = cl.getResource(docDirectory + "ReadMe");
      return readMeURL;
    }The URL can be used in whatever way you need to get the information out of the resource. If it was an image you might use the "Toolkit" to make an image object out of it. The great thing about this method is it will work even if your loading the program out of a Jar file. The resource paths start at the top of the classpath, just like classes.

  • How to specify the file path while doing bdc recording

    hi guys,
    using recording we specify transaction code where we enter all the details for the screen after that we get the recording program .....i have a doubt where can we specify the path for uploading a program from a local pc.......if possible can anyone provide a simple program to explain recording to upload an excel file from the system using recording

    Hi Gokul,
      You can use the following code to upload excel data into internal table.
       PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.
        CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
               CODEPAGE                = ' '
               FILENAME                = P_FILE
               FILETYPE                = 'DAT'
               HEADLEN                 = ' '
               LINE_EXIT               = ' '
               TRUNCLEN                = ' '
               USER_FORM               = ' '
               USER_PROG               = ' '
          IMPORTING
               FILELENGTH              =
           TABLES
                DATA_TAB                = IT_FILE
          EXCEPTIONS
               CONVERSION_ERROR        = 1
               FILE_OPEN_ERROR         = 2
               FILE_READ_ERROR         = 3
               INVALID_TABLE_WIDTH     = 4
               INVALID_TYPE            = 5
               NO_BATCH                = 6
               UNKNOWN_ERROR           = 7
               GUI_REFUSE_FILETRANSFER = 8
               CUSTOMER_ERROR          = 9
               OTHERS                  = 10
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        CLEAR IT_FILE.
      ENDIF.
    In SAP Enterprise edition, You can use FM : GUI_UPLOAD.
    From internal table, Data will be moved to BDCDATA and continue with BDC coding.
    Reward, if useful.
    Thanks,
    USR

  • How to specify the saving path pdf by a "saveas" button in Javascript?

    Hello,
    Firstly, I use LiveCycle ES3 designer on PC. I created a form with a button executing a Java script that opens a dialog box "save as ..." like this:
    \ \ Script save-as \ \
    app.execMenuItem ("SaveAs");
    I would like to predefine a file path to open the dialog box that opens by default on the current location of the file "C: \ export \" for example.
    Could someone help me telling me the code and nomenclature to be used for this?
    I know Livecycle use XFA language and can use the "myDoc.saveAs ();" but I do not know how :-/
    I found this post in this forum but I don't understand how to use this code directly with a click event on a button
    http://forums.adobe.com/thread/685920
    There is also a tutorial here but I can not seem to apply
    http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript
    Thank you in advance for your help :-)

    Try putting this script in the click event of the button
    Hidden_Text_Field_Path.rawValue=this.somExpression;
    This ought to work using either FormCalc or JavaScript.  I'm not sure from your description whether you will need to use the full path name for the hidden text field or use a relative one, but that's not too hard to deal with.

  • How can i specify current directory path of wsusscn2.cab

    SCRIPT:
    How can i set current directory file path of wsusscn2.cab where i placed this vbscript, instead of going to c:\wsusscn2.cab.
    =======================================================================
    Dim fso
    Set wshNetwork = CreateObject("WScript.Network")
    strUser = wshNetwork.Username
    Set fso = WScript.CreateObject("Scripting.Filesystemobject")
    Set f = fso.CreateTextFile(".\Missing Patch Details\" & wshNetwork.ComputerName & "_missing_patches.csv", 2)
    Set UpdateSession = CreateObject("Microsoft.Update.Session")
    Set UpdateServiceManager = CreateObject("Microsoft.Update.ServiceManager")
    Set UpdateService = UpdateServiceManager.AddScanPackageService("Offline Sync Service", "c:\wsusscn2.cab")
    Set UpdateSearcher = UpdateSession.CreateUpdateSearcher()
    WScript.Echo "Searching for updates..." & vbCRLF
    UpdateSearcher.ServerSelection = 3 ' ssOthers
    UpdateSearcher.ServiceID = UpdateService.ServiceID
    Set SearchResult = UpdateSearcher.Search("IsInstalled=0")
    Set Updates = SearchResult.Updates
    If searchResult.Updates.Count = 0 Then
        WScript.Echo "There are no applicable updates."
        WScript.Quit
    End If
    WScript.Echo "List of applicable items on the machine when using wssuscan.cab:" & vbCRLF
    For I = 0 to searchResult.Updates.Count-1
        Set update = searchResult.Updates.Item(I)
    f.WriteLine update.Title
    'WScript.Echo I + 1 & "> " & update.Title
    Next
    WScript.Quit
    ==========================================================================
    prakash

    Just remove the c:\ and it will be looked for in the current directory.
    If you want the script how get the script path and remove the file name or use the shell
    currentFolder = CreateObject("WScript.Shell").CurrentDirectory
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Item text (BSEG-SGTXT) is not getting updated in Payment document generated

    Hi All, Item text (BSEG-SGTXT) is not getting updated in Payment document generated through F110. After generating the payment document via Transaction Code u2013 F110, system is not updating the Text field (BSEG-SGTXT) in the payment document with t

  • How can i get rid of this problem ?

    Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DW050 ... WARNING: DF012 ...   -------------------------------------- Summary --------------------------------------  - 0 fatal error(s), 20 error(s)

  • How to do with OC4J

    Q: How to do Many:1, and 1:Many OR-mapping with OC4J/Jdev9i (NO BC4J)? Q: How to do SessionTracking & debuggning with OC4J? Q: How to do batch-updates ? HS

  • Staging Area

    Hi all, 'Backordered quantities are left in the staging subinventory. They are not automatically returned to their source location' What can i do to return them back to their location? Is it possible to let me know how can i achieve this? Thanks Newb

  • Reading data from a set of tables

    Hi, I am writing code to extract the data from several tables in a database. For each table, I am dynamically getting the number of fields or columns in the table and using Resultset obtaining the data in every field for each row. I do this using the