Hi I guess its not valid to use, but I would assume the last evaluated code is the response. So just do whatever you want as response in the end.
On Tue, Feb 17, 2015 at 12:24 PM, fabrizio.spataro <[email protected]> wrote: > Hello everyone. > > I am using camel 2.14.2-SNAPSHOT and i am trying to access object *response* > into my code: > > Can you help me? > > Spring DSL: > > <transform> > <javaScript> > var a = request; // OK > var b = request.body; // OK > var c = response; //FAIL > </javaScript> > </transform> > > Stacktrace: > Caused by: sun.org.mozilla.javascript.EcmaError: ReferenceError: "response" > is not defined. (<Unknown Source>#8) > at > sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3785) > at > sun.org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3763) > at > sun.org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3848) > at > sun.org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1781) > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Javascript-DSL-response-is-not-defined-tp5762839.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
