Re: [Neo4j] Neo4j REST API and JAXB

2011-01-04 Thread Peter Neubauer
Cool, will rebase my fork and check it out as soon as I am not officially on parental leave anymore ;) Cheers, /peter neubauer GTalk:      neubauer.peter Skype       peter.neubauer Phone       +46 704 106975 LinkedIn   http://www.linkedin.com/in/neubauer Twitter      http://twitter.com/peterneub

Re: [Neo4j] Neo4j REST API and JAXB

2011-01-02 Thread Christopher Schmidt
I see ... You can use val anyRef = "/index/node".GET[AnyRef] in this case anyRef.toString returns: {index2={template= http://localhost:7474/db/data/index/node/index2/{key}/{value}, provider=lucene, type=fulltext}, my_nodes={template= http://localhost:7474/db/data/index/node/my_nodes/{key}/{valu

Re: [Neo4j] Neo4j REST API and JAXB

2011-01-01 Thread Peter Neubauer
Yeah, that sounds good. However, in the Index listing case, there is no top-level key to pass into the class, sine alrady the root-level index names are unpredictable. Is that possible to cover, too? In the extensions case, there is at least the "extensions" handle to pass in, even if we don't know

Re: [Neo4j] Neo4j REST API and JAXB

2011-01-01 Thread Christopher Schmidt
Same as GET http://localhost:7474/db/data/ where I can not predict the extensions parameter. I used the simple data binding (see here). Means that the parameter is of type Any case class GetRoot( . . . @BeanProperty var extensions:Any) { . . . } Jac

Re: [Neo4j] Neo4j REST API and JAXB

2011-01-01 Thread Peter Neubauer
Christopher, my problem is with the names of the index representations being able to contain whatever, so the Scala case class can't assume a parameter name. look at the result of an index creation and listing: curl -X POST -H Accept:application/json -HContent-Type:application/jon -d '{"name":"in

Re: [Neo4j] Neo4j REST API and JAXB

2011-01-01 Thread Christopher Schmidt
Happy new year Peter, I did that already in my repo and added as well an example to use polymorphic "*node classes"* (using Scala's case classes, see here ). Christopher On Sat, Jan 1, 201

Re: [Neo4j] Neo4j REST API and JAXB

2011-01-01 Thread Peter Neubauer
Christopher, Happy New Year! I tried to fork and adapt the code to reflect the updated REST API, but the variable index listing under /db/data/index/node is too hard for my Scala skillz ... Feel free to pull, diff and correct :) /Peter On Wednesday, December 29, 2010, Christopher Schmidt wrote:

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-31 Thread Jim Webber
Hi Christoper, I'll look into this when I get back to the UK. Sounds like we should run some compliance tests against the JSON we produce. There seem to be a few out there that we could use. In the meantime, thanks very much for the feedback! Jim On 30 Dec 2010, at 20:36, Christopher Schmidt

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-30 Thread Christopher Schmidt
Hi Jim, all I can say is, that I was not able to unmarshal the anonymous array containing a anonymous object returned from a POST to traverse/path. All I got was a ArrayOutOfBounds exception (I used the maven jersey-json dependency). Maybe just an issue with the combination of Jersey and JAXB. Nor

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-30 Thread Jim Webber
Hi Christoper, Peter, I wonder if this is some horrid coupling creeping in since AFAIK we also use Jackson for JSON production. Perhaps its own eccentricities are escaping our service boundary. Anyone know if Jackson is/isn't very compliant? Jim On 29 Dec 2010, at 23:41, Peter Neubauer wrote:

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-29 Thread Peter Neubauer
Very cool Christopher, Tis looks like a perfect way to test the server. As we are considering using more scale in at least our testing, we really should look into this for easing web testing to start with! I guess Andres and Andreas will be all over this after New Year :) /Peter On Wednesday, Dec

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-29 Thread Christopher Schmidt
I am answering my own thread here, just in case someone is interested... I solved my unmarshaling issue with Neo4j REST, JAXB and Jersey with using the Jackson JSON processor (http://jackson.codehaus.org/) instead of Jersey JSON. This makes it easy to write a POPO representation of Neo4j's REST *

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-09 Thread Anders Nawroth
Hi! On 12/09/2010 09:18 AM, Christopher Schmidt wrote: > I had to change port and base URI. Is this > http://components.neo4j.org/neo4j-rest is still valid? The documentation for the server is found here: http://components.neo4j.org/neo4j-server/0.1-1.2.M05/ and in the manual: http://docs.neo4j.o

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-09 Thread Jim Webber
Hey Christopher, > Thx Jim, I updated to V1.2.M05 Ah, cool. I hoped that would work :-) > I had to change port and base URI. Is this > http://components.neo4j.org/neo4j-rest is still valid? It's valid, but no further work will be done on it. I'd like to retire the component but before doing th

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-09 Thread Christopher Schmidt
Thx Jim, I updated to V1.2.M05 I had to change port and base URI. Is this http://components.neo4j.org/neo4j-rest is still valid? Christopher PS: Bought your REST book yesterday ;-) Nice to have you here. On Thu, Dec 9, 2010 at 5:21 AM, Jim Webber wrote: > Hi Christopher, > > Although I can't

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-08 Thread Jim Webber
Hi Christopher, Although I can't immediately give you a solution to your JAXB question, I can give you another minor problem :-) The REST api is now merged with the Neo4j server and all current and future work is happening on the server component. It shouldn't involve any code changes for you,

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-08 Thread Christopher Schmidt
Hi Ivan, there is only one JAXB object here: https://github.com/ept/neo4j-scala-template/blob/master/src/main/scala/com/example/models/Moo.scala But thanks anyway :-) BTW: For this Rest GET "index" call: rest { implicit s => val index = "/index".GET[GetIndex] } the followi

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-08 Thread Christopher Schmidt
I have a little spare time ;-) and I try to create a/another "very smart" REST client DSL in Scala. For testing and test data I am using the Neo4j Server from here: http://blog.neo4j.org/2010/04/neo4j-rest-server-part1-get-it-going.html Client library is Jersey, JSON marshaling and unmarshaling l

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-08 Thread ivan Brusic
I have not tried it, but the scala-template project uses JAXB: https://github.com/ept/neo4j-scala-template The project contains a few working examples of Scala + JAXB. Perhaps it will provide some further insights. -- Ivan On Wed, Dec 8, 2010 at 9:52 AM, Christopher Schmidt wrote: > Hi all,

Re: [Neo4j] Neo4j REST API and JAXB

2010-12-08 Thread Peter Neubauer
Christopher, are you trying to build your own server, or are you using Neo4j Server? The REST API is now part of the server component, we are right now defining a mechanism to mount your own server extensions without breaking the REST hypermedia of the existing API. What are you trying to do? Ch

[Neo4j] Neo4j REST API and JAXB

2010-12-08 Thread Christopher Schmidt
Hi all, is anyone using the REST interface and JAXB? I have some problems with the traversal response of POST call to "/node/3/traverse/path" which returns: [ { "start" : "http://localhost:/node/3";, "nodes" : [ "http://localhost:/node/3";, "http://localhost:/node/1"; ], "length