File Adapter XML

Hello,
I've a interface RFC - File (Message Protocol: File -Don't FCC-l )
The file XML generated is OK, but when i open this file with the text editor, i see the file of follow:
<tag1>value1</tag1><tag2>value2</tag2><tag3>value3</tag3> 
and i need see the file of follow (each label in each file):
<tag1>value1</tag1>
<tag2>value2</tag2>
<tag3>value3</tag3>
I can do it?, How?
Thank

I am trying with the follow file::
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="*">
  <xsl:copy>
   <xsl:element name="name()">
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
   </xsl:element>
  </xsl:copy>
  <xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
when i raise the interfase the follow error occurs:
Error when loading XSLT mapping of the application
i believe the file content have an error, but i don't know what,
thank you

Similar Messages

  • ESB/File Adapter - XML files containing multiple messages

    Hi,
    In all the examples on file adapters I read, if files contain multiple messages, it always concerns non-XML files, such as CSV files.
    In our case, we have an XML file containing multiple messages, which we want to process separately (not in a batch). We selected "Files contain Multiple Messages" and set "Publish Messages in Batches of" to 1.
    However, the OC4J log files show the following error:
    ORABPEL-12505
    Payload Record Element is not DOM source.
    The Resource Adapter sent a Message to the Adapter Framework which could not be converted to a org.w3c.dom.Element.
    Anyone knows whether it's possible to do this for XML files?
    Regards, Ronald

    Maybe I need to give a little bit more background info.
    Ideally, one would only read/pick-up small XML documents in which every XML document forms a single message. In that way they can be processed individually.
    However, in our case an external party supplies multiple messages in a single batch-file, which is in XML format. I want to "work" on individual messages as soon as possible and not put a huge batch file through our ESB and BPEL processes. Unfortunately we can not influence the way the XML file is supplied, since we are not the only subscriber to it.
    So yes, we can use XPath to extract all individual messages from the XML batch-file and start a ESB process instance for each individual message. But that would require the creation of another ESB or BPEL process which only task is to "chop up" the batch file and start the original ESB process for each message.
    I was hoping that the batch option in the File adapter could also do this for XML content and not only for e.g. CSV content. That way it will not require an additional process and manual coding.
    Can anyone confirm this is not supported in ESB?
    Regards,
    Ronald
    Message was edited by:
    Ronald van Luttikhuizen

  • Receiver File Adapter - XML

    Hi
    I have configured a receiver file adapter to send an XML message to a file directory.
    The structure is
       <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_SiteDetails_MM xmlns:ns0="urn:Retail.net:SiteDetails">
    - <ROWSET>
    - <ROW>
      <ext_cust_id>0003009996</ext_cust_id>
      </ROW>
      </ROWSET>
      </ns0:MT_SiteDetails_MM>
      How do I get the line - <ns0:MT_SiteDetails_MM xmlns:ns0="urn:Retail.net:SiteDetails">
    out of the message. Is it possible.
    Can I use file content conversion.
    any help is appreciated.
    Joe

    Hi,
    >>>  have configured a receiver file adapter to send an XML message to a file directory
    If i understand it correctly, you need to send X.XML to some directory you configured and you want to do something with <ns0:MT_SiteDetails_MM xmlns:ns0="urn:Retail.net:SiteDetails">.. If i am right, you can use Run OS command after processing option at receiver file adapter.
    Write one Shell script and do whatever you want to do with this file. Remove line, add something or anything.
    Regards
    Aashish Sinha

  • File adapter XML example

    Hi,
    can anyone supply me with an xml and xsd example that works?
    thanks
    amit

    hi amite,
    i've e-mailed you an example. In the example i used a bpws:getVariableData to obtain the message type, but a straight assignment would also work so long as you get the message type and not its child, see Re: xpath expression is empty for input XML file - Help!!!

  • Polling xml file using file adapter

    Hi,
    when i am polling xml file using file adapter, xml file received properly.
    After receiving activity i am using assign activity to copy values to another variables, here i am getting error the values are not updated.
    My xml comes with out namespace, when we put namespace then only values are updated.
    What i need to do to update values.
    Regards,
    eeswar.

    after configuring the file adapter, define the interface of the BPEL using "based on the WSDL " option and select the wsdl of the file adapter , see whether it helps...

  • 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

  • File Conversion in Rec File Adapter with subnodes

    Hi
    My XML Structure is like this -->
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_Test xmlns:ns0="urn:TESTconversion">
      <MstName>Hello</MstName>
    - <Header>
      <TableName>1tst</TableName>
      <PayDate>0102</PayDate>
      <TotalAmt>24.00</TotalAmt>
      <Total>000002</Total>
      <PaySource>CHK</PaySource>
    - <Subheader>
      <TableName>1tst</TableName>
      <SelectCatgry>test</SelectCatgry>
      <CustID>200</CustID>
      <PayAmount>11.00</PayAmount>
      </Subheader>
    - <Subheader>
      <TableName>1tst</TableName>
      <SelectCatgry>test</SelectCatgry>
      <CustID>400</CustID>
      <PayAmount>13.00</PayAmount>
      </Subheader>
      </Header>
    - <Header>
      <TableName>1tst</TableName>
      <PayDate>0103</PayDate>
      <TotalAmt>10.00</TotalAmt>
      <Total>000001</Total>
      <PaySource>ONE</PaySource>
    - <Subheader>
      <TableName>1tst</TableName>
      <SelectCatgry>test</SelectCatgry>
      <CustID>100</CustID>
      <PayAmount>10.00</PayAmount>
      </Subheader>
      </Header>
    </ns0:MT_Test>
    which means
    MT_Test is root 1..1
    Header is the sub-node of MT_test as 1...*
    Subheader is sub-node of Header which is also 1...*
    rest of the fields are elements as 1..1
    Now I need to convert this into Flat file using Receiver File Adapter, I gave this in my content conversion logic
    recordset Structure -
    MstHeader,BFKKZK,BFKKZP
    MstName.addHeaderLine     0
    MstName.fieldFixedLengths     8
    MstName.endSeparator     'nl'
    Header.addHeaderLine     0
    Header.fieldFixedLengths     30,10,15,6,6
    Header.endSeparator     'nl'
    Subheader.addHeaderLine     0
    Subheader.fieldFixedLengths     34,10,35,16
    Subheader.endSeparator     'nl'
    But with this I am getting exception as -->
    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:MT_Test' found in document', probably configuration error in file adapter (XML parser error)'
    I know that http://help.sap.com/saphelp_nwpi711/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm says following -->
    The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes.
    But does that mean Structure with sub-nodes cannot be converted in flat format.
    Pls. suggest the solution for this.
    - lalit -

    Shab
    I resolved the issue & able to convert the hierarchical XML file into flat file with the desired format I wanted.
    Rather then FCC, I use MessageTransformBean module and I have to insert more dummy contexts & dummy fields in the target structure in order to achieve the flat file format.
    I am getting file ( not actual file below just template is shown below) like this now
    Header1 ....details....
    SubHeader1.1
    SubHeader1.2
    SubHeader1.x
    Header2 ....details....
    SubHeader2.1
    SubHeader2.2
    SubHeader2.x
    Headerx ....details....
    SubHeaderx.1
    SubHeaderx.2
    SubHeaderx.x
    Once the total development is over on my side I will create the blog for this. So this following statement is only correct when you use protocol as FCC but not with module.
    "The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes."
    Thanks
    Lalit

  • Error in reciever file adapter , where i am getting file name dynamically

    hi all,
    error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser 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:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'

    i am getting new error
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    this is my strcuture
    and i have changed my structure
    <HEADER>
    <ADDRESS1/>
    <ADDRESS2/>
    <ADDRESS3/>
    <ADDRESS4/>
    </HEADER>
    <HEADER_GST>
    <TAX1/>
    <TAX2/>
    <TAX3/>
    </HEADER_GST>
    <LINE>
    <QTY/>
    <UOM/>
    <UNIT_AMT/>
    <CHARGE_TO_DT/>
    </LINE>
    <FILENAME>
         <FILENAME/>
    </FILENAME>
    i have given the recordset structure as
    HEADER,HEADER_GST,LINE,FILE

  • How to ignore a recordset in receiver file adapter

    Hi, all.
    I am trying to get PI to write a fixed length file via the reciever file adapter. Here is a test data structure I put together:
    In the output file, I want the file adapter to ignore the recordset PAYPERIOD and field PERIOD. Only fields in DATA will be written to the file. Here is what I configure in the CC:
    The problem is that the CC will not work unless I put in the recordset PAYPERIOD which starts printing the data in the PERIOD field. The data in PERIOD is only used to generate the output file name as a perameter.
    Here is the error:
    Attempt to process file failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value 'Y1406' too long (>4 for 0. column) - must stop', probably configuration error in file adapter (XML parser error)'
    Please help. Note that Y1406 is the data in the field PERIOD. The PI file adapter is a rather primitive tool to use.
    Thanks,
    Jonathan.

    Hi Jonathan,
    can you try using the paramter ignoreRecordsetName = TRUE. refer the below sap help
    https://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    ignoreRecordsetName
    A
    <Recordset> element is inserted in the XML structure for each recordset
    structure. This level is not always required, particularly if the recordset only
    contains one structure definition.
    If you set the
    parameter to true, the <Recordset> element is not
    inserted.
    regards,
    Harish

  • Doubt regarding Recever file adapter file content conversion (FCC)

    Hi Expetrts, below is the my target structure.
    <?xml version="1.0" encoding="TF-8"?>
    <ns1:MT_StatusChange xmlns:ns1="urn:passhe.com/ChangeOfStatusISA26">
         <IV_ST_OBJID>65390091</IV_ST_OBJID>
         <IV_BEGDA>25082008</IV_BEGDA>
         <LT_STUDENT_STATUS>
               <item>
              <HS_CAMPUS>65</HS_CAMPUS>
              <STOBJID>65390091</STOBJID>
              <STUDENT12>michal</STUDENT12>
              <HS_STATUS>MISC</HS_STATUS>
               <item>
            <LT_STUDENT_STATUS>
    </ns1:MT_StatusChange>
    How to configure in File Content Conversion Recever File Adapter for above target structure. i have done as below, but i am getting error.  please correct me where i did mistake.
    Recordset Structure : IV_ST_OBJID,IV_BEGDA,LT_STUDENT_STATUS,item
    IV_ST_OBJID.fieldNames : IV_ST_OBJID  -> for this field there is no subfield
    IV_ST_OBJID.fieldSeparator: , (comma)
    IV_BEGDA.fieldNames : IV_BEGDA -> for this field there is no subfield
    IV_BEGDA.fieldSeparator: , (comma)
    LT_STUDENT_STATUS.fieldNames  : HS_CAMPUS,STOBJID,STUDENT12,HS_STATUS
    LT_STUDENT_STATUS.fieldSeparator: 'nl'
    item.fieldNames  : HS_CAMPUS,STOBJID,STUDENT12,HS_STATUS
    item.fieldSeparator: , (comma)
    I am getting below error:
    'Conversion configuration error: Unknown structure 'ns1:MT_StatusChange' found in document', probably configuration error in file adapter (XML parser error)'
    Thanks
    Dhanush.

    Hi Dhanush,
                        It is better always if u have a structure with Header and trailers if u have a subsrtuctures in it & always try make it in this format:
    <?xml version="1.0" encoding="UTF-8"?>
    <MT_ContentConversion_Test>
       <Header>
          <F1>HF1</F1>
          <F2>HF2</F2>
       </Header>
       <Item>
          <F1>IF1</F1>
          <F2>IF2</F2>
       <Item>
       <Trailer>
          <F1>TF1</F1>
          <F2>TF2</F2>
       </Trailer>
    </ns0:MT_ContentConversion_Test>
    Try to go through this blog it will be very helpful to u :
    /people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts
    Regards,
    Vinod.

  • Duplicate namespace declarations when writing a file with JCA file adapter

    I am using JCA File adapter to write a an XML file. The composite contains a mediator which received and transforms an XML to desired format and then calls a JCA file adapter to write the file.
    The problem that I am having is that the written file has declaration of namespaces repeated with repeating elements instead of a single declaration at root. For ex.
    instead of
    <ns0:Root xmlns:ns0="namespace0"  xmlns:ns1="namespace1" xmlns:ns2="namespace2">
    <ns0:RepeatingChild>
    <ns1:Element1>value1</ns1:Element1>
    <ns2:Element2>value2</ns2:Element2>
    </ns0:RepeatingChild>
    <ns0:RepeatingChild>
    <ns1:Element1>value3</ns1:Element1>
    <ns2:Element2>value4</ns2:Element2>
    </ns0:RepeatingChild>
    </ns0:Root>What I see in the file is:
    <ns0:Root xmlns:ns0="namespace0"  xmlns:ns1="namespace1" xmlns:ns2="namespace2">
    <ns0:RepeatingChild>
    <ns1:Element1 xmlns:ns1="namespace1" xmlns:"namespace1">value1</ns1:Element1>
    <ns2:Element2 xmlns:ns2="namespace2" xmlns:"namespace2">>value2</ns2:Element2>
    </ns0:RepeatingChild>
    <ns0:RepeatingChild>
    <ns1:Element1 xmlns:ns1="namespace1" xmlns:"namespace1">>value3</ns1:Element1>
    <ns2:Element2 xmlns:ns2="namespace2" xmlns:"namespace2">>value4</ns2:Element2>
    </ns0:RepeatingChild>
    </ns0:Root>So basically all the elements which are in different namespace than root element have a namespace declaration repeated even though the namespace identifier is declared at the root elment level.
    Although, the XML is still valid, but this is unnecessarily increasing the filesizes 3-4 times. Is there a way I can write the XML file without duplicate declarations of namespaces?
    I am using SOA Suite 11.1.1.4
    The file adapter has the schema set as above XML.
    I tried the transformation in mediator using XSL and also tried using assign [source(input to mediator) and target(output of mediator, input of file adapter) XMLs are exactly same].
    but no success.

    I used automapper of JDeveloper to generate the schema. The source and target schema are exactly same.
    I was trying to figure it out and I observed that if the namespaces in question are listed in exclude-result-prefixes list in xsl, then while testing the XSL in jDeveloper duplicate namespaces occur in the target and if I remove the namespace identifiers from the exclude-result-prefixes list then in jDeveloper testing the target correctly has only a single namespace declaration at the root node.
    But, when I deployed the same to server and tested there, again the same problem.

  • XML validation in sender file adapter

    Hi
    I am using FCC on the sender file adapter ....i need to make sure that one of the fields should always be integer else the sender adapter should give error
    Can i use xml validation with FCC on the sender file adapter?

    Hi Hema,
    As per understanding you need to check one or few fields value is integer or not.
    You can achieve in 2 ways :
    Case1:Using inbuilt xml validation options.
    For 7.11 and below
    1)In ESR/Message type/Export the xsd to local machine.
    2)Insert the xsd file in the below loc
    /usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0/validation/schema/
    <guid>/<namespace1>/<service_interface_name>/<namespace2>
    <sid>: System ID of the server instance.
    <guid>: The GUID of the SWCV.
    <namespace1> : The namespace within which the service interface is defined.
    <service_interface_name> : The name of the service interface.
    <namespace2>
    : The namespace of the Message Type used by the service interface. In many
    instances, namespace1 and namespace2 are the same.
    Italic path folders need to create by you.
    For 7.3 and above
    Michal's PI tips: XML validation - changes in 7.3
    Case 2 :Handling using simple UDF.
    Input-->UDF-->Output
    try {
       Integer.parseInt(input);
       return input ;
    catch(NumberFormatException e) {   
    throw new StreamTransformationException( "Input field value for xyz field "+input+"is not in integer format.Plz correct it"); 
    Regards
    Venkat

  • How to create an Excel file from XML in the Receiver File Adapter Comm Ch

    How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
    I saw this blog, but I don't know how to create a XSLT transformation.
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    Any help would be appreciated. Thanks.

    Here are the steps I took to create an XSLT transformation in XI 3.0:
    1. I created my source and target XSDs using XMLSpy.
    2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
    3. I created another XSLT mapping to format the target into Excel XML.
    4. Import the source and target XSDs in the IR's External Definitions
    5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
    6. Reference the XSL mappings in the Interface Mapping

  • Not able to map contents of xml to output using file adapter

    Hi
    i m not able to map the output of file adapter to a variable when reading an xml. the data is coming in the file adapter output variable but it is not mapping to other variable in assign or transform activity.I m using jdeveloper 11.1.1.4.0.Can anbody help me plz.
    Regards
    Sourbh

    i am using file adapter as reference to synchronously read an xml file. i am able to see the flow trace in em console. the output variable of file adapter contains the data but when i m trying to assign the value to a variable i getting error. saying that some xpath is not returing any value.
    i tried with transform activity also but same case is there.

  • File adapter problem - xml file

    Is there a way to define in the sender file adapter the document name for a XML file?
    This is the xml file that arrives to XI,
    <?xml version="1.0" encoding="UTF-8" ?>
    <dataroot generated="">
    <Materials1>
      <CODE>FAMILY</CODE>
      <TYPE>A75</TYPE>
      <NAME_EN>LUBRICANT</NAME_EN>
      <NAME_ES>LUBRICANTES</NAME_ES>
      <NAME_DE>LUBRICANT_GERMAN</NAME_DE>
        </Materials1>
      </dataroot>
    I have to define the name of the Message Type as "dataroot" in order to avoid problems at mapping time. The problem is that I get from MDM the same structure begin each time,
    <dataroot generated="">
    Is there a way to define the XML Document Name in the Sender File Adapter?

    Hello Rob,
    FOr ""dataroot" element "generated" is the attribute.... define this attbute in the datatype as well..
    Thanks,
    Himadri

Maybe you are looking for