OpenGIS / X has already been declared

Jan 19, 2012 at 11:13 AM

Hi,

I'm trying to set up a WCF (Visual Studio 2010) service from Open Geospatial Consortium Web Feature Service interface (WFS) using this schema http://schemas.opengis.net/wfs/2.0/wfs.xsd

I have created the WSDL description using WSCF.blue (selected the "Infer Operations" check box when specifying operations). I have then tried to generate Service-side stub from the WSDL but regardless of the options I choose I just get a list of errors as outcome. Searching the web I have come to understand that the reason is that OpenGIS schemas just are not .Net compliant (and possibly even misdesigned).

Is there a way to get pass these errors with WSCF.blue? Error listing below for reference.

There was a validation error on a schema generated during export:
    Source: 
    Line: 2 Column: 3
   Validation Error: The global attribute 'http://www.w3.org/XML/1998/namespace:lang' has already been declared.
---------------------------------------------------------------------------------
There was a validation error on a schema generated during export:
    Source: 
    Line: 3 Column: 3
   Validation Error: The global attribute 'http://www.w3.org/XML/1998/namespace:space' has already been declared.
---------------------------------------------------------------------------------
There was a validation error on a schema generated during export:
    Source: 
    Line: 11 Column: 3
   Validation Error: The global attribute 'http://www.w3.org/XML/1998/namespace:base' has already been declared.
---------------------------------------------------------------------------------
There was a validation error on a schema generated during export:
    Source: 
    Line: 12 Column: 3
   Validation Error: The global attribute 'http://www.w3.org/XML/1998/namespace:id' has already been declared.
---------------------------------------------------------------------------------
There was a validation error on a schema generated during export:
    Source: 
    Line: 13 Column: 3
   Validation Error: The attributeGroup 'http://www.w3.org/XML/1998/namespace:specialAttrs' has already been declared.
---------------------------------------------------------------------------------
Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: These members may not be derived.
XPath to Error Source: //wsdl:definitions[@targetNamespace='bar']/wsdl:portType[@name='foobarInterface']
---------------------------------------------------------------------------------
Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='bar']/wsdl:portType[@name='foobarInterface']
XPath to Error Source: //wsdl:definitions[@targetNamespace='bar']/wsdl:binding[@name='BasicHttpBinding_foobarInterface']
---------------------------------------------------------------------------------
Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='bar']/wsdl:binding[@name='BasicHttpBinding_foobarInterface']
XPath to Error Source: //wsdl:definitions[@targetNamespace='bar']/wsdl:service[@name='foobarPort']/wsdl:port[@name='foobarPort']
---------------------------------------------------------------------------------