Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Image from a WebService

Reply
Thread Tools

Image from a WebService

 
 
Nicolas
Guest
Posts: n/a
 
      06-20-2006
Hello!

I have a question: I have a database in MySql that has two fields (code and
image). Now, I want to create a WebService that takes the image of the most
current row (the code is the date in which the image took). And then, create
a page in ASP.NET that calls this WebService, show the image and repeat this
behavior every 5 seconds (it is the time that is take a new image be
creating in the base of information). Can someone help or at least orientate
me in this?

Thank you very much and sorry about my poor english


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      06-20-2006
Nicolas,
ASP.NET WebServices transmit images as type byte[] (a byte array) and they
are typically sent over the wire as Base64 Encoded string of data.

Your consumer application should be able to take this byte[] stream result
of it's WebMethod call and, using one of the Image Class overloads, load it
into an Image object for display.

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Nicolas" wrote:

> Hello!
>
> I have a question: I have a database in MySql that has two fields (code and
> image). Now, I want to create a WebService that takes the image of the most
> current row (the code is the date in which the image took). And then, create
> a page in ASP.NET that calls this WebService, show the image and repeat this
> behavior every 5 seconds (it is the time that is take a new image be
> creating in the base of information). Can someone help or at least orientate
> me in this?
>
> Thank you very much and sorry about my poor english
>
>
>

 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      06-21-2006
Hi,

Peter Bromberg [C# MVP] wrote:
> Nicolas,
> ASP.NET WebServices transmit images as type byte[] (a byte array) and they
> are typically sent over the wire as Base64 Encoded string of data.
>
> Your consumer application should be able to take this byte[] stream result
> of it's WebMethod call and, using one of the Image Class overloads, load it
> into an Image object for display.
>
> Peter


For a web application, an elegant alternative could be to use the
ability that the Image objects have to reload themselves without the
whole page having to be refreshed.

For example:

var nImg = document.getElementById( "myImage" );
if ( nImg
&& nImg.src )
{
nImg.src = "image.gif";
}

and to set a timer to call this code every 5 seconds.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem to call a WEBSERVICE in another WEBSERVICE (AXIS/ TOMCAT) Cyril Java 2 06-01-2006 06:07 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 1 01-26-2006 12:05 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 0 01-26-2006 08:13 AM
WebService on Java server versus WebService on .NET Mr. x Java 2 10-09-2003 11:21 PM
use another webservice in a webservice Mr. x ASP .Net Web Services 0 09-26-2003 10:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57