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.

Signature
Sven
> Hi Sven
>
[quoted text clipped - 11 lines]
> 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 ));
[quoted text clipped - 21 lines]
> >
> > Any ideas?
SA - 16 Jul 2004 15:02 GMT
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.

Signature
Sven
> Morten:
>
[quoted text clipped - 61 lines]
> > >
> > > Any ideas?
Lucien - 27 Jul 2004 20:23 GMT
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.
> OK, I got it:
>
> adding
Web.Services.Protocols.SoapDocumentMethod(ParameterStyle:=Protocols.SoapPara
> meterStyle.Bare)
>
[quoted text clipped - 72 lines]
> > > >
> > > > Any ideas?
SA - 28 Jul 2004 21:48 GMT
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.

Signature
Sven
> 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
[quoted text clipped - 3 lines]
> >
> > adding
Web.Services.Protocols.SoapDocumentMethod(ParameterStyle:=Protocols.SoapPara
> > meterStyle.Bare)
> >
[quoted text clipped - 78 lines]
> > > > >
> > > > > Any ideas?
Lucien - 06 Aug 2004 18:48 GMT
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
and you can still change that after instantiating through the destination
property.
If you found issues with this let me know because that should not be the
case (and I haven't come across this).
> Lucien:
>
[quoted text clipped - 10 lines]
> > >
> > > adding
Web.Services.Protocols.SoapDocumentMethod(ParameterStyle:=Protocols.SoapPara
> > > meterStyle.Bare)
> > >
[quoted text clipped - 84 lines]
> > > > > >
> > > > > > Any ideas?