Search code examples
xmlnamespacesbiztalkbiztalk-2013

How do I tell BizTalk to accept an incoming namespace?


I am receiving an XML file over a webservice and using BizTalk for the transformation. I have the incoming scheme set up to match the nodes, but the Test Map command keeps failing. The file, as it comes in, has a namespace at the beginning of each element, e.g. . I have saved a copy of this file (and removed all but two entries) so that I can test.

When I run the test, I get

error btm1044: Input validation error: The element 'Report_Data' in namespace 'urn:com.X.X/X_X_-_X' has invalid child element 'Report_Entry' in namespace 'urn:com.X.X/X_X_-_X'. List of possible elements expected: 'Report_Entry'.

If I run the test on a copy of the same file where I've taken out the wd: namespace throughout, I do not get this error. How do I tell BizTalk that this XML uses the namespace wd:?


Solution

  • Open the schema in the xsd editor and select the "<Schema>" node above the root in the Schema tree. Then go to the properties and find "elementFormDefault". Set it to qualified instead of the default.

    This should automatically update your map to expect nodes in that namespace, rather than nodes without a namespace.