Cannot use xs:extension in WSCF blue


Since moving to VisualStudio2010 & WSCF blue I can no longer generate server side code. No problems with previous versions.
From the XSD I can generate the WSDL without any issues.
Choosing the wsdl -Generate Web Service Code. Select Server Side I get the following errors...
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='http://www.***.com/oGIPI']/wsdl:portType[@name='iGIPIInterface']

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='http://www.***.com/oGIPI']/wsdl:portType[@name='iGIPIInterface']

XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.***.com/oGIPI']/wsdl:binding[@name='BasicHttpBinding_iGIPIInterface']

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='http://www.***.com/oGIPI']/wsdl:binding[@name='BasicHttpBinding_iGIPIInterface']

XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.***.com/oGIPI']/wsdl:service[@name='iGIPIPort']/wsdl:port[@name='iGIPIPort']

Any help appreciated


ybdub wrote Nov 11, 2010 at 1:06 PM

This issue is down to the use of xs:extension in my XSD.
Removing the xs:extension fixes the issue, server code is generated without issue. but obviously it generates different code which would be a breaking change for my component & all clients...
I'll keep looking for a workaround...

<xs:element name="registerPunterRequest" type="RegisterPunterRequest" />
<xs:complexType name="RegisterPunterRequest">
  <xs:extension base="myco:GenericRequest" >
      <xs:element name="Username" type="myco:UsernameType" minOccurs="1" maxOccurs="1" />


in a seperate XSD (putting them in the same xsd give the same error)

<xs:complexType name="GenericRequest" abstract="true">
  <xs:element name="header" type="Header" minOccurs="1" maxOccurs="1" />
<!--GenericResponse--> <xs:complexType name="GenericResponse" abstract="true">
  <xs:element name="returnCode" type="ReturnCode" minOccurs="1" maxOccurs="1" />

wrote Nov 11, 2010 at 1:09 PM

wrote May 12, 2011 at 12:59 PM

wrote Sep 5, 2011 at 7:44 PM

roboguy wrote Oct 31, 2011 at 2:03 AM

I'm striking this exact same problem. Did you find a work around?


wrote Oct 31, 2011 at 2:04 AM

ybdub wrote Nov 1, 2011 at 11:25 AM

Hi James,

I'm afraid I never did find a satisfactory workaround. The last time I needed to update my xsd I did so in VS2005 and then copied the generated code to my VS2010/WSCF blue solution. (I have not had to change this component since.)
If you need to update your XSD or component on a regular basis I doubt this would be acceptable.


wrote Feb 7, 2012 at 9:07 PM

RoboJ1M wrote Oct 3, 2012 at 3:03 PM

I just found this project yesterday after being asked to produce a SOAP wrapper for our business layer which is all built around a set of schemas.
Thought this was the answer but we use extensions everywhere!
Tried changing my element to a type and wrapping that in an element but that also fails:
<xs:complexType name="CreateFormInput">
        <xs:extension base="wst:MethodInput">


<xs:element name="CreateEventsFormInputWrapped" type="CreateEventsFormInput" substitutionGroup="wst:WS2MethodInput"/>

RoboJ1M wrote Oct 3, 2012 at 3:46 PM

In other news, if you change the following line in the wsdl:
<part name="parameters" element="import0:CreateFormInput" />
to this:
<part name="anythingEXCEPTparameters" element="import0:CreateFormInput" />
It now works. Extensions and all.


public partial class CreateFormInput1 : MethodInput

RoboJ1M wrote Oct 3, 2012 at 4:25 PM

More useful information:


If we're lucky, we can change the XSD/WSDL in a way that allows you to force .NET to drop out of "unwrapping" the parameters

wrote Feb 22, 2013 at 12:16 AM