send receive image files via Wcf restful service client

Devildib
Devildib used Ask the Experts™
on
Hi experts,

We have a requiremnt as in there is webform with browse upload .gif image functionality along with 2-3 text boxes to be filled.All this is to be sent to a wcf restful service which will commit the same to db.
Question is how do we send across the image file as attachment aling with request xml to the service.If not attachment what isbthe best way to do the same.Any reference code would be of great helpmto build on.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Any updates pls?

Author

Commented:
Any update?
Not sure if you are still looking for sample code but below link has sample code you are looking for. You can same xml file into the table column directly. So if you can create a store proc which can accepts both image and xml file as input and then execute the store proc to save the content to the db.

http://www.dbtutorials.com/retrieve/saving-retrieving-image-cs/
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Author

Commented:
I think i confused you.I need to pass image as attachment along with the request xml to a rest service.I am not concerned about how the service commits the same to db.Any sample code for this would be a great help.
I don't have exact sample code that you are looking for but 1st link has sample code on how to send an attachment using a soap request to a service and 2nd link has information on sending an attachment using ws-attachment feature in wcf.

http://stackoverflow.com/questions/8574938/adding-an-attachment-to-soap-request

http://devproconnections.com/net-framework/attach-docs-soap-messages

Author

Commented:
My requirement is restricted to restful service in dot net.See if you can suggest something on those lines.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial