XSD Schema will not validate

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › XSD Schema will not validate

Viewing 1 reply thread
  • Author
    Posts
    • #22275

      I am very new to Biztalk and XML so I quickly appologize for my ignorance (and my spelling).

      I have created a map in Biztalk 2006 R2 from X.12 211 to an XML XSD of my SQL Server 2005 tables. The map and orchistration works great.  My problem is getting the data from XML to SQL Server. 

      I created the XSD file using the following t-sql: SELECT  tbl_BOL_Header.*, tbl_BOL_Detail.*, tbl_BOL_Marks_Numbers.*, tbl_BOL_Addresses.*, tbl_BOL_Purchase_Order.* FROM  tbl_BOL_Header INNER JOIN tbl_BOL_Detail ON tbl_BOL_Header.BOLNum = tbl_BOL_Detail.D_BOLNum INNER JOIN tbl_BOL_Addresses ON tbl_BOL_Header.BOLNum = tbl_BOL_Addresses.A_BOLNum INNER JOIN tbl_BOL_Marks_Numbers ON tbl_BOL_Header.BOLNum = tbl_BOL_Marks_Numbers.M_BOLNum INNER JOIN tbl_BOL_Purchase_Order ON tbl_BOL_Header.BOLNum = tbl_BOL_Purchase_Order.P_BOLNum for XML auto, xmlschema

      When I try to validate the Scema I get the following error:

      error BEC2009: Node “<Schema>” – Schema reference “http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd&#8221; is not a valid reference or does not exist in the current project.

      When I try to add the web reference the system gives me the reference name “com.microsoft.schemas”.  When I click on Add Reference i get the error “Could not generate Biztalk Files.  DiscoCodeGenerator was unable to inilize the code generator”.  I am lost and not sure what to do.

      I have also tried to load this data using BCP and Bulk Load (in SQL) but in both cases the process fails. 

      Can someone geive me some assistance on this issue?

      Thanks in advance.

       

       

    • #22276

      Hello,

      You created the schema (you call it XSD file) – using stored procedrure or using query?

      After you create the schema – you need to eliminate the<< xmlauto, xmldata>> line from your SQL query.

      • #22279

        I created the schema using a query.  The only purpose for the query was to create the schema.  Is there a better way?

        • #22280

          Hi again,

          I don’t know if it’s a better way (for your solution) – but there’s other way: you create stored procedure , and after that you add generated Items -> generate SQL – generate schema. After you generate it – there will be added schema  and an empty orchestration which you can delete. After you generate the schema – go to your stored procedure and delete the row “for xml auto, xmldata” – otherwise you will receive the exact error you get in your case.

          Didn’t work much with queries, but maybe the row with “for xmlauto, xmlschema” – that is what makes error (not familiar with syntax for queries).

      • #22283

        That did the trick.  Thanks

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.