cancel
Showing results for 
Search instead for 
Did you mean: 

Interesting Reqrmnt - How to avoid sending namespace in the xml response

0 Kudos

Hi,

Below is the XML response we generate and send it to HTTP Receiver.

- <ns1:CATSIMPORT xmlns:ns1="urn:pweh.com:erp:hr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Version>1.0</Version>

<TrackID>{5A3C87A5-48FD-4BCD-9178-A200F10F118D}</TrackID>

- <ReturnCode>

<value>Success</value>

</ReturnCode>

</ns1:CATSIMPORT>

Can we remove the first and last line of the xml content and send it.

Please send in your suggestions or answers.

Regards,

Amar Nemalikanti

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi amar,

Use External Definitions, this will solve the namespace problems.

Former Member
0 Kudos

Hi,

Have a look at the following blog. This may throw some light.

<a href="/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi:///people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

regards

Sudharshan

Former Member
0 Kudos

Hi Amereshwar,

You can via a Java Mapping, scan for the first and last tag and do not put them in the return messagestream.

But if you remove the first and last tag, you will not get a valid xml file.

Cheers,

Frank

0 Kudos

Hi,

Good suggestion.

I am planning to use XSLT mapping. Hope that should solve the problem. I think message mapping will automatically put the namespace and other details in the result xml file.

Regards,

Amar

Former Member
0 Kudos

Hi Amar

If namespace is the problem, that can be removed. All you have to do is open your Message Type in your Integration Repository. There you will find a field called as 'XML Namespace', just delete the content from there.

regards

Sameer

0 Kudos

Hi,

Let me try that.

Regards,

Amar

0 Kudos

I still get the namespace attached in the xml content. I believe XI automatically attaches the namespace in all xml files it generates from it.

The problem is that the receiver end is a BizTalk system and they are not able to read the response xml payload because of the namespace.

Please pass on some more ideas.

Regards,

Amar

Former Member
0 Kudos

Hi Amareshwar,

Check my replies in this link.

just like java code to add a tag, you can use to remove a tag, before it goes to http adapter.

Hope that helps you to fix your issue

Regards

Vishnu