locked
Schema validation error RRS feed

  • Question

  • 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.


    Eran.


    • Edited by eranz4 Sunday, February 1, 2015 4:19 PM fix details
    Sunday, February 1, 2015 4:16 PM

Answers

  • 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

    Monday, February 2, 2015 12:58 PM

All replies

  • 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 2, 2015 5:35 AM
    Sunday, February 1, 2015 4:28 PM
  • 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.


    Eran.

    Monday, February 2, 2015 8:34 AM
  • Try Test mapping, buy making the Input and Output Validation set to False.


    Regards - Rajasekhar.R ' Don't forget to mark the post as answer or vote as helpful if it does,

    Monday, February 2, 2015 9:44 AM
  • 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

    Monday, February 2, 2015 9:58 AM
  • 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.


    Eran.

    Monday, February 2, 2015 10:30 AM
  • 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

    Monday, February 2, 2015 12:58 PM
  • 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.


    Eran.

    Monday, February 2, 2015 3:23 PM
  • You need to have the Element Form Default property set as Qualified
    Monday, February 2, 2015 3:36 PM