* About to connect() to 127.0.0.1 port 60530 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 60530 (#0) > POST //cgi-bin/WebObjects/BlogRest.woa/ra/blgEntries.json HTTP/1.1 > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3 > Host: 127.0.0.1:60530 > Accept: */* > Content-Length: 138 > Content-Type: application/x-www-form-urlencoded > * HTTP 1.0, assume close after body < HTTP/1.0 400 Apple WebObjects < x-webobjects-loadaverage: 0 < content-type: application/json < content-length: 53 < A <b>Blg Entry</b> must have a <b>To Blg Author</b>. * Closing connection #0
I'm new using ERRest and maybe i forgot to configure something.
Any help would be appreciated.
cdvalverdeg, 2013/07/05 13:23
I found the problem, "author" is not the name of the relationship in my blog model
larean, 2015/08/17 08:04
Hi, I am trying to run this example and I get an error message. In particular, I cannot use curl. I added the records manually and when I try to display them I get this on the console:
Request start for URI /cgi-bin/WebObjects/BlogTutorial.woa/ra/blogEntries.json Headers{accept =("*/*"); host =("127.0.0.1:45743"); user-agent =("curl/7.38.0");}[2015-8-1417:20:19 CEST]<WorkerThread14><er.rest.routes.ERXRouteRequestHandler>:Exceptionwhile handling action named "index" on action class"your.app.rest.controllers.BlogEntryController":com.webobjects.foundation.NSForwardException[java.lang.reflect.InvocationTargetException]null:java.lang.reflect.InvocationTargetException _ignoredPackages::("com.webobjects","java.applet","java.awt","java.awt.datatransfer","java.awt.event","java.awt.image","java.beans","java.io","java.lang","java.lang.reflect","java.math","java.net","java.rmi","java.rmi.dgc","java.rmi.registry","java.rmi.server","java.security","java.security.acl","java.security.interfaces","java.sql","java.text","java.util","java.util.zip")Headers{cache-control =("private","no-cache","no-store","must-revalidate","max-age=0"); expires =("Fri, 14-Aug-2015 15:20:19 GMT"); content-type =("text/html"); content-length =("9296"); pragma =("no-cache"); x-webobjects-loadaverage =("1"); date =("Fri, 14-Aug-2015 15:20:19 GMT"); set-cookie =();}
franc, 2012/05/23 17:14
In "Creating the EOModel"
"You are now ready to save the model. Save it (File -> Save) ???? ( where is this ?) and close the Entity Modeler window. If you open the Sources in the main Eclipse window, you will notice that the Sources folder contains a package named your.app.model."
Using a new Golipse install, should this automatic sources creation just work after saving the Model or is there something to configure before ? (Automatically run EOGenerator in WOLips is checked)
When i executed this:
curl -X POST -v -d '{ "title": "First post", "content": "Some text", "author": { "firstName": "Pascal", "lastName": "Robert", "email": "probert@macti.ca" } }' http://127.0.0.1:60530//cgi-bin/WebObjects/BlogRest.woa/ra/blgEntries.json
And i get this message in terminal:
* About to connect() to 127.0.0.1 port 60530 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 60530 (#0)
> POST //cgi-bin/WebObjects/BlogRest.woa/ra/blgEntries.json HTTP/1.1
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3
> Host: 127.0.0.1:60530
> Accept: */*
> Content-Length: 138
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Apple WebObjects
< x-webobjects-loadaverage: 0
< content-type: application/json
< content-length: 53
<
A <b>Blg Entry</b> must have a <b>To Blg Author</b>.
* Closing connection #0
I'm new using ERRest and maybe i forgot to configure something.
Any help would be appreciated.
I found the problem, "author" is not the name of the relationship in my blog model
Hi, I am trying to run this example and I get an error message. In particular, I cannot use curl. I added the records manually and when I try to display them I get this on the console:
Request start for URI /cgi-bin/WebObjects/BlogTutorial.woa/ra/blogEntries.json Headers{accept = ("*/*"); host = ("127.0.0.1:45743"); user-agent = ("curl/7.38.0"); } [2015-8-14 17:20:19 CEST] <WorkerThread14> <er.rest.routes.ERXRouteRequestHandler>: Exception while handling action named "index" on action class "your.app.rest.controllers.BlogEntryController" :com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException _ignoredPackages:: ("com.webobjects", "java.applet", "java.awt", "java.awt.datatransfer", "java.awt.event", "java.awt.image", "java.beans", "java.io", "java.lang", "java.lang.reflect", "java.math", "java.net", "java.rmi", "java.rmi.dgc", "java.rmi.registry", "java.rmi.server", "java.security", "java.security.acl", "java.security.interfaces", "java.sql", "java.text", "java.util", "java.util.zip") Headers{cache-control = ("private", "no-cache", "no-store", "must-revalidate", "max-age=0"); expires = ("Fri, 14-Aug-2015 15:20:19 GMT"); content-type = ("text/html"); content-length = ("9296"); pragma = ("no-cache"); x-webobjects-loadaverage = ("1"); date = ("Fri, 14-Aug-2015 15:20:19 GMT"); set-cookie = (); }
In "Creating the EOModel"
"You are now ready to save the model. Save it (File -> Save) ???? ( where is this ?) and close the Entity Modeler window. If you open the Sources in the main Eclipse window, you will notice that the Sources folder contains a package named your.app.model."
Using a new Golipse install, should this automatic sources creation just work after saving the Model or is there something to configure before ? (Automatically run EOGenerator in WOLips is checked)