none
The 'http://www.w3.org/2001/XMLSchema:schema' element is not declared

    Question

  • Hi,
    I am using the FEB release of WCF.
    I am using typed dataset in my service. when I try to generate proxy
    for this service, i am getting the following error:
    The 'http://www.w3.org/2001/XMLSchema:schema' element is not declared

    the same was working fine in previous version of WCF. Some thing
    seriously wrong with recent WCF release (FEB release)?

    Thanks in Advance,
    Venkat

    Monday, March 06, 2006 8:11 PM

Answers

All replies

  • Can you please describe your scenario a little more. What the operation looks like and how it is imported etc.

    Thanks

     

    Monday, March 06, 2006 8:56 PM
    Moderator
  • Thanks for the reply.

    1)Written a small piece of code to get data from Oracle database into DataSet

    2)Generated the schema from DataSet (DataSet.WriteXmlSchema)

    3)Generated Typed DataSet using XSD tool

    4)Used the typed DataSet in my sample code

    5)Tryed to generate Proxy class (client) fro the above service using SVCUTIL tool

    tool is failing to generate the proxy and throwing the exception:

    Microsoft (R) Service Model Metadata Tool
    [Microsoftr .NET Framework, Version 3.0.50727.357]
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Warning: Unable to import wsdl:portType
    Detail: An exception was thrown while running a WSDL import extension: System.Se
    rviceModel.Description.XmlSerializerMessageContractConverter
    Error: The 'http://www.w3.org/2001/XMLSchema:schema' element is not declared.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://Microsoft.Ser
    viceModel.Samples.DataContractCalculatorService']/wsdl:portType[@name='IInstruct
    ions']

    Warning: Unable to import wsdl:binding
    Detail: There was an error importing a wsdl:portType that the wsdl:binding is de
    pendent on.
    XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://Microsoft.Se
    rviceModel.Samples.DataContractCalculatorService']/wsdl:portType[@name='IInstruc
    tions']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/'
    ]/wsdl:binding[@name='WSHttpBinding_IInstructions']

    Warning: Unable to import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is depend
    ent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/'
    ]/wsdl:binding[@name='WSHttpBinding_IInstructions']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/'
    ]/wsdl:service[@name='InstructionsService']/wsdl:port[@name='WSHttpBinding_IInst
    ructions']

    Generating files...
    Warning: No code was generated.
    If you were trying to generate a proxy, this could be because the metadata docum
    ents did not contain any valid contracts/services
    or because all contracts/services were discovered to exist in /reference assembl
    ies. Verify that you passed all the metadata documents to the tool.
    Warning: If you would like to generate DataContract types from schemas please ma
    ke sure to include the /dataContractOnly option.

    However, i was able to generate the proxy without typed data set. And with Previous release of WINFX I was able to used Typed DataSet also.

    please let me know if you have any clue on thisw error.

    Thanks,

    Venkat

    Monday, March 06, 2006 9:10 PM
  • Hello  !!!

    can any one look at my issue?

    Thanks,

    Venkat

    Tuesday, March 07, 2006 6:10 PM
  • Sorry if you have already provided this info. Can you please post how your operation is declared?

    Thanks

    Monday, March 13, 2006 10:58 PM
    Moderator
  • Replaced the original <xs:schema> element with:

     
    <xs:schema id="NewDataSet" targetNamespace="http://tempuri.org/NewDataSet.xsd" xmlns:mstns="http://tempuri.org/TypedDataSet2.xsd" xmlns="http://tempuri.org/NewDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">

     

    the schema element (xs:schema) generated by dataset does not have all the attributes required for proxy generation.

    Monday, March 13, 2006 11:10 PM