Schema validation error

Hi!

After spending a lot of hours on this problem, I hope you can help please:

I have a schema that is not defined as Qualified. Element FormDefault = Default. Didn't change anything.

My problem is with a map that fails at the input validation stage even when I try to test the map.

The error I get is:

C:\input.xml: error btm1044: Input validation error: The element 'NV_CELL_SITE_PROD_RESPONSE' in namespace 'PS.CellSite.Response' has invalid child element 'NV_CEL_SITE_RES' in namespace 'PS.CellSite.Response'. List of possible elements expected: 'NV_CEL_SITE_RES'.

This error occures when I use the xml that I am supposed to use (which I get back from a Web service of a third party).

The xml starts with:

<NV_CELL_SITE_PROD_RESPONSE xmlns="PS.CellSite.Response">   <NV_CEL_SITE_RES>

If I manually edit it and add qualification to the root element at the xml (not changing anything at the xsd), it works fine:

<ns0:NV_CELL_SITE_PROD_RESPONSE xmlns:ns0="PS.CellSite.Response">

  <NV_CEL_SITE_RES>

Do you have any idea why does it happen and what can I do? 

If I didn't defined the qualification at the xsd, why does the validatior needs it on order to the validation to be succesfull ?


* I am using biztalk 2010, VS 2010.

Thanks!

Eran.

February 1st, 2015 11:19am

Because the default is unqualified (meaning that only the root element contains the namespace). Your example is clearly qualified, so Element Form Default needs to be set to qualified.

Morten la Cour

Free Windows Admin Tool Kit Click here and download it now
February 1st, 2015 11:31am

Because the default is unqualified (meaning that only the root element contains the namespace). Your example is clearly qualified, so Element Form Default needs to be set to qualified.

Morten la Cour

  • Proposed as answer by Rajasekhar.R Monday, February 02, 2015 5:35 AM
February 1st, 2015 7:28pm

Because the default is unqualified (meaning that only the root element contains the namespace). Your example is clearly qualified, so Element Form Default needs to be set to qualified.

Morten la Cour

Thanks.

Even after setting the Element FormDefault to  qualified, I get the same problem...

Eran.

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 3:36am

Try Test mapping, buy making the Input and Output Validation set to False.

February 2nd, 2015 4:46am

Hi,

I think all the nodes element are not being mapped which is the reason you are getting exception in mapping . Short cut is to disable the validate input output of the map and then try to test the map.

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 5:01am

Disabling the validation won't help. The problem occures also when running the process, not just when running the test map utility.

The test map utility just helped me to understand that the map is not functioning proparly becuase of this problem.

Thanks,

Eran.

February 2nd, 2015 5:32am

This isn't any issue with map. It  is the problem with the schema that it expects a default namespace prefix ns0 at the root node of the unqualified message.

The work around would be to add a namespace prefix to the message at the receive pipeline.

There are many custom components to this job.

BUt interestingly, I recently came across a component from Microsoft, (which I haven't tried though)  at https://msdn.microsoft.com/en-us/library/cc789137.aspx

Please go through the above link if it  helps you.

Please mark the post as answer or vote as helpful if it helps

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 3:58pm

Hi,

Yes, that's  what I did today in order to move on with the development (spent too much time because of this problem... ) - added the "ns0:"  prefix by code, although I know it is not an elegant solution :-)

If I'll still have time I will check for a more elegant solution.

Thanks,

Eran.

February 2nd, 2015 6:23pm

You need to have the Element Form Default property set as Qualified
Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 6:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics