cancel
Showing results for 
Search instead for 
Did you mean: 

Change xml tags?

Former Member
0 Kudos

Hi Guys!

I'm supposed to send a message to a web service as an XML.

The problem is that when I send the message, the tags are changed to <ns0:BuyerNumber>. Is it possible to change the tag to <BuyerNumber>???

Another problem that I have is that the XML file is going to be linked to a XLS file. Is there a way to add <?xml-stylesheet type='text/xsl' href='www.example.com/example.xsl'?> to the outgoing message?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

petre,

to remove ns0 remove the namesapce in ur Message Type. if you need to add this you need to use Java mapping or adapter module in adapter to add this to the outgoging message

Former Member
0 Kudos

Hi Petre

In order to include your own XML namespace to the payload , you can do that in message types under XML Namespace field. You add your required namespace name there.

As per your second question its not clear what you what , If you want o apply a XSLT program to the qutfoing message , You can do it under interface mappings. You can different mappings in adition to the normal graphical mapping.

Hope this helps

Former Member
0 Kudos

I want to take this...

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

<ns0:Mottaxxxxx2 xmlns:ns0="http://www.example.com/XMLSchema">

<ns0:Interchange>

and change it to

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

<?xml-stylesheet type='text/xsl' href='www.example.com/test.xls' ?>

<Mottaxxxxx2 xmlns:ns0="http://www.example.com/XMLSchema">

<Interchange>

As you can see, the ns0: is removed and

there is a stylesheet added to the xml.

Since I am quite new with this, can you please give a detailed solution. Not step by step guide, but close

Shabarish_Nair
Active Contributor
0 Kudos

as jai mentioned, refer the blog - /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

more about using the standard module in your adapter - http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/frameset.htm

Former Member
0 Kudos

As noticed in one post.

It seems as the Anonymizer doesnt work with SOAP sender Adapter. Is this correct, since I am using SOAP sender adapter?

Shabarish_Nair
Active Contributor
0 Kudos

<i>I'm supposed to send a message to a web service as an XML.</i>

>>

in such a case u will use the <b>SOAP receiver adapter</b>

Former Member
0 Kudos

>>> Is it possible to change the tag to <BuyerNumber>???

Refer the blog by Stefan on how to d this. /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

>>>Is there a way to add <?xml-stylesheet type='text/xsl' href='www.example.com/example.xsl'?> to the outgoing message?

If you use Java/ABAP mapping you can do this. Else you need a adapter module at the receiver end to do this.

Regards,

Jai Shankar