Receiver File Adapter error

Hi all,
I am trying to convert the XML to Plain file in receiver file adapter. I am using module - StrictXml2PlainBean
My target structure is -
<MT_Name>
    <records>
        <Header>
        </Header>
        <Item>
        </Item>
    </records>
</MT_Name>
<Header> and <Item> are at same level.
When I use --
1. Header.fieldSeparator = ,
2. Item.fieldSeparator = ,
3. recordTypes = Header,Item
Then I get this error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: records at XML element MT_Name,records
When I use --
1. records.fieldSeparator = ,
2. singleRecordType = records
Then I get this error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: The element nesting level for the structure MT_Name is too deep (reference: 3 levels, found: 4 levels) at XML element MT_Name,records,Header,Item
To add more details to the scenario, multiple records can be generated but one record will have only one Header, with multiple Items.
Any help in this regard will be highly appreciated.
Thanks,
Abhi

Hi Abhi,
Here you go....
For your target structure as:
<MT_Name>
<records>
<Header>
</Header>
<Item>
</Item>
</records>
</MT_Name>
Where I have assumed that <Header> and <Item> are at same level.
DO NOT use any Module just simply configure the receiver channel as below:
In the file Receiver Channel
Recordset Structure = Header,Item
Name                                                                    Value
Header.fieldSeparator                                             ,
Item.fieldSeparator                                                  ,
I have tried this and it works.
Let me know if you are facing any issues.
Cheers
Dhwani

