Skip to Content
avatar image
Former Member

Target Xml

Hello every one,

I have just done a file to file Scenario

Actually the requirement is my trading partner want target xml like shown below

<?xml version="1.0" ?>

- <ACKNOWLEDGE_DELIVERY_001>

- <CNTROLAREA>

- <BSR>

<VERB value="ACKNOWLEDGE">ACKNOWLEDGE</VERB>

<NOUN value="DELIVERY">DELIVERY</NOUN>

<REVISION value="001">001</REVISION>

</BSR>

But for me after i have done the whole scenario it is comming like shown below

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

- commscope.com/ALUespares/AckDelivery">

- <ACKNOWLEDGE_DELIVERY_001>

- <CNTROLAREA>

- <BSR>

<VERB value="ACKNOWLEDGE">ACKNOWLEDGE</VERB>

<NOUN value="DELIVERY">DELIVERY</NOUN>

<REVISION value="001">001</REVISION>

</BSR>

You might have noticed the difference between the two xml

The Message Type and Name Space part as shown below should not come according to requirement

- commscope.com/ALUespares/AckDelivery">

Can any one please help me ho can i do that

Regards

Swetha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 05, 2012 at 09:19 PM

    Hi Swetha,

    Try this

    1. since your XSD is not big, define a data type with the name ACKNOWLEDGE_DELIVERY_001. when you define with this name then you will have the top element as ACKNOWLEDGE_DELIVERY_001 and then define all the elments below as per the XSD.

    2. Define the message type. You can remove the XML namespace under the MT

    3. use XML anonymizer bean in the receiver file adapter to remove the name space. under the module tab add as below

    AF_Modules/XMLAnonymizerBean Local Enterprise Bean 0

    ModuleKey : 0

    Parameter Name: anonymizer.acceptNamespaces

    Parameter value: Leave it blank

    It works for me . Give a try and let me know.

    Thanks,

    Srini

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2012 at 12:58 AM

    Hello,

    <?xml version="1.0" ?>

    - <ACKNOWLEDGE_DELIVERY_001>

    - <CNTROLAREA>

    - <BSR>

    <VERB value="ACKNOWLEDGE">ACKNOWLEDGE</VERB>

    <NOUN value="DELIVERY">DELIVERY</NOUN>

    <REVISION value="001">001</REVISION>

    </BSR>

    This is not a valid XML (no root message) 😊 Tell this to the third-party.

    Hope this helps,

    Mark

    Edited by: Mark Dihiansan on Jan 6, 2012 2:16 AM

    Edited by: Mark Dihiansan on Jan 6, 2012 2:33 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2012 at 02:49 AM

    Hi,

    Use the XSLT code in below link to remove namespaces.

    http://sap-pi7.blogspot.com/2011/03/generic-xslt-code-to-remove-namespaces.html

    -santosh.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Santhosh,

      I have already done my message mapping and every thing i cant go back to xslt mapping now, More over i have no idea where this code has to be used exactly.

      Can you please explain me