Hi Dan,
I got a related question about parameter passing when invoking ISIS Rest
API.
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 a parameter to the REST service when
invoking via a REST client?
Regards,
Hiruni
On Thu, Apr 2, 2015 at 5:21 PM, Dan Haywood <[email protected]>
wrote:
> Hi Michael,
>
> The Apache mailing lists don't accept documents, as you've discovered.
>
> Although you can mail me directly if you want [1], I'd rather you simply
> paste your questions here... that way your questions and hopefully some
> answers will be available to others in the community to discover/learn
> from.
>
> ~~~
> Meanwhile, for some additional ideas on how to use the RO API, take a look
> at our (incomplete) TCK tests [2].
>
> I'm also aware of this bespoke Angular app [3] that's being written as a
> front-end to this Isis back-end [4]; might give you some ideas.
>
> Another option, if the full RO representations are a built overwhelming, is
> either to configure Isis to provide a simplified representation [5] or you
> could even use custom representations [6].
>
> HTH
> Dan
>
>
>
>
> [1] https://github.com/apache/isis/blob/master/core/pom.xml#L201
> [2]
>
> https://github.com/apache/isis/tree/master/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck
> [3] https://github.com/edge-art/matchingfront
> [4] https://github.com/johandoornenbal/matching
> [5]
>
> http://isis.apache.org/components/viewers/restfulobjects/simplified-object-representation.html
> [6]
>
> http://isis.apache.org/components/viewers/restfulobjects/custom-representations.html
>
>
>
>
> On 2 April 2015 at 12:15, Michael Kyrilov <[email protected]> wrote:
>
> > Hi Dan,
> >
> > I had looked at the Restful Objects document, unfortunately I am still
> > unsure of how to work with he API.
> >
> > I have prepared a short PDF highlighting what exactly my struggles are.
> > Unfortunately I don’t seem to be able to send it to you. Every time I
> try,
> > I get a failed notice from [email protected] <mailto:
> > [email protected]>
> > Is there any other way I say send you this document?
> >
> > Regards,
> > Michael
> >
> > > On 02 Apr 2015, at 9:46 AM, Dan Haywood <[email protected]>
> > wrote:
> > >
> > > Hi Michael,
> > > Have you taken a look at the Restful Objects spec? That should give
> you a
> > > good background so you can start to understand what Isis Rest API is
> > > surfacing for you.
> > >
> > > Cheers, Dan
> > >
> > > http://restfulobjects.org
> > > On 2 Apr 2015 08:35, "Michael Kyrilov" <[email protected]> wrote:
> > >
> > >> Hi there,
> > >>
> > >> My name is Michael. I have recently been tasked to develop a User
> > >> Interface on top of an Apache Isis application.
> > >> Isis was originally chosen due to time constrains for the project,
> this
> > >> way the team was able to get a functional UI but remain heavily
> focused
> > on
> > >> implementing the business logic.
> > >>
> > >> Our understanding is that Isis provides a REST API for interacting
> with
> > >> the domain model, which sounds ideal for building a User Interface.
> > >> I have managed to locate an API: http://host:port/restful/
> > >>
> > >> I am having difficulties understanding how to interact with this API.
> > >> I do see that /services the models we have defined and /domain-types
> > does
> > >> much the same.
> > >> We do have data in the database and the difficulty I am having is
> that I
> > >> am unable to get data out of this API and I also don’t see how I can
> > POST
> > >> data via the API so that it would be saved in the database.
> > >>
> > >>
> > >> I am not sure if I am misunderstanding how this works or if I am
> trying
> > to
> > >> use it inappropriately.
> > >>
> > >>
> > >> Thank you
> > >> Regards,
> > >> Michael
> > >>
> > >> Michael Kyrilov
> > >> Mid-Level Developer
> > >>
> > >>
> > >> [http://static.ecntelecoms.za.net/images/ecn-logo.png]
> > >>
> > >> Unit 10 Growthpoint Business Park
> > >> 2 Tonnetti Street, Midrand, 1685
> > >> Office: +27 10 590 0035
> > >> Cell: +27 72 634 9687
> > >>
> > >> [email protected]
> > >> www.ecn.co.za<http://www.ecn.co.za/>
> > >>
> > >>
> > >> This email is sent subject to the terms and conditions detailed in the
> > >> ECN Email Disclaimer<
> > >>
> > http://www.nashuacommunications.com/disclaimer-and-confidentiality-note/
> >
> > >>
> > >> Disclaimer
> > >>
> > >> The information contained in this communication from the sender is
> > >> confidential. It is intended solely for use by the recipient and
> others
> > >> authorized to receive it.
> > >> If you are not the recipient, you are hereby notified that any
> > disclosure,
> > >> copying, distribution or taking action in relation of the contents of
> > this
> > >> information is strictly prohibited and may be unlawful.
> > >>
> > >> This email has been scanned for viruses and malware.
> >
> > Disclaimer
> >
> > The information contained in this communication from the sender is
> > confidential. It is intended solely for use by the recipient and others
> > authorized to receive it.
> > If you are not the recipient, you are hereby notified that any
> disclosure,
> > copying, distribution or taking action in relation of the contents of
> this
> > information is strictly prohibited and may be unlawful.
> >
> > This email has been scanned for viruses and malware.
> >
>
--
Hiru