Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] How to POST multiple OSLC resources to a service provider?

Hi Jean-Luc - OSLC Core considered this a while back and there was no consensus.  Issues such as what status code, Location headers and resources you return when some creates succeed and others fail were part of the discussion.  Multiple POSTs did not seem to be a showstopper for current consumers.  I don't think OSLC Core has revisited this.   See the thread titled "Creating multiple resources in one POST" here:    http://open-services.net/pipermail/oslc-core_open-services.net/2011-October/thread.html

Having said that, I think it might be possible to create JAX-RS POST methods which accept an array (or collection) of OSLC resources and create them.   I've never tested anything like this in OSLC4J, but there is a slim (!) chance it might work today.  However, the OSLC4J JAX-RS providers would likely have to be updated to support this (even if experimentally).   I suggest opening an enhancement request here:  https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Lyo if you want to pursue this.

Regards,
Mike


On Mon, Aug 19, 2013 at 5:44 AM, Johnson, Jean-Luc <Jean-Luc.Johnson@xxxxxxxx> wrote:
Hi All,

The OSLC4J library provides a service to request all the resources from
the a service providers (i.e. getStockQuotes). Regarding the service
POST, is it possible in the same way to post multiple resources (in
rdf/xml representation) to a service provider? So far, I iterate over a
collection of resource to post single resource using the
'addOslcResource' method. But I can't see how I could have a list of
resource all on the same level.

At the REST client side, the OSLCRestClient class comes with the methods
getOslcResource, getOslcResources, addOslcResource.... Maybe a method
addOslcResources should be added to the class OSLCRestClient.

Best regards,

Jean-Luc

_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/lyo-dev


Back to the top