FTP Adapter - file.sender.customizer_class

Hey,
Anyone has a working example on how to implement this class?
I have one class, and apparently, in its simplest form it could be something like this:
package slf.nask.FileSender;
import java.util.Date;
import oracle.oai.agent.adapter.sdk.Agent;
import oracle.oai.agent.adapter.sdk.AttributeObject;
import oracle.oai.agent.adapter.sdk.MessageObject;
import oracle.oai.agent.adapter.technology.FileSenderCustomizer;
import oracle.oai.agent.adapter.transport.TransportMessage;
public class SLFNaskFileSenderCustomizer implements FileSenderCustomizer {
     public static void main(String[] args) {
          System.out.println("Interconnect renaming facility!");
     public String generateFileName(Agent agent, String rule, String app,
               String partitition, Date time, MessageObject mobj,
               AttributeObject aobj) {
          return "MyFilename.xml";
     public void customizeTransportMessage(Agent agent,
               TransportMessage transportMessage, MessageObject mobj,
               AttributeObject aobj) {
But I keep running into an error when running the adapter. If i comment out this class, it works fine, but once this class is in, it keep getting a parseLong error.
Log entry:
TransportProperties.TransportProperties():ota.d3ls=agresso_customer.xml;file.sender.type=ascii;file.receiver.max_msgs_retrieved=30;file.receiver.exception_dir=file://localhost/R:\nask\errors;file.sender.customizer_class=SLFNaskFileSenderCustomizer;ota.type=D3L;file.sender.file_name_rule=NA%TIME%_3.c15;ota.send.endpoint=file://localhost/R:\nask\AgressoFTP\TEST;file.receiver.polling_interval=60000;
java.lang.NumberFormatException: 1240438527
4
     at java.lang.Long.parseLong(Long.java:319)
     at java.lang.Long.parseLong(Long.java:363)
     at oracle.oai.agent.common.logger.ErrorLogObserver.readNextLogObject(ErrorLogObserver.java:361)
     at oracle.oai.agent.common.logger.ErrorLogObserver.run(ErrorLogObserver.java:137)
     at java.lang.Thread.run(Thread.java:484)

Looks like the fault here, was the package. Leave it empty and it should be fine!

Similar Messages

  • Adapter file sender -archiving doesn't work sometimes

    Hi everybody,
    We are on PI 7.1 on windows 2008 server  64 bits
    I have something strange..
    I developped a few time ago a flow
    File adapter => PI => SAP R/3 RFC
    When the adapter file sender pick up the file, he should normally archive them.
    The archived file is well created in a separated directory with an addition of timestamp and the normal process after is the deletion of original file.
    The strange thing happens during the last operation. Sometimes it is deleted and sometimes it is not deleted. .
    In the second case, the adapter file  will retreat it after a few time => it generates an error of duplicate key   (Of course in PI has already treated it). That case can happen more than 10 times until the delete of the file works.
    I applied many other flows with the same principle but with other directories (on the same server) and that happens with that only one.
    Does somebody have an idea what could be the origin of that strange behavior?
    All the ideas are welcome.
    Thank you in advance for your help.
    E. Koralewski

    When the file fails to be archived, the transaction should be rolled back (therefore, message wouldn`t be generated). Please apply both notes below and check if the issue persists.
    [Note 1549500 - XPI File Adapter exactly once procedure fails|https://websmp230.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1549500]
    [Note 1361305 - File sender adapter generates duplicate message IDs.|https://websmp230.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1361305]

  • Adapter file sender doesn't split file into multiple message

    Hi everybody.
    We are in PI 7.0 SP10.
    In adapter file sender, I want to split a file into multiple file.
    We use protocole "file content conversion"
    in the field "recordset per message", I put the value 10 to test.
    The file content 30 records .
    The result we have is the treatment is not split into multiple message .
    The treatment is made but with one message.
    I need  to treat big files.
    Is there some one who have an idea  why t doesn't work ?
    Thanks in advance for your help.
    Regards
    Edited by: Eric  KOralewski on Jun 25, 2009 3:14 PM

    Hi,
    have you specified recordset name......if not, then specify it.............
    in recordset structure, specify like RECORD,1 and not RECORD,*
    again test your scenario......if still your file data is not getting split, then ask your basis guys to do a full CPACache refresh using PIDIRUSER..........your basis guys will know how to do it..........then again test your scneario............
    Regards,
    Rajeev Gupta

  • PI 7.1 using FTPS as File Sender Adapter: Problem connecting to Server!

    Hi
    We are using SAP PI 7.1 and I am trying to connect to an FTPS Server, but always get the following Error in the log: "Channel FileReceiver: Error connecting to ftp server 'hostname': com.sap.aii.adapter.file.ftp.FTPEx: The control connection to the FTP server hostname timed out while reading the server reply."
    I checked all the parameters and they seem to be ok! When I am using the same parameters with a WS_FTP Client Tool on the same server, I can establish the connection! Hostname, Port, User, Pass, etc must be ok ... I also imported the CA Certificate into the "TrustedCAs" KeyStore ...
    We also checked if on FTPS Server side we can see anything in the logfiles, but it seems that PI (Fiel Adapter) does not send anything to the FTPS Server. On OS Level we see that a TCP Connection is established tho the Server on the correct Port and we also used a tool to analize if data is sent over the established connection, but there was no data :-o
    Can anybody help me?
    Thanks
    Christoph

    Hi Pavan
    Access rights are ok ... how do I check if my PI Sysem supports FTPS? We have installed the crypto extensions and I also can select the FTPS Option on the file adapter. Is there anything else that must be enabled or configured?
    Regards
    Christoph

  • Sender FTP Adapter (file transfer w/o mapping)

    Hello everyone!
    Is there a way to configure a Sender FTP Adapter such that it simply picks up a file in an FTP folder then moves it to another FTP folder without changing any data (no mapping needed)?
    I tried doing it, but the Sender Agreement requires you specifiy an Outbound interface (which is not needed in this case). Would anyone of you know a workaround to this?
    Warm regards,
    Glenn

    Hi
    Use dummy interface name. But that should be same in ID objects
    Check this
    How to send any data (even binary) through XI, without using the Integration Repository
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Oct 29, 2008 9:48 AM

  • FTP adapter should send file as binary attachment

    Hello,
    we user XI 3.0 and want to implement the following scenario:
    - FTP adapter has to read binary files (*.tif and *.xls)
    - Receiver adapter is an ABAP proxy
    We want to get the file content as attachment to the message or as binary string in the payload. Is it possible? I Think the FTP adapter can only handle the file content over as complete message payload and not as an attachment. File content conversion is not possible because we read non textual files. Do any adpater modules exist that could swap the payload to attachment? In my point of view the PayloadSwapBean can only handle the other way.
    Any suggestions?
    Thanks in Advance,
    Daniel

    Hello,
    with the file adapter in NFS mode it is easy to attach one file as payload and further files as attachment.
    But as I stated above we use the FTP mode (and we have no NFS server!). The binary file is read by the adapter and assigned to the message as main payload. The proxy inbound handling is not able to parse the payload because it will see it as application/xml.
    I'm looking for one of the following solutions:
    1) swap the content of the main payload to an attachment. This can be processed at the proxy
    2) perhaps it is possible to change the mime type of the main payload to reflect the xls or tif content with the MessageTransformBean. But what has to be done at the proxy inbound side?
    Best regards,
    Daniel

  • Configuration FTP Adapter XML - Sender

    Hello:
    I need to configure dynamically the IP, directory and file name of the FTP through a Sender file/FTP adapter; in other words, I need to set those parameters in the XML message. The IP address, directory and file name of the FTP are obtained in the first message and match with another, which is sent to the adapter (communication channel) to get the data of a file.
    I would appreciate your help.
    Thanks a lot!

    Hi Julio,
    Configuring dynamically the parameters for FTP sender adapter is not possible, due to two reasons,
    1. FTP sender is a pull adapter, so you cannot set parameter (in runtime) and fetch the data.
    2. FTP sender is a async adapter
    Try to have a soap sender with AXIS framework (thought i have never tried, but this looks promising).
    Regards
    Suraj

  • How to get outbound ftp adapter file name

    All,
    I am writing an ftp adapter sending out files. The file name is defined as po_%yyyyMMDD%.xml format. However, I need to save the filename into a database after each file is sent out. How could I get the filename after invoking this service? It is on soa 10.1.3.3.
    I tried to create a filename variable based on outbound message type and pass that long in the invoke header. But cannot get the name back. Any idea?

    Hi,
    Go thro' the URL:
    http://abhishek-soablog.blogspot.com
    Cheers,
    Abhi...

  • No Service Error: FTP Adapter file write

    Hi,
    I am trying to write a file to a FTP server (Windows).
    I am able to connect to the FTP through command prompt and put the files as well.
    And to connect to FTP through IE, I had to uncheck "Use Passive FTP" under Tools-Internet Options-Advanced and then I was able to access folders successfully.
    But through FTP adapter, I am getting No Service Error. Below is complete error message.
    summary=<summary>Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Put' failed due to: Error sending file to FTP Server.
    Error sending file to FTP Server.
    Unable to send file to server.
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </summary>
    ,detail=<detail>No Service Error.
    No Service Error.
    No service available for host: 10.91.10.38
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    </detail>
    ,code=<code>null</code>}
    Thanks

    I was contacted by our DBA team for an exception received while writing a file to a FTP location.
    Then i looked at the exception message and asked them to check the whether they are able to contact the ftp server using command prompt then they said the user password got expired.
    They reset the password and its working now.
    Am i missing something here :(
    Exception:
    WSIF JCA Execute of operation 'Put' failed due to: Error sending file to FTP Server.
    Unable to send file to server.
    ; nested exception is:
    ORABPEL-11429
    Error sending file to FTP Server.
    Unable to send file to server.
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.
    Thanks,
    Vijay
    Edited by: veejai24 on 25-Jul-2012 07:10

  • FTP Adapter Location - sending alerts

    Hi,
    we have a FTP adapter to receive files from FTP.
     but i have a requirement like, if the file is not received in the specific time frame , then biztalk orchestration should send an error alert. 
    Is there any possibility to do it in Biztalk adapter / orchestration?
    Please help me.
    Vinoth

    Hi,
    You can leverage ESB Exception Notification service ,if you are using ESB Portal for Exception handling .
    Just what you need to do is to useEpression shape and throw exception shape along with delay shape .
    Define a variable of type System.exception and use it in thow exception shape.
    For refenerce you can use
    http://stephenomo.blogspot.ca/2011/10/force-exception-with-throw-exception.html
    Configure Email subscription at your Portal for specific Application .
    Another way is to use SMTP message along with delay shape in Orchestration or Using Failed message rounting which will be subscribed by another Child Orchestration responsible for sending messages .
    Thanks
    Abhishek

  • Receiver FTP Adapter File Size Splitting

    Hi,
    I am receiving an IDoc from R/3 into XI.
    I then map this IDoc into an xml file and use a receiver ftp adapter to drop the files onto a ftp server.
    Is there anyway, that I can use the adapter to split the message interface into smaller files.  For example, if I were to ftp the message interface into 1 file, the file size would be 1MB.  I would like to split the 1 message interface into 4 x 250kb files without having to split the message interface?
    Thanks,
    Miguel

    Hi,
    If you split into 4 files each one should be a XML file right?
    This is possible without BPM.
    Go thro the blog:
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Wat u need to do is make the target side 0..unbounded. If u have 100 records, Map some  25 records in first occurence, 25 in second and so on. This way u can reduce file size.
    Regards,
    P.Venkat

  • FILE and FTP Adapter file size limit

    Hi,
    Oracle SOA Suite ESB related:
    I see that there is a file size limit of 7MB for transferring using File and FTP adapter and that debatching can be used to overcome this issue. Also see that debatching can be done only for strucutred files.
    1) What can be done to transfer unstructured files larger than 7MB from one server to the other using FTP adapter?
    2) For structured files, could someone help me in debatching a file with the following structure.
    000|SEC-US-MF|1234|POPOC|679
    100|PO_226312|1234|7130667
    200|PO_226312|1234|Line_id_1
    300|Line_id_1|1234|Location_ID_1
    400|Location_ID_1|1234|Dist_ID_1
    100|PO_226355|1234|7136890
    200|PO_226355|1234|Line_id_2
    300|Line_id_2|1234|Location_ID_2
    400|Location_ID_2|1234|Dist_ID_2
    100|PO_226355|1234|7136890
    200|PO_226355|1234|Line_id_N
    300|Line_id_N|1234|Location_ID_N
    400|Location_ID_N|1234|Dist_ID_N
    999|SSS|1234|88|158
    I would need a the complete data in a single file at the destination for each file in the source. If there are as many number of files as the number of batches at the destination, I would need the file output file structure be as follows:
    000|SEC-US-MF|1234|POPOC|679
    100|PO_226312|1234|7130667
    200|PO_226312|1234|Line_id_1
    300|Line_id_1|1234|Location_ID_1
    400|Location_ID_1|1234|Dist_ID_1
    999|SSS|1234|88|158
    Thanks in advance,
    RV
    Edited by: user10236075 on May 25, 2009 4:12 PM
    Edited by: user10236075 on May 25, 2009 4:14 PM

    Ok Here are the steps
    1. Create an inbound file adapter as you normally would. The schema is opaque, set the polling as required.
    2. Create an outbound file adapter as you normally would, it doesn't really matter what xsd you use as you will modify the wsdl manually.
    3. Create a xsd that will read your file. This would typically be the xsd you would use for the inbound adapter. I call this address-csv.xsd.
    4. Create a xsd that is the desired output. This would typically be the xsd you would use for the outbound adapter. I have called this address-fixed-length.xsd. So I want to map csv to fixed length format.
    5. Create the xslt that will map between the 2 xsd. Do this in JDev, select the BPEL project, right-click -> New -> General -> XSL Map
    6. Edit the outbound file partner link wsdl, the the jca operations as the doc specifies, this is my example.
    <jca:binding  />
            <operation name="MoveWithXlate">
          <jca:operation
              InteractionSpec="oracle.tip.adapter.file.outbound.FileIoInteractionSpec"
              SourcePhysicalDirectory="foo1"
              SourceFileName="bar1"
              TargetPhysicalDirectory="C:\JDevOOW\jdev\FileIoOperationApps\MoveHugeFileWithXlate\out"
              TargetFileName="purchase_fixed.txt"
              SourceSchema="address-csv.xsd" 
              SourceSchemaRoot ="Root-Element"
              SourceType="native"
              TargetSchema="address-fixedLength.xsd" 
              TargetSchemaRoot ="Root-Element"
              TargetType="native"
              Xsl="addr1Toaddr2.xsl"
              Type="MOVE">
          </jca:operation> 7. Edit the outbound header to look as follows
        <types>
            <schema attributeFormDefault="qualified" elementFormDefault="qualified"
                    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/"
                    xmlns="http://www.w3.org/2001/XMLSchema"
                    xmlns:FILEAPP="http://xmlns.oracle.com/pcbpel/adapter/file/">
                <element name="OutboundFileHeaderType">
                    <complexType>
                        <sequence>
                            <element name="fileName" type="string"/>
                            <element name="sourceDirectory" type="string"/>
                            <element name="sourceFileName" type="string"/>
                            <element name="targetDirectory" type="string"/>
                            <element name="targetFileName" type="string"/>                       
                        </sequence>
                    </complexType>
                </element> 
            </schema>
        </types>   8. the last trick is to have an assign between the inbound header to the outbound header partner link that copies the headers. You only need to copy the sourceDirectory and SourceGileName
        <assign name="Assign_Headers">
          <copy>
            <from variable="inboundHeader" part="inboundHeader"
                  query="/ns2:InboundFileHeaderType/ns2:fileName"/>
            <to variable="outboundHeader" part="outboundHeader"
                query="/ns2:OutboundFileHeaderType/ns2:sourceFileName"/>
          </copy>
          <copy>
            <from variable="inboundHeader" part="inboundHeader"
                  query="/ns2:InboundFileHeaderType/ns2:directory"/>
            <to variable="outboundHeader" part="outboundHeader"
                query="/ns2:OutboundFileHeaderType/ns2:sourceDirectory"/>
          </copy>
        </assign>you should be good to go. If you just want pass through then you don't need the native format set to opaque, with no XSLT
    cheers
    James

  • FTP Adapter File Size Limit

    Hi,
    Is there a limit on file size for FTP 'put' operation in BPEL/ESB FTP adapter for the file in ASCII format?
    For File adapter polling the limit is 7 MB unless Debatching feature is used I think.
    Thanks

    There used to be but in 10.1.3.4 the restriction has been lifted but there are some restrictions. If you have File / Ftp input and File / Ftp out put you can use the MOVE functionality
    http://download.oracle.com/docs/cd/E12524_01/relnotes.1013/e12523/adapters.htm#CHDHJGHG.
    If you are using DB adapter this won't work and the 7MB file limit exists, although this is really streatching it. I wouldn't go above 1MB. Oracle Data integrator is a good option for this kind of pattern.
    cheers
    James

  • Soa 10g Ftp adapter file  size

    Hi,
    I am using a ftp adapter to transfer files. I am placing a 9kb file but after the transfer at the destination I find the file transferred but the file size is 2.8kb. Please do suggest me the possible solution and the reason for this issue
    Thanks

    What 10g version do you have?
    Try adding the following property to your outbound ftp wsdl file:
    <partnerLinkBinding name="xxxxx">
    *<property name="control.read.timeout">10000</property>*
    </partnerLinkBinding>
    (it's in milliseconds)
    Arik

  • FTP Adapter File Polling does not raise error when FTP server is down

    Hi All,
    Thanks in advance.
    I am polling for new files in a FTP Server. However, if the server is down there is no way for me to catch the fault to notify someone. I am using fault-policies but that never gets triggered when polling an unavailable FTP Server.
    One option is to have a completely separate scheduled process (SOA or not) that tries to connect to the servers but I am trying not to go that route just to keep things manageable and within the realm of the process.
    I am sure that I am not the only one polling for new files in a FTP Server, so I thought to pick your brain to tackle this scenario.
    Thanks for taking the time to read this.

    I was contacted by our DBA team for an exception received while writing a file to a FTP location.
    Then i looked at the exception message and asked them to check the whether they are able to contact the ftp server using command prompt then they said the user password got expired.
    They reset the password and its working now.
    Am i missing something here :(
    Exception:
    WSIF JCA Execute of operation 'Put' failed due to: Error sending file to FTP Server.
    Unable to send file to server.
    ; nested exception is:
    ORABPEL-11429
    Error sending file to FTP Server.
    Unable to send file to server.
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.
    Thanks,
    Vijay
    Edited by: veejai24 on 25-Jul-2012 07:10

Maybe you are looking for