That can't be right. The proxy classes are completely abstract from the
protocol. The only thing that changes is the serviceURI in the contstructor
"SA" <informatica@freemail.nl> wrote in message
news:uZEeOROdEHA.3588@TK2MSFTNGP11.phx.gbl...
> Lucien:
>
> I don't use wsewsdl2, I inherit from SoapClient to create my own proxy
> class. That's the only way I found it possible to use one class to call
both
> Tcp and Http and ASMX services.
>
> --
>
> Sven
>
>
> "Lucien" <*lucien*@MicrosoftAccount.com> wrote in message
> news:ue%23R38AdEHA.3392@tk2msftngp13.phx.gbl...
> > Yes you can either make the call wrapped, or change the service to be
> bare.
> > If you use the wsewsdl2 tool to create the proxy it will do this
> > automatically.
> >
> > "SA" <informatica@freemail.nl> wrote in message
> > news:u%23sMA2zaEHA.3524@TK2MSFTNGP12.phx.gbl...
> > > OK, I got it:
> > >
> > > adding
> > >
> > >
> >
>
Web.Services.Protocols.SoapDocumentMethod(ParameterStyle:=Protocols.SoapPara
> > > meterStyle.Bare)
> > >
> > > As an attribute on my WebMethod did the trick! I can now use one
> > SoapClient
> > > proxy to call TCP, HTTP, and ASMX web services.
> > >
> > > --
> > >
> > > Sven
> > >
> > >
> > > "SA" <informatica@freemail.nl> wrote in message
> > > news:u49%23gnzaEHA.3892@TK2MSFTNGP10.phx.gbl...
> > > > Morten:
> > > >
> > > > Thanks.
> > > >
> > > > In my case, I think the solution is shorter:
> > > >
> > > > Name =
> > > RequestSoapContext.Current.Envelope.GetBodyObject(GetType(NameInfo))
> > > >
> > > > seems to work fine.
> > > >
> > > > Of course, it is ridiculous to have to do that, IMHO.
> > > >
> > > > However, I think I found the difference. The SoapClient proxy
doesn't
> > use
> > > > wrapped mode, so the Soap body element is NameInfo. The Web Services
> > > client
> > > > proxy does use wrapped mode, so the Soap body element is Hello (name
> of
> > > the
> > > > WebMethod I am calling). I think I am going to have to investigate
how
> > to
> > > > get the SoapClient to use wrapped mode, or stop the Web Service from
> > > > requiring wrapped mode.
> > > >
> > > > --
> > > >
> > > > Sven
> > > >
> > > >
> > > > "morten" <morten@dk2net.dk> wrote in message
> > > > news:uep9mYwaEHA.3012@tk2msftngp13.phx.gbl...
> > > > > Hi Sven
> > > > >
> > > > > I've been struggeling with the same kind of problem. But only if
my
> > > > service
> > > > > returns a DataSet, all other object that i tried works fine.
> > > > >
> > > > > I don't know if this is a confirmed bug or a feature.
> > > > >
> > > > > Workaround to get DataSet out off bodyobject follows here.:
> > > > >
> > > > > SoapEnvelope resultEnvelope = this.SendRequestResponse("getData",
> > > > envelope);
> > > > >
> > > > > // extract result data.
> > > > > //BUG: DataSet ds = (DataSet)
> > envelope.GetBodyObject(typeof(DataSet));
> > > > //
> > > > > Bug in the WSE 2.0 work around shown below.
> > > > > DataSet ds = (DataSet)
> > > > XmlSerializerCache.GetXmlSerializer(typeof(DataSet),
> > > > > "
http://tempuri.org/").Deserialize( new
> > > > > StringReader(resultEnvelope.Body.InnerXml ));
> > > > >
> > > > > Regards
> > > > > Morten
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "SA" <informatica@freemail.nl> wrote in message
> > > > > news:Oq%23B$DtaEHA.3664@TK2MSFTNGP12.phx.gbl...
> > > > > > Hi all:
> > > > > >
> > > > > > In order to have one generic proxy class on my client that can
> both
> > > > handle
> > > > > > TCP and HTTP channels, I created a class that derives from
> > SoapClient.
> > > > > >
> > > > > > It can call my TCP SoapService (running as a Windows Service)
> fine.
> > > > > >
> > > > > > It can call my HTTP .asmx Web Service, but apparently, the SOAP
> body
> > > > does
> > > > > > not get deserialized. The argument to my WebMethod is Nothing.
> Yet,
> > in
> > > > > that
> > > > > > same method calling
> > > RequestSoapContext.Current.Envelope.GetBodyObject()
> > > > > > returns a valid object.
> > > > > >
> > > > > > If I call the same HTTP web service using a proxy that was
> generated
> > > by
> > > > > > adding a Web Reference, it works fine (i.e. the argument to my
> > > WebMethod
> > > > > is
> > > > > > the object I expect it to be).
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Sven
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>