{"id":240,"date":"2018-10-09T21:07:43","date_gmt":"2018-10-09T20:07:43","guid":{"rendered":"http:\/\/wp.bizoir.dk\/?p=240"},"modified":"2018-12-23T11:10:35","modified_gmt":"2018-12-23T10:10:35","slug":"cannot-resolve-the-schemalocation-attribute","status":"publish","type":"post","link":"https:\/\/wp.bizoir.dk\/?p=240","title":{"rendered":"Cannot resolve the &#8216;schemaLocation&#8217; attribute"},"content":{"rendered":"<p>Biztalk are often quite troublesome with XSD schema imports<\/p>\n<p>I had recently the problem with the Italian <a href=\"http:\/\/www.fatturapa.gov.it\/export\/fatturazione\/en\/normativa\/f-2.htm\">PA-Xml<\/a> format, which imports the standard w3 <a href=\"http:\/\/www.w3.org\/2000\/09\/xmldsig#\">xmldsig<\/a> schema<\/p>\n<p>When working with schema imports in Biztalk, it is not uncommon to receive the error &#8220;Cannot resolve the &#8216;schemaLocation&#8217; attribute&#8221;, which simply means, that Biztalk cannot load the imported schema.<\/p>\n<p>There are several possible reasons for this error:<\/p>\n<ul>\n<li>The schema location is an URL. I have never yet seen an imported schema work in Biztalk if the schemalocation is an URL. Download the imported schema, include it in the project and modifiy the schemalocation to point to the local file<\/li>\n<li>In the &#8220;xsd:import&#8221; element, the namespace attribute are listed before the schemalocation attribute. Biztalk seems to prefer that the schemalocation attribute is listed first<\/li>\n<li>When modifying the schemalocation to point to a local file (same directory as the .XSD file), Biztalk sometimes prefer if you put &#8220;.\/&#8221; before the filename of the imported schema<\/li>\n<\/ul>\n<p>I have yet not found a clear rule for when to do what &#8211; except that an URL in the schemalocation will never work.<\/p>\n<p>With the Italian PAXml format, neither of these points work. Whatever I did, Biztalk kept informing me, that it &#8220;could not resolve the schemalocation&#8221; attribute.<\/p>\n<p>What worked for me, was to create a folder in the Biztalk Schema project, and place the PAXml schema as well as the xmldsig schema in this folder. This folder in the project, does not have any practical impact when using this schema. When I did this, the schema project compiled without problems.<\/p>\n<p>References:<\/p>\n<p><a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/en-US\/7ae8ac29-7f60-447b-8e4e-a470dd21e259\/cannot-resolve-the-schemalocation-attribute?forum=biztalkgeneral\">https:\/\/social.msdn.microsoft.com\/Forums\/en-US\/7ae8ac29-7f60-447b-8e4e-a470dd21e259\/cannot-resolve-the-schemalocation-attribute?forum=biztalkgeneral<\/a><\/p>\n<p><a href=\"https:\/\/biztalkmessages.wordpress.com\/2011\/06\/17\/warning-cannot-resolve-the-schemalocation-attribute\/\">Biztalkmessages.wordpress.com<\/a><\/p>\n<p>[srs_total_visitors]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Biztalk are often quite troublesome with XSD schema imports I had recently the problem with the Italian PA-Xml format, which imports the standard w3 xmldsig schema When working with schema imports in Biztalk, it is not uncommon to receive the error &#8220;Cannot resolve the &#8216;schemaLocation&#8217; attribute&#8221;, which simply means, that Biztalk cannot load the imported &hellip; <a href=\"https:\/\/wp.bizoir.dk\/?p=240\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Cannot resolve the &#8216;schemaLocation&#8217; attribute&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-240","post","type-post","status-publish","format-standard","hentry","category-biztalk"],"_links":{"self":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=240"}],"version-history":[{"count":6,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":343,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts\/240\/revisions\/343"}],"wp:attachment":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}