Skip to Content
author's profile photo Former Member
Former Member

PI 7.0: recursive structure can not be mapping to a flat structure

I use PI 7.0 ,the source structure is like this:

http://schemas.xmlsoap.org/wsdl/">

<wsdl:types>

http://www.w3.org/2001/XMLSchema">

...

http://www.w3.org/XML/1998/namespace" name=" NodeA">

<xsd:element name="NodeA" type="NodeA" minOccurs="0" maxOccurs="unbounded" />

<xsd:attribute name="ID" type="xsd:string" />

<xsd:attribute name="NAME" type="xsd:string" />

</xsd:complexType>

</wsdl:types>

<wsdl:message name="root">

<wsdl:part name="root" element="root" />

</wsdl:message>

</wsdl:definitions>

"NodeA" is recursive type.

I want to transform the source data to flat file.

examples:

source xml(tree):

101 AAA

__201 BBB

_______301 CCC

_______302 DDD

_____________401 EEE

destination (flat file):

ID NAME FID

101 AAA

201 BBB 101

301 CCC 201

302 DDD 201

401 EEE 302

Because NodeA is recursive, I can not make the mapping work.

can Anyone help me?

Thanks!

Edited by: Harry on Feb 26, 2009 8:50 AM

Edited by: Harry on Feb 26, 2009 8:51 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Feb 26, 2009 at 07:59 AM

    Hi,

    Would you be able to provide the actual source and target structure?

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      This is my Message Type, you can import them as External Defination:

      Then map MT_Src to MT_DEST. Thanks!

      MT_Src:

      <?xml version="1.0" encoding="UTF-8"?>

      <xsd:schema targetNamespace="http://test.com/diss" xmlns="http://test.com/diss" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:element name="MT_SRC" type="DT_SRC" /><xsd:complexType name="DT_SRC"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">82c08380046b11de920c001a4b064ae2</xsd:appinfo></xsd:annotation><xsd:sequence><xsd:element name="TEST" type="DT_TEST" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">c23a4750046911decc490019210863b9</xsd:appinfo></xsd:annotation></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="DT_TEST"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">82c23130046b11de833d001a4b064ae2</xsd:appinfo></xsd:annotation><xsd:sequence><xsd:element name="SELF" type="DT_TEST" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">71c72500046811de98e60019210863b9</xsd:appinfo></xsd:annotation></xsd:element></xsd:sequence><xsd:attribute name="ID" type="xsd:string" use="required" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">4a0a4dc0046911deaff30019210863b9</xsd:appinfo></xsd:annotation></xsd:attribute><xsd:attribute name="NAME" type="xsd:string" use="required" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">4a0a4dc1046911dec5290019210863b9</xsd:appinfo></xsd:annotation></xsd:attribute><xsd:attribute name="DES" type="xsd:string"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">61958680046911de964c0019210863b9</xsd:appinfo></xsd:annotation></xsd:attribute></xsd:complexType></xsd:schema>

      MT_DEST:

      <?xml version="1.0" encoding="UTF-8"?>

      <xsd:schema targetNamespace="http://test.com/diss" xmlns="http://test.com/diss" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:element name="MT_DEST" type="DT_DEST" /><xsd:complexType name="DT_DEST1"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">8ead08d0046b11de9c38001a4b064ae2</xsd:appinfo></xsd:annotation><xsd:sequence><xsd:element name="ID" type="xsd:string"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">0112d730046a11de9e6f0019210863b9</xsd:appinfo></xsd:annotation></xsd:element><xsd:element name="NAME" type="xsd:string"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">0112d731046a11dea46d0019210863b9</xsd:appinfo></xsd:annotation></xsd:element><xsd:element name="FID" type="xsd:string"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">0112d732046a11deace60019210863b9</xsd:appinfo></xsd:annotation></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="DT_DEST"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">8eab5b20046b11deba72001a4b064ae2</xsd:appinfo></xsd:annotation><xsd:sequence><xsd:element name="D1" type="DT_DEST1" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:annotation><xsd:appinfo source="http://sap.com/xi/TextID">18188c40046a11deac300019210863b9</xsd:appinfo></xsd:annotation></xsd:element></xsd:sequence></xsd:complexType></xsd:schema>

  • Posted on Feb 26, 2009 at 08:34 AM

    You can not create flat structure in XI.

    Instead you use a dummy interface( Message type) for Flat File Receiver for carrying the coverted structure from Sender File Adapter.

    The Conversion is done on the File Sender Adpater level and you have to USE File content conversion concept.

    Thanks,

    - Gujjeti.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 03:00 AM

    I solved this using XSL. like this:

    <xsl:for-each select="SELF">

    <N1>

    <xsl:attribute name="ID"> <xsl:value-of select="@id"/> </xsl:attribute>

    <xsl:attribute name="NAME"> <xsl:value-of select="@name"/> </xsl:attribute>

    <xsl:attribute name="DES"> <xsl:value-of select="@des"/> </xsl:attribute>

    </N1>

    </xsl:for-each>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.