Hi Everyone,

I tried different ways of calling the REST end point passing arguments with
curl.

eg : curl -X POST -u sven:pass -d "param=hello"
http://localhost:8080/restful/services/EchoService/actions/echoParam/invoke
<http://localhost:8080/restful/services/EchoService/actions/echoParam/invoke?param=hello>

But I still get the same error response
: {"param":{"value":"hello"},"x-ro-invalidReason":"Argument 'param' found
but no such parameter"}

Although the error response states there is no such parameter, in my
Service method I have defined the parameter as properly.

I might be overlooking some basics here.
But can someone please give me a hint what I may have done wrong?

Or is this an inherent issue with argument passing in Apache Isis Rest API?
Any help is much appreciated.

Regards,
Hiruni




On Thu, Apr 9, 2015 at 3:23 PM, Hiruni Madola <[email protected]>
wrote:

> Hi All,
>
> I have a question about passing arguments when invoking a REST endpoint in
> Apache Isis.
>
> In my sample service I have a method to echo the parameter I pass to it.
>
> public String echoParam(String param)
> {
> return "echo "+param ;
> }
>
> I invoke this using curl as  :
> curl -X POST -u sven:pass
> http://localhost:8080/restful/services/EchoService/actions/echoParam/invoke?param=hello
>
> I cannot get the desire result and I get below as the response;
>
> {"param":{"value":"hello"},"x-ro-invalidReason":"Argument 'param' found
> but no such parameter"}
>
> Can you please advice on how to pass an argument to the REST service
> endpoint when invoking via a REST client?
>
> Regards,
> Hiruni
>
>


-- 
Hiru

Reply via email to