I have a similar problem as this question. I have multiple web services that I am consuming with WCF, which all share types. The services themselves are written in Java and I do not have access to them. The shared types have the same signatures, but svcutil.exe
gives this error when running:
Error: There was a validation error on a schema generated during export:
Source:
Line: 8 Column: 3
Validation Error: The complexType 'http://MyServer.MyService:CommonType' has already been declared.
With CommonType
having the same signature in both web services being consumed. Here's how I'm calling svcutil
:
svcutil.exe /o:GeneratedServices.cs /n:*,MyNamespace.Generated http://MyServer.MyService1?WSDL http://MyServer.MyService2?WSDL
I know that wsdl.exe
has /mergeTypes
flag, which works for these services, but there are some options on svcutil.exe
that I'd really like to use. I did have someone demonstrate that it is possible to me, however the backend was also using .NET and WCF, and I've been unsuccessful with the Java backend I'm using.