none
The root element of a W3C XML Schema should be <schema>

    Question

  • Not sure where EXACTLY this post belongs because I'm not sure about the cause of the error - Visual Studio, or SSIS or underlying framework or an XML document. I'm starting here because I believe VS shell might be the culprit.

    I'm trying to add a web service task via [[Visual Studio 2010 Shell for SQL Server 2012 SSIS]].

    I have the wsdl file and the xsd file in the same folder. When I try to reference the wsdl file below, I get the error from Visual Studio:

    The root element of a W3C XML Schema should be <schema> and its namespace should be 'http://www.w3.org/2001/XMLSchema'.

    Also - the same xml/xsd produce perfect .cs proxy code when used with the wsdl.exe tool. And the service gives expected results when called via that code. It's just the Visual Studio 2010 shell for SSIS that is giving the above error.

    Here are the first few lines of the 13,000 line wsdl file:

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.cisco.com/AXLAPIService/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:xsd1="http://www.cisco.com/AXL/API/8.0" targetNamespace="http://www.cisco.com/AXLAPIService/">
    <import location="AXLSoap.xsd" namespace="http://www.cisco.com/AXL/API/8.0"/>
    <message name="addSipProfileIn">
    <part element="xsd1:addSipProfile" name="axlParams"/>
    </message>
    </import>

    First few lines of AXLSoap.xsd:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.cisco.com/AXL/API/8.0" xmlns:axlapi="http://www.cisco.com/AXL/API/8.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="8.0">
    <xsd:complexType name='XSipProfile'>
    <xsd:sequence minOccurs='0'>
    <xsd:element maxOccurs='1' nillable='false' name='name' minOccurs='1' type='axlapi:String50'></xsd:element>


    Monday, January 21, 2013 4:13 PM

Answers

All replies

  • The message is telling you what the problem is.  Your xsd should look like this:

    <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema targetNamespace="http://www.cisco.com/AXL/API/8.0" xmlns:axlapi="http://www.cisco.com/AXL/API/8.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="8.0">


    Chuck Pedretti | Magenic – North Region | magenic.com

    Monday, January 21, 2013 4:31 PM
  • Chuck, doesn't the XSD I posted satisfies both the requirements of the error?

     - root element is schema

     - target namespace is "http://www.w3.org/2001/XMLSchema

    I tried what you posted (copy paste) but still getting same error. Did you mean the XSD document should actually start with <xs:schema> and not even have this line:

    <?xml version="1.0" encoding="UTF-8"?>

    Or did you mean to replace the <xsd:schema> line in my post with what you posted?

    Monday, January 21, 2013 6:12 PM
  • Chuck - you are an expert - please help me my friend. I found this documented bug, but the example provided is too complex for me.

    http://support.microsoft.com/kb/820122?wa=wsignin1.0

    I'm almost positive my error might be related to the bug, because even if I change the location property in <import> element of wsdl to a random filename, I get the same error.

    Monday, January 21, 2013 11:34 PM
  • HOLY CR*P! turned out to be that the <import> element in XSD expects a fully qualified (http or https, cannot be c:\ d:\ etc) location property.
    Tuesday, January 22, 2013 12:51 AM
  • Good you figured it out, didn't notice the lack of the path. 

    Chuck Pedretti | Magenic – North Region | magenic.com

    Tuesday, January 22, 2013 1:04 PM