proggR Posted March 3, 2011 Share Posted March 3, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/229503-posting-a-file-with-metadata-to-a-restful-web-service/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.