Reputation: 646
I have many WSDL's and referenced XSD's in a directory structure. Some types in XSD - for example a common message header - are shared among all WSDL's. I run svcutil.exe for each WSDL, to have separate namespace for the service and it's types, but I would like to somehow reuse common types, namely the header, because I would like to have a common handling mechanism for headers. If every header type is in different namespace, it is different type and common processing is difficult.
Can somebody have an idea, how to solve this issue?
EDIT: I'm using XmlSerializer, so I cannot use /r switch of svcutil.exe.
Upvotes: 0
Views: 655
Reputation: 21658
One approach supported by svcutil is the use of the /reference (/r) switch.
You can generate the common classes and compile them in a separate assembly (using one of those services), then use that assembly as a reference in subsequent invocations of svcutil, for the other services.
A helpful reference might be here. The command line reference is here.
Upvotes: 0