Jump to content

POSTing a file with metadata to a RESTful Web Service


proggR

Recommended Posts

I'm building a RESTful web service that is essentially just an intermediary between a client and a mainframe. I have all of the GET requests working but the crux of the service is going to be the ability to POST a file to the service to be handled. I'm writing it in Java but an answer in any language would be helpful.

 

I need the web service to be able to accept a POST request to the address localhost/project/{userid}/ which will contain a file and meta data about that file.

The easiest way to do that would be able to construct an XML schema and have the file attached to the XML as some kind of MIME attachment. The issues with that are:

1 - its not common to send XML to a restful service

2 - I'm not sure what the web service should be expecting for a parameter type if the message body is XML with an attachment

3 - I don't know how to attach/unattach a MIME attachment to XML to test the service

 

I'm fairly new to RESTful web services and I'll admit my XML abilities are a tad weak as well. Any help would be greatly appreciated.

Thanks in advance.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.