Hi Damian

Take a look at GetDissemination.methodParam(String key, String value)

 - I think that's what you'll need to add query parameters to the method.

Regards
Steve

> -----Original Message-----
> From: Damian Kaliszan [mailto:dam...@man.poznan.pl] 
> Sent: 24 May 2011 12:47
> To: fedora-commons-users@lists.sourceforge.net
> Subject: [fcrepo-user] MediaShelf Fedrora Client - 
> GetDissemination andpassing method params
> 
> 
> Hi All,
> 
> I'm facing the following problem.
> Using MediaShelf  fedora client i'm trying to invoke a method 
> (which can take params) called 'list' on given object. If no 
> params are given everything works well.
> 
> -------------------------------------------
> FedoraResponse response = new GetDissemination(.., ..., 
> "list").execute(fedora);
> ---------------------------------------------
> 
> If I add params:
> 
> FedoraResponse response = new GetDissemination(..,
>                         ..., 
> "list?param1=xxx:xxx&param2=xxx:yyy").execute(fedora);
> 
> --------------------------------------------------------------
> ---------
> 
>  I get the exception
> 
> Caused      by:      org.fcrepo.server.errors.MethodNotFoundException:
> [getParms]  The  service  deployment object, xxx:objImpl, does
> not         have         a         service         method        named
> 'list%5C%3Fparam1=xxx:xxx&param2=xxx:yyy
>         at 
> org.fcrepo.server.storage.SimpleServiceDeploymentReader.getPar
> ms(SimpleServiceDeploymentReader.java:122)
>         at 
> org.fcrepo.server.storage.SimpleServiceDeploymentReader.getSer
> viceMethodParms(SimpleServiceDeploymentReader.java:86)
> 
>  ......
> 
> I looked inside getDissemination class:
> 
> public FedoraResponse execute(FedoraClient fedora) throws 
> FedoraClientException {
>         WebResource wr = fedora.resource();
>         String path = 
> String.format("objects/%s/methods/%s/%s", pid, sdefPid, method);
> 
>         ClientResponse cr = 
> wr.path(path).queryParams(getQueryParams()).get(ClientResponse.class);
>         return new FedoraResponseImpl(cr);
>     }
> 
> 
> 
> Is there any way to make a method working with params?
> 
> Best regards,
> Damian
> 
> 
> --------------------------------------------------------------
> ----------------
> vRanger cuts backup time in half-while increasing security. 
> With the market-leading solution for virtual backup and recovery, 
> you get blazing-fast, flexible, and affordable data 
> protection. Download your free trial now. 
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Fedora-commons-users mailing list 
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> 


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to