cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in mapping.. Source message expect with prefix ns0 in input message!

Former Member
0 Kudos

Issue in mapping.. Source message expect with prefix ns0 in input message

Hi All,

I used the XSD structure which I got from partner which starts like below.

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xxxx.com/DirectSales/CustomerData" xmlns:prodata="urn:schemas-progress-com:xml-prodata:0001" xmlns="">

<xsd:element name="CustomerRequest" prodata:proDataSet="true">

I'm receiving the messages through SOAP adapter and the message looks like below.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Technical Routing --> <CustomerRequest xmlns='http://XXXX.com/DirectSales/CustomerData' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:SE='http://schemas.xmlsoap.org/soap/encoding/'>

The message is failing during mapping. When i checked in message mapping, I found that the input source message is expecting with prefix "ns0" like <ns0:CustomerRequest...

how I can solve this issue? Is there anyway I can add the prefix "ns0" before it comes to mapping step.?

Thanks

Deepthi

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member463616
Contributor
0 Kudos

Hi,

Please see the below thread, it might be helpful to you.

Regards,

Rajesh

stefan_grube
Active Contributor
0 Kudos

> The message is failing during mapping. When i checked in message mapping, I found that the input source message is expecting with prefix "ns0" like <ns0:CustomerRequest...

Are you sure that this is the issue for the mapping error?

In XML it is not a difference whether you have a prefix or not.

Former Member
0 Kudos

Hi Guys,

I tried to use the below paramter.

anonymizer.acceptNamespaces 'http://XXXX.com/DirectSales/CustomerData ns0

The ns0 is coming in all the tags including segments and fields. I just want ns0 to come only at the root level ie <ns0:customerReq..>

it is coming like below...

- <ns0:CustomerRequest xmlns:ns0="http://XXXXXX.com/DirectSales/CustomerData">

- <ns0:ttCustomer>

<ns0:branch-num>1424</ns0:branch-num>

<ns0:cust-num>121</ns0:cust-num>

<ns0:contact-code>3</ns0:contact-code>

-

-

-

-

</ns0:ttCustomer>

</ns0:CustomerRequest>

-


I want the message to come as

- <ns0:CustomerRequest xmlns:ns0="http://XXXXXX.com/DirectSales/CustomerData">

- <ttCustomer>

<branch-num>1424</branch-num>

<cust-num>121</cust-num>

<contact-code>3</contact-code>

-

-

-

-

</ttCustomer>

</CustomerRequest>

Kindly help me with the paramater value to be passed for anonymizer.acceptNamespaces.

Thanks

Deepthi

aashish_sinha
Active Contributor
0 Kudos

Hi ,

Use any third party XML tool and open your XSD in that tool (XMLSPY, STYLUSSTUDIO, whoever is able to open XSD's) and remove ns0 from fields and re-import it as external definition.

Regards

Aashish Sinha

stefan_grube
Active Contributor
0 Kudos

> - <ns0:CustomerRequest xmlns:ns0="http://XXXXXX.com/DirectSales/CustomerData">

> - <ttCustomer>

When your message is not correct according to external party xsd, then request a different xsd or tell sender, they should provide an XML that matches the XSD.

former_member463616
Contributor
0 Kudos

Hi,

As suggested by Baskar, you can go through. You have to use XMLAnonymizerBean.

See the below links.

[Link1|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5767] [original link is broken] [original link is broken] [original link is broken];

Regards,

Rajesh

Former Member
0 Kudos

Hi Deepthi,

the XML sent by the sender via SOAP is not well formed.

The steps you followed i guess is : they sent you a wsdl/xsd, then you created your service interfaces/msg interfaces based on that.

The data they are sending are not according to the accepted pattern. Please ask the sender to cross check the data and resend in correct format.

For further verification from your end:

add ns0 in start and end tags and test it in Integration Directory (using test tool in Interface Determination). check if all the pipeline steps are successfully processed. If it is then your interface is perfect. (anyways ns0 is must)

Note: Dont try to add ns0 manually. It should come automatically in the payload.

Souvik

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>how I can solve this issue? Is there anyway I can add the prefix "ns0" before it comes to mapping step.?

Use XML Anonymizer Bean to add namespace prefix.

Refer this link

http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm

anonymizer.acceptNamespaces

http://XXXX.com/DirectSales/CustomerData ns0