That kind of helps, but the thing that is annoying is more like this:

namespace MyApp.WebReference1 {
 class MySoapHeader {
 };
};

namespace MyApp.WebReference2 {
 class MySoapHeader {
 };
};

This is sort of what gets generated, but in fact 'MySoapHeader' is really
the same class, same data format, and on my server lives in the same schema.
For client code using these web services I have to instantiate the right one
for the right service, when really they could be the exact same class.

So the alias thing can make the qualified usage less verbose, but it doesn't
let code take advantage of the fact that the app could create this header
once, and use it forever.

Not the end of the world, just one of those things I guess..

-John

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of
> Erick Thompson
> Sent: Tuesday, April 30, 2002 9:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] Handling multiple web references
>
>
> John,
>
> If I understand what your doing, you can use the alias option of the using
> directive to make things a little cleaner. You'll still need one scope
> identifier in front of calls, but that makes sense.
>
> using WS1 = Long.Namespace.To.Web.Server.Version1;
> using WS2 = Long.Namespace.To.Web.Server.Version2;
>
> WS1.SomeMethod();
> WS2.SomeMethod();
>
> Is this what you were looking for?
>
> Erick
>
> ----- Original Message -----
> From: "John Burkhardt" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 30, 2002 4:37 AM
> Subject: [DOTNET] Handling multiple web references
>
>
> > I'm building a system that exposes many different web services.  These
> > services are not created using .NET, but I have created valid wsdl files
> for
> > them.  Each service requires the same SOAP header format.
> >
> > When I add them to a .NET project as a "Web Reference" the same header
> class
> > gets generated for the SOAP headers, but in a different namespace.  This
> > makes things kind of awkward.  Not unusable, but not as clean as I would
> > like.
> >
> > It would be trivial to edit the generated files - but that is also
> > problematic.
> >
> > Can anyone think of anything clever to do about this? Or should
> I consider
> > it a trade off with the simplicity of generating the proxy classes vs.
> hand
> > coding them, and the inconvenience of having to code using full
> namespace
> > usage (the header class of course gets the same name in each
> web reference
> > proxy).
> >
> > Thanks!
> >
> > ----------------------------------------------------------------------
> > John Burkhardt
> > Groove Networks, Inc
> > 978.720.2031
> > [EMAIL PROTECTED]
> >
> > Get Groove
> > http://www.groove.net/downloads/groove/
> >
> > You can read messages from the DOTNET archive, unsubscribe from
> DOTNET, or
> > subscribe to other DevelopMentor lists at http://discuss.develop.com.
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to