We're trying to write a .NET/C# application against a series of services.
Normally it would just be easy, add web reference and we're done. However
there a 5 different services and they all share common <schema:types> which
are declared in each wsdl (not imported from one central document). When I
add a web reference 5 different times it creates 5 different versions of
all these types in different namespaces.
For example, in Service1 the Customer type goes in MyService.Service1 and
in Service2 the Customer type goes into MyService.Service2 - creating two
distinct .NET types which represent the same schema type. This creates
issues as we want to share types and information from service to service.
Is there to circumvent this? Cheers,
- Dan
--
Dan Diephouse
http://netzooid.com
Henrik Gøttig - 04 May 2005 15:35 GMT
This creates
> issues as we want to share types and information from service to service.
Yup, it does.
Are you doing .NET 2.0 stuff or 1.1?
In .NET 2.0 this has been fixed through the /sharetypes switch on the
command line for wsdl.exe.
I remember it to be quite cumbersome in 1.1 to overcome this "issue".
Think I did declare the types in external XML schema files, and
referenced those through xsd:import in the types section of my wdsl
document or something like that. I can't quite remember anylonger...
Sorry... But 2.0 fixes it.
Regards
Henrik Gøttig
http://websolver.blogspot.com