Re: Calling an ASMX web service (with WSE 2.0) using SoapClient proxy

From: morten (morten_at_dk2net.dk)
Date: 07/16/04


Date: Fri, 16 Jul 2004 09:25:58 +0200

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
>
>
>



Relevant Pages

  • Re: Consume web service using HTTP
    ... If you're calling the webservice through webpage's clientside script code, using the XML HTTP component as you mentioned should be ok. ... \par Subject: Re: Consume web service using HTTP ... \par set objXMLSend = Server.CreateObject ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: send soap message
    ... i was reading that in framework 1.1 the http get and http put ... if i run a web service and click on one of the functions available, ... > You didn't mention what framework you need to send the message with. ... > you using .Net or the Soap toolkit. ...
    (microsoft.public.dotnet.xml)
  • Re: forms auth, authenticate against already encrypted password?
    ... concerned with file transfer over http so the encryption ... SSL is in fact not really a big overhead - at least not for bandwidth - you need more CPU cycle to do the encryption. ... client scenario, each web service is its own proxy object, and it has ... Logoutweb methods ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Member variables in Web Service class
    ... [WebMethod] ... public String SayGoodbye() ... I know I can use the Session object, but I was lead to believe that it isn't best to use the ... Global.asax was added per default to each new web app (web service or web site). ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: an OO design question
    ... I see absolutely no reason to use a web service in this system. ... sending data to you over HTTP. ... I can see a strategy pattern for handling the upload to the third party ... > ascii spool report files are uploaded from various sources ...
    (microsoft.public.dotnet.general)