This project is read-only.

Cannot import WSDL when using DataSets

Topics: Technical Questions
May 18, 2009 at 3:44 PM

I had created several web services with WebMethods that returned DataSets. I attempted to import these services into MSE and got this error:

...Message[An error occurred while savingSchema and Objects for Import [Exception Information Type[XmlSchemaException]Source[System.Xml] Message[The 'http://www.w3.org/2001/XMLSchema:schema'element is not declared.]...

 

I converted my DataSets to XmlDataDocuments and was able to successfully import the web services. Has anyone else run into this? Are DataSets not supported?


Thanks.

May 18, 2009 at 4:40 PM

Can you please post the WSDL that you had erros with while importing?

May 18, 2009 at 6:21 PM

Here you go:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                  xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
                  xmlns:tns="http://tempuri.org/"
                  xmlns:s="http://www.w3.org/2001/XMLSchema"
                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
                  targetNamespace="http://tempuri.org/"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="FundSearch">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="searchterm" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="searchtype" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="FundSearchResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="FundSearchResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="FundDetails">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="cusip" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="fund_class" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="FundDetailsResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="FundDetailsResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="FundSearchSoapIn">
    <wsdl:part name="parameters" element="tns:FundSearch" />
  </wsdl:message>
  <wsdl:message name="FundSearchSoapOut">
    <wsdl:part name="parameters" element="tns:FundSearchResponse" />
  </wsdl:message>
  <wsdl:message name="FundDetailsSoapIn">
    <wsdl:part name="parameters" element="tns:FundDetails" />
  </wsdl:message>
  <wsdl:message name="FundDetailsSoapOut">
    <wsdl:part name="parameters" element="tns:FundDetailsResponse" />
  </wsdl:message>
  <wsdl:portType name="wsFundsSoap">
    <wsdl:operation name="FundSearch">
      <wsdl:input message="tns:FundSearchSoapIn" />
      <wsdl:output message="tns:FundSearchSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="FundDetails">
      <wsdl:input message="tns:FundDetailsSoapIn" />
      <wsdl:output message="tns:FundDetailsSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="wsFundsSoap" type="tns:wsFundsSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="FundSearch">
      <soap:operation soapAction="http://tempuri.org/FundSearch" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="FundDetails">
      <soap:operation soapAction="http://tempuri.org/FundDetails" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="wsFundsSoap12" type="tns:wsFundsSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="FundSearch">
      <soap12:operation soapAction="http://tempuri.org/FundSearch" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="FundDetails">
      <soap12:operation soapAction="http://tempuri.org/FundDetails" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="wsFunds">
    <wsdl:port name="wsFundsSoap" binding="tns:wsFundsSoap">
      <soap:address location="http://{servername}/wsfunds.asmx" />
    </wsdl:port>
    <wsdl:port name="wsFundsSoap12" binding="tns:wsFundsSoap12">
      <soap12:address location="http://{servername}/wsfunds.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>