Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2007

Tip: Looking for answers? Try searching our database.

Passing an array of images to a Web Service. Can this be done?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BillGatesFan - 04 Nov 2007 22:12 GMT
We need to send images to a machine so they can be processed and
adding to our web server. Can a asp.net accept an arry of images(maybe
an array of byte arrays)?

Any help is appreciated.
Dale - 06 Nov 2007 00:49 GMT
You cannot pass a jagged array (or array of arrays as in byte[][]) to a web
service but you can pass a multi-dimensional array (as in byte[x,y]).

Dale
Signature

Dale Preston
MCAD C#
MCSE, MCDBA

> We need to send images to a machine so they can be processed and
> adding to our web server. Can a asp.net accept an arry of images(maybe
> an array of byte arrays)?
>
> Any help is appreciated.
John Saunders [MVP] - 07 Nov 2007 14:05 GMT
> You cannot pass a jagged array (or array of arrays as in byte[][]) to a
> web
[quoted text clipped - 5 lines]
>> adding to our web server. Can a asp.net accept an arry of images(maybe
>> an array of byte arrays)?

Try passing something like this:

public class Image

{

public string Title;

public byte[] ImageData;

}

public class ImageList

{

public string ListTitle;

public Image[] Images;

}
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Dale - 07 Nov 2007 15:55 GMT
That is a good point, John, but passing the Image class or the ImageList
class you defined has its own set of problems.

For the OP:  You can get good examples of multitudes of ways to pass custom
objects like John talks about on my blog at
http://www.dalepreston.com/Blog/2005/02/returning-custom-classes-from-web.html

Dale

> Try passing something like this:
>
[quoted text clipped - 17 lines]
>
> }
John Saunders [MVP] - 08 Nov 2007 14:17 GMT
> That is a good point, John, but passing the Image class or the ImageList
> class you defined has its own set of problems.

Dale, could you please elaborate on some of those problems? I don't know of
any that matter.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Dale - 09 Nov 2007 04:15 GMT
Did you click the link in the post you quoted?

Dale

> > That is a good point, John, but passing the Image class or the ImageList
> > class you defined has its own set of problems.
>
> Dale, could you please elaborate on some of those problems? I don't know of
> any that matter.
John Saunders [MVP] - 12 Nov 2007 22:37 GMT
> Did you click the link in the post you quoted?

No, I didn't.

I have done so now, and still don't see any problems with passing the
classes I defined. I would appreciate it if you could elaborate on why there
are any problems passing those particular classes.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.