Basically what I am trying to do is use the same proxy class for different
clients since the web method is going to be the same for all clients. The url
differs for each of the client's web service which I dynamically populate.
The web method in my proxy class has the following:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("
http://tempuri.org/MyMethod",
RequestNamespace:="
http://tempuri.org/",
ResponseNamespace:="
http://tempuri.org/> But when I make a call the method, I get a namespace mismatch error
returned. This is because the client has a different namespace than what is
being used in my proxy.
My question is can I dynamically change SoapDocumentMethodAttribute to have
the same namespace as in the client specs.
Thanks,
[quoted text, click to view] "John Saunders [MVP]" wrote:
> "SG" <SG@dotnetdiscussions.com> wrote in message
> news:87FD0F10-3E89-4BA2-AC29-0A5610F21483@microsoft.com...
> > Question:
> > Is it possible to dynamically change the SoapDocumentMethodAttribute?
> >
> > Scenario:
> > We have a number of clients, each with their own web service. The web
> > method
> > name is the same in each web service. I can dynamically change the URL at
> > runtime by referencing the URL property.
> >
> > I have generated a proxy class and am using this rather than a web
> > reference.
> >
> > My problem is that the namespaces in each of the web services and my proxy
> > class is different.
> >
> > Is it possible to change the 'Action', 'RequestNameSpace', and
> > 'ResponseNameSpace' in the SoapDocumentMethodAttribute declaration in
> > order
> > to get this to work?
>
> I'm not sure what you mean. Which namespaces are different? Can you give an
> example?
> --
> --------------------------------------------------------------------------------
> John Saunders | MVP - Windows Server System - Connected System Developer
>
>