On 4 November 2012 17:47, Mark Wood-Patrick <[email protected]> wrote:
> Ok I have it working now, can I get a pointer to the test cases you use for
> RESTFUL objects so I can create some similar ones for Perl?
>
The best I can suggest is the various test cases in
the ...\framework\viewer\restfulobjects\restfulobjects-tck project, which
references the tck-dom (...\framework\tck\tck-dom). They aren't complete
by any means, however.
The idea of the TCK project ("technology compatibility kit") was to provide
a standard set of domain objects that have sufficient variety to exercise
any of the standard components of Isis - be that a viewer, such as
restfulobjects - or a persistor - such as JDO/DataNucleus.
This is work-in-progress rather than finished however. I suggest you useas
a starting point for your own tests, but feel free to adapt as you see fit.
Sorry not to be able to provide anything more definitive than that.
>
> If you have any suggestions for requests I should try or what kind of
> client
> side API you would like to see I can have a go at creating it
>
I hardly know Perl at all, so I'm not sure I can offer very much guidance.
I guess the main thing is that the API should be generic, in that it can
interact with any domain object model (rather than being specific to
claims, or TCK, or whatever). The restfulobjects-applib shows my
interpretation of doing this from a Java standpoint, but I don't know if
that's a help or a hindrance.
Dan
>
> Mark
>
> -----Original Message-----
> From: Dan Haywood [mailto:[email protected]]
> Sent: Sunday, November 04, 2012 7:27 AM
> To: [email protected]
> Subject: Re: Problems running the claims example
>
> It's a basic challenge ... you can see this if you browse to the site using
> chrome/jsonview, for example.
>
> The challenge comes about from the following code in the web.xml:
>
> <!-- authenticate user, set up an Isis session -->
> <filter>
> <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
>
>
> <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter
> -class>
> <!-- authentication required for REST -->
> <init-param>
> <param-name>authenticationSessionStrategy</param-name>
>
>
> <param-value>org.apache.isis.viewer.restfulobjects.viewer.authentication.Aut
> henticationSessionStrategyBasicAuth</param-value>
> </init-param>
> <init-param>
> <!-- what to do if no session was found; we indicate to issue a
> 401 basic authentication challenge -->
> <param-name>whenNoSession</param-name>
> <param-value>basicAuthChallenge</param-value>
> </init-param>
> </filter>
> <filter-mapping>
> <!-- this is mapped to the entire app; however the
> IsisSessionFilter
> will "notice" if the session filter has already been
> executed for the request pipeline, and if so will do nothing
> -->
> <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
> <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
> </filter-mapping>
>
>
> Looking at the code of IsisSessionFilter, it looks like the realm is called
> "Apache Isis".
>
> Or (it would seem that) you can disable security by setting the param-value
> for "whenNoSession" param from "basicAuthChallenge" to "continue".
>
> Cheers
> Dan
>
>
> On 4 November 2012 15:18, Mark Wood-Patrick <[email protected]>
> wrote:
>
> > I'm trying to connect to the quick-start app
> >
> > http://incubator.apache.org/isis/quick-start.html
> >
> > from perl but I'm getting a 401 Unauthorized error even though I
> > appear to be setting the correct credentials. What realm should I
> > specify when connecting does the app generate a log file of requests I
> > could not find it any suggestions.
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:[email protected]]
> > Sent: Friday, November 02, 2012 12:10 AM
> > To: [email protected]
> > Subject: Re: Problems running the claims example
> >
> > Hi Mark,
> >
> > On 30 October 2012 12:38, Mark Wood-Patrick <[email protected]>
> > wrote:
> >
> > > I was able to get the quickstart app working :-)
> > >
> > > Is there a planned release schedule or a TopN document somewhere
> > > that gives some idea what the next upcoming changes are?
> > >
> > > No planned release schedule at the moment, though I'm hoping we'll
> > > get our
> > top-level project up before Xmas along with our first non-incubating
> > release.
> >
> > What will be released is what's in trunk. You can also see which JIRA
> > tickets that includes by searching for those fixed in the
> > 0.3.1-incubating release.
> >
> >
> > Also any pointers to example client side code for the Restful objects
> > API
> > > (I'm especially interested in examples using perl)
> > >
> > > With respect to using client side code, the only stuff I can point
> > > you to
> > is the nascent RO applib, a similar nascent RO applib on .NET, and the
> > RO.Net Spiro client which is now in two modules, one being the model
> > (in Javascript / Typescript). That said, RO.Net is at v1.0, whereas
> > Isis is still at v0.56, so there are some incompatibilities right now.
> >
> > I don't think that any of that is particularly going to help you with
> Perl.
> > Best I can suggest is that you download jsonview and the REST Console
> > plugins into chrome or firefox, and explore the representations that
> > you get back, along with a printed copy of the spec by your side. You
> > can fish out
> > v0.56 of the spec if you want.
> >
> > If you do create some sort of Perl library, it would be great to see
> > it made open source in some way if possible (even if only on github).
> > I can see it would be great for those wanting to use RO for migrating
> > data to a new system, for example. (We did something similar on the
> > app we're currently building, but we had to write a little Java
> > program to do so).
> >
> > Cheers
> > Dan
> >
> >
> >
> > > On Tue, Oct 30, 2012 at 4:40 AM, Dan Haywood
> > > <[email protected]>wrote:
> > >
> > > > Hi Mark,
> > > > Thanks for bringing this to our attention. Yes, it ought to work,
> > > clearly
> > > > is not yet.
> > > >
> > > > We're in a bit of a transition with the codebase post-graduation,
> > > > so
> > > might
> > > > take a little while.
> > > >
> > > > That said, the quickstart app should be working ok, if you just
> > > > want to
> > > try
> > > > things out.
> > > >
> > > > Dan
> > > >
> > > > On 28 October 2012 15:15, Mark Wood-Patrick
> > > > <[email protected]>
> > > > wrote:
> > > >
> > > > > I'm having problems running the claims example is it supposed to
> run?
> > > > >
> > > > >
> > > > >
> > > > > Problems so far
> > > > >
> > > > >
> > > > >
> > > > > 1. Look like viewer-restfulobject should be
> > viewer-restfulobjects
> > > > >
> > > > > 2. Could not read configuration file from
> > > > > examples/claims/dom/log4j.properties
> > > > >
> > > > >
> > > > >
> > > > > Mark
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Mark Wood-Patrick
> > >
> >
> >
>
>