cancel
Showing results for 
Search instead for 
Did you mean: 

XML prefix in the SOAP Header and Body message

Former Member
0 Kudos

Hi Team,

We are trying to integrate an application using SAP PO and the application expects SOAP Header with the sender system ID where the header can be created using XSLT mapping with the SOAP body included from the Message Mapping as discussed in the thread.

https://archive.sap.com/discussions/thread/3883963

The SOAP body included from the Message Mapping has ns0 as the xml prefix where my structure that needs to be passed is expected as below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:opt="http://www.clicksoftware.com/OptionalParameters" xmlns:wfm="http://www.xxxxxxx.com/wfm/">

<soapenv:Header>

<opt:OptionalParameters>

<opt:CallerIdentity>xxxxxx</opt:CallerIdentity> <opt:ErrorOnNonExistingDictionaries>true</opt:ErrorOnNonExistingDictionaries>

</opt:OptionalParameters>

</soapenv:Header>

<soapenv:Body>

<wfm:GetAvailableSlots>

<wfm:Period>

<wfm:Start>2016-09-12T08:00:00</wfm:Start>

<wfm:Finish>2016-09-19T18:00:00</wfm:Finish>

</wfm:Period>

<wfm:Task>

<wfm:TaskType>DNPG</wfm:TaskType>

<wfm:District>xxxxxx</wfm:District>

<wfm:Duration>1800</wfm:Duration>

<wfm:Priority>4</wfm:Priority>

<wfm:Latitude>44336957</wfm:Latitude>

<wfm:Longitude>-69811731</wfm:Longitude>

<wfm:NotificationType>MM</wfm:NotificationType>

<wfm:RespServiceCenter>RS</wfm:RespServiceCenter>

</wfm:Task>

<wfm:Profile>Full Day</wfm:Profile>

</wfm:GetAvailableSlots>

</soapenv:Body>

</soapenv:Envelope>

Could you please let me know how to create XML prefixes or replace XML prefixes with the required one ? The XML included in the body is generated from XSD imported from the external application.

Request your help on the same.

Thanks and Regards,

Raj

View Entire Topic
nabendu_sen
Active Contributor
0 Kudos

Try with XML Anonymizer Bean. Go through the example.

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

Former Member
0 Kudos

Hi Nabendu,

Thanks for that .I am trying to use the Anonymizer bean

https://blogs.sap.com/2014/10/02/remove-namespace-by-xmlanonymizer-bean-in-communication-channel/

wondering if the namespace can be removed from body

Does this XML anonymizer bean works to remove namespace for SOAP Body element ?In my example to remove xmlns=“http://xyz.com/“ ?In my case the SOAP body element has <ns0:Element xmlns:ns0=”http://www.xxxxx.com/wfm/”> I need to remove the namespace but needs to replace the prefix ns0 with wfm for all the elements in the SOAP Body .

I will try to execute and see the output .

Thanks and Regards,

Ra