locked
WCF Namespace problem / bug RRS feed

  • Question

  • User-739740388 posted

    Hi,

    Using VS2010 I have to implement a WCF Webservice based on a WSDL File. Now i have run into a problem

    Using the file provided using "svcutil source.wsdl" i get an error. 

    the class X in namespace a.b.c.d has an inner complex type Y which resides in namespace b.c.d

    The compiler just assumes that b.c.d is a subnamespace of a.b.c.d resulting in that the compiler searches for Y in the namespace of X

    Am i missing something?

    How can i solve this without changing namespaces? 

    Changing "a.b.c.d" to "some.name" and "b.c.d" to "anotherNS" solves the problem for the compiler but not for me...

    Please help!

    Friday, April 12, 2013 11:38 AM

Answers

  • User-1000095884 posted

    Hi,

    Using the file provided using "svcutil source.wsdl" i get an error. 

    the class X in namespace a.b.c.d has an inner complex type Y which resides in namespace b.c.d

    The compiler just assumes that b.c.d is a subnamespace of a.b.c.d resulting in that the compiler searches for Y in the namespace of X

    I am not clearly understand your error here, can you explain more clearly?

    The syntax should be: svcutil.exe [/t:code]  <metadataDocumentPath>* | <url>* | <epr>. The URL to a service endpoint that provides metadata or to a metadata document hosted online, if you are using url option, please make sure you have provide a correct url, you can try check the wsdl file from browser; metadataDocumentPath represent the path to a metadata document (wsdl or xsd) that contains the contract to import into code (.wsdl, .xsd, .wspolicy or .wsmex).

    For more informaton check "Code Generation" part of #ServiceModel Metadata Utility Tool (Svcutil.exe)

    http://msdn.microsoft.com/en-us/library/aa347733.aspx

    Best Regards.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 14, 2013 11:32 PM