I'm calling ScriptCompiler.compileToByteArray on this string, and getting a
compiler error, Exception stack: org.openlaszlo.sc.parser.ParseException:
Syntax error: the token ":" was not expected at this position at line 1,
column 14.
29 Apr 2007 21:49:49 (127.0.0.1 4) ERROR responders.Responder - Responding
with error SWF: Syntax error: the token ":" was not expected at this
position at line 1, column 14. : Exception stack:
org.openlaszlo.sc.parser.ParseException: Syntax error: the token ":" was not
expected at this position at line 1, column 14.
at org.openlaszlo.sc.parser.Parser.generateParseException(Parser.java
:8045)
at org.openlaszlo.sc.parser.Parser.Sc(Parser.java:2597)
at org.openlaszlo.sc.parser.Parser.ExpressionStatement(Parser.java:2580)
at org.openlaszlo.sc.parser.Parser.ToplevelStatement(Parser.java:2147)
at org.openlaszlo.sc.parser.Parser.Directive(Parser.java:4140)
at org.openlaszlo.sc.parser.Parser.DirectiveBlock(Parser.java:4248)
at org.openlaszlo.sc.parser.Parser.Directive(Parser.java:4093)
at org.openlaszlo.sc.parser.Parser.Program(Parser.java:4051)
at org.openlaszlo.sc.Compiler$Parser.parse0(Compiler.java:455)
at org.openlaszlo.sc.Compiler$Parser.parse(Compiler.java:471)
at org.openlaszlo.sc.Compiler.compile(Compiler.java:330)
at org.openlaszlo.sc.ScriptCompiler._compileToByteArray(
ScriptCompiler.java:109)
at org.openlaszlo.sc.ScriptCompiler.compileToByteArray(
ScriptCompiler.java:194)
at org.openlaszlo.data.swf.SOAPDataSource$SOAPData.<init>(
SOAPDataSource.java:591)
The string I am tryingto compile is an expression that builds a nested hash
table, shown below
{__LZstubload: true,stubinfo: {service:"ITempConverterservice", port:
"ITempConverterPort",wsdl: "
http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ITempConverter",__LZctypes:
{"int": {ns: "http://www.w3.org/2001/XMLSchema",type: "simple",typeQ:
null,members: null,base: null}}, __LZnamespace: "
http://www.borland.com/soapServices/"},stub: {FtoC: function () {var args =
arguments.callee.args;
return LzSOAPService.invoke(arguments[1],arguments[0],
args.superclass.requestheaders,{parts: [["temp",new QName("int","
http://www.w3.org/2001/XMLSchema")]],opstyle: "rpc",operation: "FtoC",port:
"ITempConverterPort",service: "ITempConverterservice",wsdl: "
http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ITempConverter"},
args.superclass.secure,args.superclass.secureport);},CtoF: function () {var
args = arguments.callee.args;
return LzSOAPService.invoke(arguments[1],arguments[0],
args.superclass.requestheaders,{parts: [["temp",new QName("int","
http://www.w3.org/2001/XMLSchema")]],opstyle: "rpc",operation: "CtoF",port:
"ITempConverterPort",service: "ITempConverterservice",wsdl: "
http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ITempConverter"},
args.superclass.secure,args.superclass.secureport);}}}
If I wrap parens around the expression above, the compiler seems to compile
it, but doesn't seem happy with the result. If I paste this expression above
into the swf laszo debugger, it doesn't return an object, just silently
fails..
Any idea what it might not be liking here?
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]