The '' element is not declared


  • 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 '' 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,

    Monday, March 06, 2006 8:11 PM


All replies

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



    Monday, March 06, 2006 8:56 PM
  • 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
    Error: The '' element is not declared.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://Microsoft.Ser

    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
    XPath to Error Source: //wsdl:definitions[@targetNamespace=''

    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=''
    XPath to Error Source: //wsdl:definitions[@targetNamespace=''

    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.



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

    can any one look at my issue?



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


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

    <xs:schema id="NewDataSet" targetNamespace="" xmlns:mstns="" xmlns="" xmlns:xs="" 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