Remove Attribute – Soap Request XML(XmlPort)

 

Hey Friends,

We all know how to remove Namespaces from the XML if we want to import it from NAV XmlPort, I just faced a situation where I was using XmlPort to send Soap Request with Default Namespace. Using default namespace creates an attribute something like this (xmlns:xx=”http://xx.org/soap/envelope/”) in the soap::Body which basically disrespects the Soap request as sometimes it’s not needed in the protocol of the soap request. So now if we use Remove Namespace code then it will remove the namespaces from the entire XML i.e. Soap:Header as well. In this case here is the code that you need to write to just eliminate it from the soap:Body.

untitled

Now when you load this BigTextOutputValue to your XmlDoc, you will have a XML with no Attributes in the Soap:Body and you can send this as a Soap Request via HTTP.

BigTextVaue  –   DateType  – BigText

BigTextOutputVaue  –   DateType  – BigText

CHEERS.

2 comments on “Remove Attribute – Soap Request XML(XmlPort)

  1. Pingback: Remove Attribute – Soap Request XML(XmlPort) - Dynamics NAV by RockWithNAV - Dynamics NAV Users - DUG

  2. Pingback: Remove Attribute – Soap Request XML(XmlPort) | Pardaan.com

Leave a comment