xml prefix namespace issue

Hi,

I’m having a Rest _post service invoked by external application. They will send us the xml. We have service xmlNodeToDocument to convert to document.

But I need to exact fields from xml.
So when it comes in pipeline document will be like: createPO/tns:CreatePurchaseOrder/tns:SetOfItems/tns:PurchaseOrder
The external application can send the xml with different prefix namespaces.
Problem is the schema uses 5 different namespaces with prefix attached to it.

I tried using the field nsDecls by setting value as below
urn:Namespaces.Abc.Com:Trp:StdTypes:v0001---->ns1
urn:Namespaces.Abc.Com:Trp:PurchaseOrderExtension:v0001----------->ns2

XML look like

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


when debugged the pipeline is still having prefix namespace tns instead of ns2.

Can I remove the prefix namespace from the document. Am i missing anything. Can I extract field using regular expression.
Please suggest.

Thanks,
Monica

1 Like