on 01-05-2012 12:11 PM
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" ?>
- <ns0:MT_Ack_Delivery_Inbound xmlns:ns0="urn: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
- <ns0:MT_Ack_Delivery_Inbound xmlns:ns0="urn:commscope.com/ALUespares/AckDelivery">
Can any one please help me ho can i do that
Regards
Swetha
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swetha,
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
Hello Srinivas, thanks very much for your help, but i have got a small doubt while using XML anonymizer bean in the receiver file adapter, where exactly i have to add the below query.
AF_Modules/XMLAnonymizerBean Local Enterprise Bean 0
, I am using 7.1 version
I have used XML anonymizer bean in the receiver file adapter to remove the name space. under the module tab add as below but its not working
The receiver communication channel is not picking the message at all.
AF_Modules/XMLAnonymizerBean Local Enterprise Bean 0
ModuleKey : 0
Parameter Name: anonymizer.acceptNamespaces
Parameter value: Leave it blank
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.