Similar Messages

  • Receiver file adapter error for special char.

    I am using MTB in my receiver file adapter. I am getting a special character from source system at end of the string. How to resolve this type of error u2013 please advice.
    This error is not coming for every message.
    Error message:
    Column value xxxx   too long - must stop, probably configuration error in file adapter
    Thanks
    Vick

    Hi,
    Itu2019s basically IDOC to file scenario.
    This error is coming for name field.
    What I am thinking at this stage to do changes in MTB by define parameters like (NameA.enclosureConversion)

  • Receive File Adapter - Error in CallSAPAdapter Name not known

    Using xml to File Adapter. Just want to store the xml file somewhere ie on XI Server in folder E:\usr\sap\interface\XMLfiles
    Getting error in Adapter Engine - Exception caught by adapter framework: Object not found in lookup of CallSAPAdapter.
    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: Object not found in lookup of CallSAPAdapter.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CallSAPAdapter..
    Receiver Adapter configured to receive file write a .tmp version no conversion so set type to Binary.
    I can see the Communication Channel in the monitor green.
    Any ideas to find the problem
    thanks,

    I tried changing the communication channel as suggested with no further success. I have viewed the LogViewer on the server in cluster->server->logs defaultTrace.trc and com.sap.xi -> xi.log with no more information available.
    So is it that I cannot do a simple XML send to file receiver and leave its content unchanged?
    My test message payload was of the order
    <?xml version="1.0"?><LIST><S_STX><C_STDS><D_STDS1>... with all the data in.
    Adapter type = file
    Receiver
    Transport Protocol = File System (NFS)
    Message Protocol = File
    Adapter Engine = Integration Server
    Target Directory = E:/usr/sap/Interfaces/XMLFiles (and tried it with /usr/sap/interface/XMLFiles)
    Create filedirectory = ticked
    Filename filename.xml
    File Construction Mode = add timestamp
    Write Mode = use temporary file
    Temporary filename scheme = filename.tmp
    Filetype = Binary
    Module Tab
    1     localejbs/CallSAPAdapter     Local Enterprise Bean     0
    and thats it.
    On testing from the Integration Engine it reaches the Adapter Engine and reports the error as stated in my first post.
    The message data is of the construct
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    - <SOAP:Header>
    - <sap:Main xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" versionMinor="0" SOAP:mustUnderstand="1" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
      <sap:MessageClass>ApplicationMessage</sap:MessageClass>
      <sap:ProcessingMode>asynchronous</sap:ProcessingMode>
      <sap:MessageId>09c99665-f3cf-d247-993b-8cb46c37d820</sap:MessageId>
      <sap:TimeSent>2007-09-19T16:42:31Z</sap:TimeSent>
    - <sap:Sender>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty">AS2</sap:Party>
      <sap:Service>XMLFILE</sap:Service>
      </sap:Sender>
    - <sap:Receiver>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty">MyCompany</sap:Party>
      <sap:Service>XMLFILE</sap:Service>
      </sap:Receiver>
      <sap:Interface namespace="http://warburtons.com/genhdr">MI_XMLFILE_V3</sap:Interface>
      </sap:Main>
    - <sap:ReliableMessaging xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:QualityOfService>ExactlyOnce</sap:QualityOfService>
      </sap:ReliableMessaging>
    - <sap:Diagnostic xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:TraceLevel>Information</sap:TraceLevel>
      <sap:Logging>Off</sap:Logging>
      </sap:Diagnostic>
    - <sap:HopList xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
    - <sap:Hop timeStamp="2007-09-19T16:42:31Z" wasRead="false">
      <sap:Engine type="IS">is.00.srvsapxidev</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XI</sap:Adapter>
      <sap:MessageId>09c99665-f3cf-d247-993b-8cb46c37d820</sap:MessageId>
    - <sap:Branch>
      <sap:MessageId>707ecbbd-a474-514d-b731-f4003c38c4df</sap:MessageId>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty">ASD</sap:Party>
      <sap:Service>IP_I_XMLFILE_Collect</sap:Service>
      </sap:Branch>
    - <sap:Branch>
      <sap:MessageId>09c99665-f3cf-d247-993b-8cb46c37d820</sap:MessageId>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty">MyCompany</sap:Party>
      <sap:Service>XMLFILE</sap:Service>
      </sap:Branch>
      <sap:Info>3.0</sap:Info>
      </sap:Hop>
    - <sap:Hop timeStamp="2007-09-19T16:44:56Z" wasRead="false">
      <sap:Engine type="AE">af.xid.srvsapxidev</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
      <sap:MessageId>09c99665-f3cf-d247-993b-8cb46c37d820</sap:MessageId>
      </sap:Hop>
      </sap:HopList>
      </SOAP:Header>
    - <SOAP:Body>
    - <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <sap:Payload xlink:type="simple" xlink:href="cid:[email protected]">
      <sap:Name>PayloadName</sap:Name>
      <sap:Description>PayloadDescription</sap:Description>
      <sap:Type>Application</sap:Type>
      </sap:Payload>
      </sap:Manifest>
      </SOAP:Body>
      </SOAP:Envelope>
    The Payload is
      <?xml version="1.0" ?>
    - <LIST>
    etc
    Message status
    2007-09-19 17:44:56 Success Message successfully received by messaging system. Profile: XI URL: http://srvsapxidev:50000/MessagingSystem/receive/AFW/XI Credential (User): XIISUSER
    2007-09-19 17:44:56 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    2007-09-19 17:44:56 Success Message successfully put into the queue.
    2007-09-19 17:44:56 Success The message was successfully retrieved from the receive queue.
    2007-09-19 17:44:56 Success The message status set to DLNG.
    2007-09-19 17:44:56 Success Delivering to channel: CC_toMyCompany_XMLFILE
    2007-09-19 17:44:56 Error Exception caught by adapter framework: Object not found in lookup of CallSAPAdapter.
    2007-09-19 17:44:56 Error 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: Object not found in lookup of CallSAPAdapter.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CallSAPAdapter..
    2007-09-19 17:44:56 Success The asynchronous message was successfully scheduled to be delivered at Wed Sep 19 17:49:56 BST 2007.
    2007-09-19 17:44:56 Success The message status set to WAIT.
    Now I have been reading all the documentation available and forum questions in this area but there is a lot of information but not quite for what I am currently trying to do. I need to preserve the xml file as xml for further processing. This is just a resting place for the file as I am trying to cut down a long running (over a day) collect BPM scenario by collecting the files in the directory then triggering the collect scenario to read in the files from this directory and perform all the processing and mapping in one chunk of short time. (But that is another story)
    Any more suggestions appreciated could the SAPCallAdapter not be where I think it is? Does my directory and filename case have to be exact lower and upper case. (I will test this tomorrow)...and let you know if any difference and continue to read the links put on by the other person who answered.
    thanks,

  • Error dynamic File Name in Receiver File Adapter

    Hi all,
    Dynamic file name for Receiver file Adapter Problem
    my multi mapping look like this in design mode
    messages
         message1
              SD01_E
                   FileName
                   row
         message2
              SD02_E
                   FileName
                   row
    by processing the xml look like this:
    <ns2:SD01_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    or
    <ns2:SD02_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    in file receivere adapter  i have try this but it dos not work
    payload:SD01_E,1,FileName,1
    Error:com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 0(:main:, row:1, col:0)
    is there any way to have access to Filename  in different root elements??
    regards
    Ralf

    Hi Ralf,
    i think, you need for each XML msg (each different root element) a new adapter -> a new IF determination, new rec agreement and a new channel.
    Regards,
    Udo

  • RECEIVER FILE ADAPTER FCC ERROR

    Hi team
    My scenario is a text file has to be picked up by PI, has to processe it and the receiver is Proxy and it has to get updated and sent back to FTP location.
    i am using Sender File Adapter with FCC and Also receiver File Adapter with FCC.
    Both the sender and receiver structures are same; i am using the same FCC parameters for both the sides.
    in Receiver File Adapter i am getting the following errors
    1) Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
    2)Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    please help me out
    thank you
    Edited by: vemugantivn on Aug 16, 2010 12:19 PM

    Hi,
    > 1) Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    >  Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
    > 2)Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    > Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    It is saying that you are not using the fieldSeparator parqameter.
    have you provided the field separator parameter? if not then give like below
    order_row.fieldSeparator : ,  (give what ever the separater you are using)
    or 
    order_row.fieldSeparator : 10,5,...  (if you are using fixed length)
    Regards
    Ramesh

  • Error in Receiver File adapter using File content Conversion

    Hi,
    I am getting the following error in the receiver file adapter.
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
    I am using the below parameters for FCC:
    Recordset Structure - statement
    statement.endSeparator - 'nl'
    statement.fieldSeparator - '0X09'
    statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
    ignoreRecordsetName - true
    Please let me know where i am going wrong.
    Thanks,
    Aparna

    Hi Aparna,
    I feel the problem in your content conversion parameters is with
    statement.fieldNames and ignoreRecordsetName
    When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
    [http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
    Hope this helps !!
    Regards,
    Amit

  • File Conversion error in Receiver File Adapter

    Hi ,
    I am facing the below error in  receiver file adapter .
    Conversion initialization failed: java.lang.Exception: java.lang.NumberFormatException: For input string: "4|8|10|2|10|4|10|4|40|40|40|1|20|2|20|8|40|0|12|12|12|1|12|4|4|8|40|8|8|8|8|12|40|8|10|10|10|10|10|1|10"
    Kindly suggest !
    Regards,
    Hemanthika

    Hi,
    Check it - File adapter is active ? try to Re-activate the same.
    Also do CPACache Refresh.
    Still problem, tyr out by restarting the Adapter Engine.
      I guess you're just trying to send all the data in your file record to a <data> element as a whole. If so, this blog will help you:
    Configuring Generic Sender File CC Adapter
    Under certain operating system platforms, such as Solaris, the APIs used by the Java Runtime (JRE) are not Unicode-aware. Consequently, the JRE needs to be configured to correctly interpret the character set it receives from the operating system.
    This is configured through the "file.encoding" system property as well as the "LANG" environment variable.
    Make sure you set "file.encoding" to a character set (such as ISO-8859-1) that supports the special characters you would like to process. This system property can be configured by appending "-Dfile.encoding=<encoding>" to the Java VM parameters section of the SAP J2EE Config Tool.
    Additionally, you need to set the "LANG" environment variable to a locale that supports more than 7 bits, such as "de.ISO8859-1". The encoding you specify in the LANG environment variable needs to match the encoding set via "file.encoding".
    You can persistently configure the environment variable by setting it in the profile $HOME/.sapenv_$HOSTNAME.csh of the <sid>adm user: setenv LANG de.ISO8859-1
    Refer this article
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    See below link
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Please refer this thread .
    File Adapter Not Initialized Error
    Cheers,
    Regards,
    Suryanarayana

  • Error while using module in receiver file adapter??

    Hi,
           I am using user defined module(for converting EBCDIC type of data to ASCII type of data)  in receiver file adapter, while running the module it is giving erors in audit log
    Exception caught by adapter framework: class com.sap.aii.af.mp.module.ModuleLocalHomeImpl0_0 can not be casted to ModuleLocalHome or SModuleLocalHome
    MP: exception caught with cause java.lang.ClassCastException: class com.sap.aii.af.mp.module.ModuleLocalHomeImpl0_0 can not be casted to ModuleLocalHome or SModuleLocalHome
    Please help.
    Thanks.
    Madhusudhan.

    hi ....Stephan
    now we are getting the below exceptions in the message disply tool audit log
    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: java.lang.Exception.
    MP: exception caught with message null
    Thanks,
    Madhusudhan.

  • Problem with file content conversion in receiver file adapter

    Hi All
    I have a problem with file content conversion in receiver file adapter.
    This is my recordset structure: Header_Record,1,Claim_Record,*,Check_Rec,1
    These are the content conversion parameters:
    Header_Record.fieldSeparator = ,
    Header_Record.endSeparator = 'nl'
    Claim_Record.fieldSeparator = ,
    Claim_Record.endSeparator = 'nl'
    Check_Rec.fieldSeparator = ,
    Check_Rec.endSeparator = 'nl'
    In SXMB_MONI, i can see that the data is correctly extracted from proxy, and correctly mapped to receiver message, and i see a checkered flag (success).
    But, Adapter status is RED with the following error message:
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    In communication channel monitoring, i get the following error message:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    What is going wrong here? Can anyone please tell me?
    Thanks
    Chandra

    Posted in Incorrect forum.
    Posted again in Process Integration forum

  • Problem with fixedlenthgs in receiver file adapter

    HI,
    I am doing XML to flat file scenario  and using mutli mapping concept without BPM.
    in the receiver file adapter I am using FCC with fixedlengths,then it generated just 3 output files out of nearly 100 source files.the errored one are succcessful in the SXMB_MONI and failing in RWB-->Message moni with waiting status and MDT says that XI_J2EE_ADAPTER_FILE ,Error Code PROCESSING_ERROR .
    i tried in SDN and then found something like enable the disablesecurity check box in variable substitution parameters ,then I got 4 files out.
    these are my FCC params for all structures:
    struc1.fieldFixedLengths
    struc1.fixedLengthTooShortHandling
    struc1.endSeparator
    and I tried with fieldSeparator then it gives successfully all output files.
    so,where is the problem?I didnt understand?
    any suggestion.
    thank you,
    regards,
    Babu Sri

    Bhavesh,
    I felt the same way,but assumed that ,in that way fixedlenghths wont work.
    in my target structure most of the fields have 0-1 occurences ,and even in the source structure too.so,I think it might be the reason.Then I have to make all my about 60fields 1-1 madatory and using mapWithDefaultValue function, as my sources are optional.
    you think it will work just using the "mapWithDefaultValue" function without changing my occurences to 1-1 in the target structure(mandatory)?infact I can try but ,cos of pain for changing like 60 fields....:) and even dont know which fields are causing the problem,so that we can apply "mapWithDefaultValue" function only on those fields.
    thank you,
    Babu Sri

  • Need to get the Mail attachment name as it is to the receiver file adapter

    I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.
    Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.
    Any help would be appreciated.
    VJ

    Oops pressed the send key. Take two.
    This is becoming a damn nightmare. When I run the adapter I am getting ModuleExceptions. Can you pass your eyes over these Java config settings to see what I am doing wrong. Using NWDS CE 7.1 with PI 7.1 both at SP07. All the imports were taken from PI 7.1 after SP07 was applied. The build id of NWDS is
    SAP NetWeaver Developer Studio
    SAP NetWeaver 7.1 Composition Environment SP07 PAT0001
    Build id: 200901152336
    APPLICATION.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
    <display-name>MailPOP_EAR</display-name>
    <description>EAR description</description>
    <module>
    <ejb>MailPOP_EJB.jar</ejb>
    </module>
    </application>
    APPLICATION-J2EE-ENGINE.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="service">engine.security.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">engine.j2ee14.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="service">com.sap.aii.af.svc.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="interface">com.sap.aii.af.ifc.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.lib.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">com.sap.base.technology.facade</reference-target>
    </reference>
    <fail-over-enable mode="disable" />
    </application-j2ee-engine>
    EJB-J2EE-ENGINE.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
    <ejb-j2ee-engine>
    <enterprise-beans>
    <enterprise-bean>
    <ejb-name>GetMailAttachment</ejb-name>
    <jndi-name>GetMailAttachment</jndi-name>
    <session-props/>
    </enterprise-bean>
    </enterprise-beans>
    </ejb-j2ee-engine>
    EJB-JAR.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <description>EJB JAR description</description>
    <display-name>EJB JAR</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>GetMailAttachment</ejb-name>
    <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
    <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
    <local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
    <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
    <ejb-class>sample.GetMailAttachment</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    SENDER MAIL ADAPTER modules
    1 AF_Modules/PayloadSwapBean Local EB 1
    2 GetMailAttachment Local EB 2
    3 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EB 3
    1     swap.keyName          payload-name
    1     swap.keyValue          MailAttachment-1
    RECEIVER FILE MODULES
    1     localejbs/AF_Modules/DynamicConfigurationBean     Local Enterprise Bean     1
    2     localejbs/CallSapAdapter                    Local Enterprise Bean     2
    1     key.0          write http://sap.com/xi/XI/System/File FileName
    1     value.0          message.interface
    VARIABLE FILENAME SUBST WITH ASMA TURNED ON
    fName     message:interface_name
    JAVA SOURCE
    package sample;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.lib.mp.module.Module;
    import com.sap.aii.af.lib.mp.module.ModuleContext;
    import com.sap.aii.af.lib.mp.module.ModuleData;
    import com.sap.aii.af.lib.mp.module.ModuleException;
    import com.sap.engine.interfaces.messaging.api.Message;
    import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
    import com.sap.engine.interfaces.messaging.api.TextPayload;
    import com.sap.engine.interfaces.messaging.api.XMLPayload;
    import com.sap.aii.af.service.cpa.Channel;
    @ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
    @stateless
    <code>GetMailAttachment</code>
    @SuppressWarnings("unused")
    public class GetMailAttachment implements SessionBean, Module {
         private static final long serialVersionUID = 7612238514043673502L;
         private SessionContext myContext;
         private MessagePropertyKey myFileName;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
    @throws CreateException
         public void ejbCreate() throws CreateException {
         public void getMessageProperty(MessagePropertyKey FileName) {
              myFileName = FileName;
    @param moduleContext
               Contains data of the module processor that might be important
               for the module implementation such as current channel ID
    @param inputModuleData
               Contains the input XI message as principal data plus eventual
               set supplemental data
    @return ModuleData Contains the (changed) output XI message. Might be the
            response message if the module is the last in the chain.
    @exception ModuleException
                   Describes the cause of the exception and indicates whether
                   an retry is sensible or not.
         @SuppressWarnings("deprecation")
         public ModuleData process(ModuleContext moduleContext,
                   ModuleData inputModuleData) throws ModuleException {
              try {
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   TextPayload payload = msg.getDocument();
                   String contentType = payload.getContentType();
                   // Content Type could be something like
                   // text/plain;charset="UTF-8";name="file.txt"
                   contentType = contentType.replaceAll("\"", "");
                   int i = contentType.lastIndexOf("=") + 1;
                   String fileName = contentType.substring(i);
                   msg.setMessageProperty(myFileName, fileName);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
              return inputModuleData;
    JAVA ERRORS
    2009-02-04 11:41:14     Information     Mail: calling the module processor for channel LMK_Common_Mail_Sender
    2009-02-04 11:41:14     Information     Swap: swapping by payload-name ? MailAttachment-1
    2009-02-04 11:41:14     Information     Swap: successfully swapped
    2009-02-04 11:41:14     Information     Mail: message leaving the adapter (call)
    2009-02-04 11:41:14     Information     The application tries to send an XI message asynchronously using connection AFW.
    2009-02-04 11:41:14     Information     Backward validation is enabled
    2009-02-04 11:41:14     Error     Unable to validate the message with message ID 8702df71-f254-11dd-9b9b-001a64a73518
    2009-02-04 11:41:14     Error     Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
    2009-02-04 11:41:14     Error     Mail: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
    2009-02-04 11:41:14     Error     Mail: error occured: com.sap.aii.af.lib.mp.module.ModuleException

  • 0 byte txt file using receiver File Adapter

    HI,
    My scenario is Flat File to Fixed Length File.
    Mapping : Based on the condition Reciever node need to generated , In some cases it wont generate any node ( No data )
    Receiver Communication channel :  I used FCC for Fixed length Format.
    Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
    Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:Message1' found in document', probably configuration error in file adapter (XML parser error)'
    I need the receiver file to generate with 0 bytes when there is empty data.
    can any one help on this.
    Thanks

    Hi,
    >>Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
    What happens in this case is, when you send a blank file to PI it processes but once it went to Receiver Adapter, it looks out for some fields because of the FCC settings. So it throws an error/exception because some fields are expected and it is not coming. Because of that you getting below exception.
    Secondly, Once you send data with few values or fields it will process in Receiver file adapter FCC and if there is some error it throws error. this is why you getting exception in moni, and other places.
    Regards
    Aashish Sinha

  • Receiver File Adapter - Adapter Engine

    I am able to read files using Sender File Adapter. But when I try to write a file using Receiver File Adapter I get the following erro:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--
    Call Adapter
    -->
    - <SAP:Error xmlns:SAP="<http://sap.com/xi/XI/Message/30>" xmlns:SOAP="
    <http://schemas.xmlsoap.org/soap/envelope/>" SOAP:mustUnderstand="">
    <SAP:Category>XIServer</SAP:Category>
    <SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
    <SAP:P1>af.exi.usxid</SAP:P1>
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText>3: No service user name found for Integration
    Server is.00.usxid</SAP:AdditionalText>
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack>Error when reading the access data (URL, user, password)
    for the Adapter Engine af.exi.uswalexi</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    I tried executing the function module SAI_AE_DETAILS_GET but I am not getting the error URL Not found. This was working in the past. We upgraded to SP15 this showed up again.
    Any help appreciated.

    I'm working on integration of SAP with 3rd party application. While sending data from SAP to XI, i'm getting the following error which i've found in sxmb_moni (XML Message->Call Adapter).
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    -<!-- Call Adapter --> -
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
    <SAP:Category>XIServer</SAP:Category>
    <SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
    <SAP:P1>af.xp1.sapxi</SAP:P1>
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText>3: No service user name found for Integration Server is.00.sapxi</SAP:AdditionalText>
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack>Error when reading the access data (URL, user, password) for the Adapter Engine af.xp1.sapxi</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    Plz help me to solve this issue. If possible mail me the solution to my personal email-id [email protected]
    Note:
    1. We are using CIM 1.3
    2. In XI Server Message Monitoring, i'm getting the System Error message in Integration Engine.
    3. In Payloads, i'm getting the required information in XML format as desired.
    Thanks in advance.
    Regards,
    Navaneeth.S

  • Receiver file adapter posts multiples for singel source files

    Hi,
    I am using wild character in my input source ftp adapter but my receiver file adapter is creating multiple duplicate files. I am not sure why this happens as QOS is set to "Exactly Once" with archive processing mode. I tried with delete mode and the same error occurs. We had no problems testing it in our Dev environment but in QA its acting so strangely...Any advise is appreciated..
    -Teresa

    Hi,
    2. Homany files you posted at oubound directory?
    1.             You said duplicate files at receiver side, is the files having time stamp? if so those are not duplicate files.
    Thanks,
    Satish.

  • Receiver file adapter command line

    hi,
    i am just wondering how to use command line on receiver file adapter.
    i am not clear how to use this.
    please modify on the following command!
    anyway, i have to call java application after put some files by receiver file adapter.
    cmd.exe %Fjava ./javacalltest
    it did not work..
    please guide me.
    Command Line
    An operating system command specified here is executed before or after a file has been successfully processed. The default value is an empty character string (no command).
    When the operating system command is called, the file name currently being processed can be specified with the following placeholders:
    %f (file name)
    %F (absolute file name including path)

    Hi Ogawa and Laurence,
    Have look at :: /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    1)Windows batch Commands::
    http://labmice.techtarget.com/articles/batchcmds.htm
    2)Linux:
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Note:: First try using the comands on O.S if they work then only use them in Adapters.
    Hope it will help.
    regards
    Piyush
    Pl:reward some points if it is usefull.

Maybe you are looking for