default namespace while coverting documentToXml

Hi All,

am using documenttoXml service for converting the document to xml, in output i need a defalut namespace which doe’snot namespace key xmlns="http://ns.ccs.nl/claim/IncidentCall/v1, it should effent in output xml.

i have other namespace have the key for namespaces
xmlns:claim=“http://ns.ccs.nl/claim/v1
xmlns:party=“http://ns.ccs.nl/party/v1
xmlns:ccs=“http://ns.ccs.nl/v1

for this i have created keys in nsDecls of documentToXml service, am not getting how to get namespace which doen’t have the key, i have tried with creating @xmlns string in the document and set the value of this to [url]http://ns.ccs.nl/claim/IncidentCall/v1[/url] where am using this document,but i require without setting the xmlns="http://ns.ccs.nl/claim/IncidentCall/v1 namespace where every am using this document ,i need to set the name space xmlns="http://ns.ccs.nl/claim/IncidentCall/v1 every time without creating @xmlns in the document where ever am using this document should have namespace xmlns="http://ns.ccs.nl/claim/IncidentCall/v1, please let me how can i get this namespace.

document is
incidentCall -----document
—person----------string
—name -------------string
value--------------string

output is




Regardsa,
anil kumar e

after you convert to xml string you can use pub.string:replace transformer search for ‘xmlns:’ and leave the replace string as blank … map the xmldata back to xmldata…

HTH

thank for reply leonlee, but it is not a good practise i believe, please let me know, if any other way to hanlde this, problem here is where am using this odument i need to use replace service.

i’m confused…so u don’t want ‘xmlns:’ only for but want to see for the rest? if possible email me a sample what u r trying to do… leonlewis81 at gmail.com

Hi,
I have attached the xsd and expected xml for my requirement.

For Default name space - (Please check the expected xml attached) - To create such a root tag - you have suggested to use replace string service. I was successfull in creating such a weird looking root tag.

Once, i create the string - the XQL queries to recognize the XML TN document attributes on TN Console is failing with the following errors.

Envelope query for SenderID of doctype ESPE XML Lava Pass Thru failed to produce a result. The document may not be complete. The query was: /DataShares/dataShares/Data/from

Envelope query for ReceiverID of doctype ESPE XML Lava Pass Thru failed to produce a result. The document may not be complete. The query was: /DataShares/dataShares/Data/to

Envelope query for DocumentID of doctype ESPE XML Lava Pass Thru failed to produce a result. The document may not be complete. The query was: /DataShares/dataShares/Data/millIDNumber

I tried namespace mappings on TN XML document type definition given below. Despite that, it didn’t make any difference.
prefix0[FONT=verdana,sans-serif][SIZE=2]= [URL]http://schemas.datacontract.org/2004/07/VerifyBrand.Model[/URL][/size][/font]

Please help me to acheive this requirement.

Thanks,
Shashank.
Expected.xml (602 Bytes)
datamigration.xsd (1.83 KB)