Webservice & receiving files

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

Webservice & receiving files

Postby martinh » Wed Dec 09, 2009 10:26 am

Hi,

We've seen during Servoy World the technology for using webservices in Servoy 5.0

This webservice is called using an URL with the PK as last item and an additional XML-document is automatically loaded into the webservice and you can process it. So far so good.

But what if the user also needs to upload a file into the webservice. Is that also possible and if it is, how should you do that?
In some way this webservice should have the same possibilities as the HTTP-Plugin but reversed.
The HTTP-Plugin is used to send requests to webservices and the new Servoy webservices is the receiving part. Or is that one step too far way and you can't make this statement?

Martin
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Webservice & receiving files

Postby rgansevles » Fri Dec 18, 2009 10:59 am

Martin,

The concept of RESTfull webservices is that resources are accessed via http requests.
PUT /employees/123 will update the employee resource with key 123.
In the servoy plugin this is implemented by calling the ws_update method with the key and the employee object.

Is the file you want to upload a resource with a key or do you want to use the plugin as a rpc-style method that just does something with the contents?
The plugin is not designed for rpc-style processing.

Currently, the plugin only supports 2 content types, json and xml.
Other types, like images, documents, etc are not supported.
The plugin is open-source (the java code is in the jar), so you can extend it with your needs or you can file a feature request.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 6 guests