cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File contains extra characters

Former Member
0 Kudos

Hi Gurus,

I am configuring a file to file scenario.

Sender side I have an XML file. I have got the XSD file also for this XML file but the problem is the XML file contains some extra character which is not there in the XSD.

Here is the Sender XML file example:

######################################

- <ns0:MnSDocument xmlns:ns0="marksspencer.com/is/2009/schemas/envelope/">

- <ns0:Header>

<MessageId>4D8C7D97C8800BD0E10080000A9044EC</MessageId>

<BatchRecordCount>1</BatchRecordCount>

</ns0:Header>

- <ns0:Payload>

- <ns0:ZMDE_WBBDLD05EXT01>

######################################

Here is the XSD file:

######################################

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="marksspencer.com/is/2009/schemas/envelope/">

<xsd:element name="MnSDocument">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Header" type="HeaderType"/>

<xsd:element name="Payload" type="PayloadType"/>

...

...

######################################

Now during mapping test in ESR all the fields are giving red color because there is extra "ns0" in the sender XML.

Can you give some idea on how can I get rid of this issue?

What should I need to change in XSD file?

Thanks in advance.

Regards,

Vikash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vikash

Use XMLAnonymizerBean

Regards.

Answers (5)

Answers (5)

Former Member
0 Kudos

Dear All,

Thanks to all for giving their valuable inputs.

My issue has been resolved by applying same logic as suggested by bhavanisankar.solasu.

Thanks,

Vikash

naveen_chichili
Active Contributor
0 Kudos

Hi Vikash,

You are getting all fields as "RED" because you have "ns0" in your namespace.

So you can remove extra extra "ns0" in the sender XML by using [Standard xml anonymizer bean|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5767] [original link is broken] [original link is broken];

Regards,

Naveen.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Now during mapping test in ESR all the fields are giving red color because there is extra "ns0" in the sender XML.

>Can you give some idea on how can I get rid of this issue? What should I need to change in XSD file?

You can remove this extra namespace prefix 'ns0' either by xslt/java mapping or XMLAnonymizerBean. Doing XMLAnonymizerBean is very easy.

Former Member
0 Kudos

hi ,

remove extra extra "ns0" in the sender XML by using of Standard xml anonymizer bean

refer this:

http://www.saptechnical.com/Tutorials/XI/XMLPayload/Index.htm

http://help.sap.com/saphelp_nwpi711/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/frameset.htm

thanks

Edited by: bhavanisankar.solasu on Dec 23, 2011 5:44 AM

Former Member
0 Kudos

Vikash,

<ns0:Header>
<MessageId>4D8C7D97C8800BD0E10080000A9044EC</MessageId> 
<BatchRecordCount>1</BatchRecordCount>

You need make changes in order to incorporate Message ID and Batch Record Count.

I doubt that the XSD you have for the XML file is wrong.

Could you post the entire XSD and XML fiile if possible?

Regards

Ramesh