c# - SVCUtil skip complexType of a wsdl to avoid duplicates -
i have multiple wsdl files downloaded on local - a.wsdl , b.wsdl
a.wsdl has same set of complex type (nearly 100) of b.wsdl <xsd:complextype name="book">
methods/operations different.
for example: a.wsdl has complex type <xsd:complextype name="book">
, operations being create new operations
b.wsdl has same complex type <xsd:complextype name="book">
, operations being read operations
i using svcutil generate stubs on client end single file , stubs same namespace. getting below error:
error: there error verifying xml schemas generated during export: complextype http://mylocalhost/object:book
has been declared.
the constraints are:
1) not able change wsdl files.
2) place generated stub classes in single name space.
3) no wsdl.exe
is there way either duplicated complextype skipped or overwritten?
i quote daniel roth has provided here
"i think looking /sharetypes feature in wsdl.exe. if want correctly share types need generate clients both service @ same time. can passing location of metadata both services svcutil: svcutil [service url1] [service url2] when pass both services svcutil @ same time svcutil can figure out types shared , generate 1 type instead of many. if want svcutil generate existing types instead of new types, need 'reference' existing types in dll: svcutil /reference:mytypes.dll [service url1] [service url2] if there types in referenced dll don't want used in code generation, can use /excludetype switch keep type getting generated."
Comments
Post a Comment