Hi,

I call an webservice from my mobile application to send an array trought
them. It is possible get de size in bytes of data that webservice transfer
to server?. My goal is show in a label de value of data transfer like this:
" your transfer x Kb ".


--
Armando Rocha
Mobile Developer

http://www.ifthensoftware.com
PORTUGAL

RE: Size in Bytes transfered... by srhartone

srhartone
Thu Jun 26 10:37:06 CDT 2008

You can write a soap extension that runs on your web server with your web
service which then you can get the length of the whole message (inc. the SOAP
envelope header etc) assuming you are using SOAP.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Armando Rocha" wrote:

> Hi,
>
> I call an webservice from my mobile application to send an array trought
> them. It is possible get de size in bytes of data that webservice transfer
> to server?. My goal is show in a label de value of data transfer like this:
> " your transfer x Kb ".
>
>
> --
> Armando Rocha
> Mobile Developer
>
> http://www.ifthensoftware.com
> PORTUGAL
>

Re: Size in Bytes transfered... by Armando

Armando
Thu Jun 26 11:43:31 CDT 2008

Hi,

Can i give me a sample how can i do that? im newer in webservices...

--
Armando Rocha
Mobile Developer

http://www.ifthensoftware.com
PORTUGAL
"Simon Hart [MVP]" <srhartone@yahoo.com> escreveu na mensagem
news:1610FB08-811A-44E0-A262-B0B9E6BD644F@microsoft.com...
> You can write a soap extension that runs on your web server with your web
> service which then you can get the length of the whole message (inc. the
> SOAP
> envelope header etc) assuming you are using SOAP.
> --
> Simon Hart
> Visual Developer - Device Application Development MVP
> http://simonrhart.blogspot.com
>
>
> "Armando Rocha" wrote:
>
>> Hi,
>>
>> I call an webservice from my mobile application to send an array trought
>> them. It is possible get de size in bytes of data that webservice
>> transfer
>> to server?. My goal is show in a label de value of data transfer like
>> this:
>> " your transfer x Kb ".
>>
>>
>> --
>> Armando Rocha
>> Mobile Developer
>>
>> http://www.ifthensoftware.com
>> PORTUGAL
>>


Re: Size in Bytes transfered... by srhartone

srhartone
Thu Jun 26 14:17:02 CDT 2008

You need to look at SoapExtension class (supported on the CF for client side
support):
http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapextension.aspx

The method you'll be intererested in is ProcessMessage which you override in
your class. This method gets called four times for each method invocation and
you inspect the SoapMessage object to determine whether the message is
inbound or outbound. You'll probebly be interested in
SoapMessageStage.AfterSerialize which is the actual data sent over the wire
and occurs client end.

You will need to modify the WSDL proxy and add the extension for the
interested web methods - assuming you are wanting to do this client side.

There are probably hundreds of samples on the web blogs etc, try searching
using google.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Armando Rocha" wrote:

> Hi,
>
> Can i give me a sample how can i do that? im newer in webservices...
>
> --
> Armando Rocha
> Mobile Developer
>
> http://www.ifthensoftware.com
> PORTUGAL
> "Simon Hart [MVP]" <srhartone@yahoo.com> escreveu na mensagem
> news:1610FB08-811A-44E0-A262-B0B9E6BD644F@microsoft.com...
> > You can write a soap extension that runs on your web server with your web
> > service which then you can get the length of the whole message (inc. the
> > SOAP
> > envelope header etc) assuming you are using SOAP.
> > --
> > Simon Hart
> > Visual Developer - Device Application Development MVP
> > http://simonrhart.blogspot.com
> >
> >
> > "Armando Rocha" wrote:
> >
> >> Hi,
> >>
> >> I call an webservice from my mobile application to send an array trought
> >> them. It is possible get de size in bytes of data that webservice
> >> transfer
> >> to server?. My goal is show in a label de value of data transfer like
> >> this:
> >> " your transfer x Kb ".
> >>
> >>
> >> --
> >> Armando Rocha
> >> Mobile Developer
> >>
> >> http://www.ifthensoftware.com
> >> PORTUGAL
> >>
>