Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Web Services are that easy!

Web Services are that easy!

Mike Bossy
Mike Bossy
I am a duck · · 1 min read
747 1
Well after rebuilding my laptop and ramping up on the new job I finally found some time to play around with web services. I was amazed to find out it almost is as easy as just sticking a compiler directive in front of your method. I mean it's almost not fair.

So I currently have two methods on my webservice, one called GetImageSize that returns the size of the image you're requesting so you know how big to make your buffer and then another one called GetImage that returns the byte array. The only problem I ran into is that the default buffer size for calling a method is 16k so any images greater than that size were getting truncated. A small change in the calling app's config file and it just worked.

Right now the web service is just serving up images from disk as a proof of concept. Next step is to just pull that data from a DB instead. That shouldn't be that difficult.

If I had any screen shot more exciting than a windows form with a bitmap displayed on it I would show something :)

Discussion

Loading comments...