Hello Chris, yes, that will work very well. I was struggling with this issue, because of I thought we will have two different XSDs for one endpoint. So, I agree with your solution.
Thank you and kind regards, Marko Voß ePublishing & eScience Development & Applied Research Phone +49 7247 808-744 Fax +49 7247 808-133 marko.v...@fiz-karlsruhe.de FIZ Karlsruhe – Leibniz Institute for Information Infrastructure Hermann-von-Helmholtz-Platz 1 76344 Eggenstein-Leopoldshafen, Germany www.fiz-karlsruhe.de From: Chris Wilper [mailto:cwil...@duraspace.org] Sent: Wednesday, August 17, 2011 3:23 PM To: fedora-commons-developers@lists.sourceforge.net Subject: Re: [fcrepo-dev] FCREPO-951 Hi Marko, As Adam indicated, the move to CXF is not happening with the 3.5 release; it is still in progress. And while there is no current plan to move to using CXF as our JAX-RS implementation on the REST side, I think it is a distinct possibility. Fedora currently uses Jersey as our JAX-RS implementation. Regarding the suggested solution for FCREPO-951 (having the existing "listDatastreams" take a query parameter to indicate which level of detail to provide), I think you're pointing out that this may make it difficult to handle on the client side, if you are using the CXF's marshalling capabilities (translating the XML response to an instance of the ObjectDatastreamsTO class)? In your example code, you have two separate methods. But the suggestion that came up on the call is that we have one on the server, just with a different parameter depending on what level of detail you want. I believe if you were depending on CXF's auto-marshalling, this could still work. But you'd need to have *one* method on the client side. The thing that would need to change would be the ObjectDatastreamsTO class. Specifically, the CXF client classes would have to be able to marshal/demarshal to/from the following new XML schema: https://jira.duraspace.org/secure/attachment/11608/listDatastreams.xsd Is that not possible? Thanks, Chris On Wed, Aug 17, 2011 at 8:18 AM, Voß, Marko <marko.v...@fiz-karlsruhe.de> wrote: Hello, in eSciDoc we have implemented a JAX-RS conform client to communicate with Fedora. I’ve heard that you wanted to release a new Fedora version 3.5 this week using CXF for the REST interface. In our CXF client, we implemented the methods: @GET @Path("/objects/{pid}/datastreams") @Produces(MimeTypes.TEXT_XML) @Consumes(MimeTypes.TEXT_XML) ObjectDatastreamsTO listDatastreams(@NotNull @PathParam("") ListDatastreamsPathParam path, @NotNull @QueryParam("") ListDatastreamsQueryParam query); @GET @Path("/objects/{pid}/datastreams/infolist") @Produces(MimeTypes.TEXT_XML) @Consumes(MimeTypes.TEXT_XML) DatastreamProfilesTO listProfiles(@NotNull @PathParam("") ListDatastreamProfilesPathParam path, @NotNull @QueryParam("") ListDatastreamProfilesQueryParam query); As you can see, in JAX-RS it is not possible to decide, which type a method shall return depending on a query parameter. The types are generated from the XSDs datastreaminfolist.xsd (from Frank Asseg) and pidList.xsd. Basically, the server side definition of the REST service looks like this as well. I just wanted to show you, that without a new endpoint, there is no possibility to define a JAX-RS REST service, which decides, what type to return depending on a query parameter. Kind regards, Marko Voß ePublishing & eScience Development & Applied Research Phone +49 7247 808-744 Fax +49 7247 808-133 marko.v...@fiz-karlsruhe.de FIZ Karlsruhe – Leibniz Institute for Information Infrastructure Hermann-von-Helmholtz-Platz 1 76344 Eggenstein-Leopoldshafen, Germany www.fiz-karlsruhe.de Fehler! Es wurde kein Dateiname angegeben. ------------------------------------------------------- Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. Geschäftsführerin: Sabine Brünger-Weilandt. Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Fedora-commons-developers mailing list Fedora-commons-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers ------------------------------------------------------- Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. Geschäftsführerin: Sabine Brünger-Weilandt. Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Fedora-commons-developers mailing list Fedora-commons-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers