This project is read-only.

Validation errors when generating web service code with WSCF.blue V1.0.5

Nov 12, 2009 at 5:25 PM
Here are my steps:
 
1) Download http://broadband-forum.org/cwmp/cwmp-1-1.xsd and add that file to a VS project
2) Right-click on cwmp-1-1.xsd and generate WSDL with service name TestService and namespace of TestNamespace, check Infer operations, other options at default
3) Right-click on new TestService.wsdl and generate web service code, code generation of service-side stub, other options at default
 
The result is a ton of validation errors, and a couple other errors at the end.
I'm able to generate stubs successfully from the .xsd file using Microsoft's XSDObjectGenerator, but I was hoping that WSCF could produce nicer code with the added features that it has.
 
Any help would be appreciated!  Thanks...
 
The errors:
 
There was a validation error on a schema generated during export:
    Source:
    Line: 44 Column: 4
   Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:Array' has already been declared.
---------------------------------------------------------------------------------
There was a validation error on a schema generated during export:
    Source:
    Line: 50 Column: 4
   Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:Struct' has already been declared.
---------------------------------------------------------------------------------
There was a validation error on a schema generated during export:
    Source:
    Line: 66 Column: 4
   Validation Error: The global element 'http://schemas.xmlsoap.org/soap/encoding/:duration' has already been declared.
 
etc.
.
.
.
 
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='TestNamespace']/wsdl:portType[@name='TestServiceInterface']
---------------------------------------------------------------------------------
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='TestNamespace']/wsdl:portType[@name='TestServiceInterface']
XPath to Error Source: //wsdl:definitions[@targetNamespace='TestNamespace']/wsdl:binding[@name='BasicHttpBinding_TestServiceInterface']
Nov 20, 2009 at 1:14 PM

Hi Nick,

If you would like to simply generate the types you can right-click on the XSD file and select "WSCF.blue -> Generate Data Contract Code...". You will be able to set your code generation options before generating the data contract types.

Cheers,

Alex.