On 9/8/06, Mikko Valjento <[EMAIL PROTECTED]> wrote:
That looks like a bug., the code that implements XMLHTTPRequest is really just a wrapper around the Laszlo data API.
The method that is throwing that error is in lps/rpc/ajax.lzx
I'm not sure whether that is just some code rot, or what, you can probably work around it by redefining that line in
the method. I'm working on stuff in another branch now, but I will take a look at this when I get a chance
<method name="onerrorHandler">
<![CDATA[
// Currently raw text response is only available for serverless requests
this.responseText = "";
this.responseXML = null;
// If the load was proxied, we can actually dig in the headers and get the
// real response.
if (this.dataset.parent.isProxied() && this.dataset.errorstring != null) {
//data source error for http://localhost:8080/lps-dev/test/ajax/echo.jsps: HTTP Status code: 404:Not Found
var err = req.dataset.errorstring;
var marker = 'HTTP Status code: ';
var ind = err.indexOf(marker);
if (ind >= 0) {
var code = err.substring(ind+(marker.length), ind+(marker.length)+3);
this.status = Number(code);
this.statusText = err.substring(ind+4+(marker.length));
}
} else {
// serverless mode gives us basically no info on what happened, so fake it
this.status = 500; //
this.statusText = "Error";
}
this.setAttribute('readyState', 4); // 'receiving' (well, received...)
if (this.onreadystatechange != null) {
this.onreadystatechange(this);
}
]]>
</method>
Henry,
Thank you for the detailed answer. I figured that it must be the Flash
sendAndLoad that limits the SOLO application in this respect.
I finally got around to testing my web service on IIS. I'm having some
trouble sending SOAP messages to the service with my SOLO application, and
I'm not sure what the source of the problem is. Calls to simple ASP files
work fine, as does loading a static XML file. But calls to the web service
fail. I suspect it could be because of the stuff Laszlo adds to the POST
request.
The request for the WSDL at http://localhost/TestClass.asmx?wsdl failed as
well, because Laszlo added some parameter to the url, but I got around that
by creating a virtual directory which redirects the call and loses the
parameter. That worked well with GET method, and I receive the wsdl xml
without problems.
The SoapAction header should not be the problem, as I've configured the web
service to use the first element inside the body tag as the method name.
The SOAP request I've used to test the service:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Test xmlns="http://tempuri.org/" />
</soap:Body>
</soap:Envelope>
The code I use to send this request:
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", "http://localhost/TestClass.asmx", true);
xmlHttp. {
if(xmlHttp.readyState == 4)
Debug.write("Response received.");
}
xmlHttp.send(soapRequest); // this sends the XML
This is the error I get:
WARNING: rpc/ajax.lzx:209: call to undefined method 'isProxied'
WARNING: LzLoadQueue.serverlessOnDataHandler load failed from URL
'http://localhost/webservices/TestClass/TestClass.asmx': no data received
Failure to load data in serverless apps may be caused by Flash player
security policies. Check your data server crossdomain.xml file
WARNING: rpc/ajax.lzx:169: call to undefined method 'isProxied'
Any help is greatly appreciated!
Regards,
Mikko
That looks like a bug., the code that implements XMLHTTPRequest is really just a wrapper around the Laszlo data API.
The method that is throwing that error is in lps/rpc/ajax.lzx
I'm not sure whether that is just some code rot, or what, you can probably work around it by redefining that line in
the method. I'm working on stuff in another branch now, but I will take a look at this when I get a chance
<method name="onerrorHandler">
<![CDATA[
// Currently raw text response is only available for serverless requests
this.responseText = "";
this.responseXML = null;
// If the load was proxied, we can actually dig in the headers and get the
// real response.
if (this.dataset.parent.isProxied() && this.dataset.errorstring != null) {
//data source error for http://localhost:8080/lps-dev/test/ajax/echo.jsps: HTTP Status code: 404:Not Found
var err = req.dataset.errorstring;
var marker = 'HTTP Status code: ';
var ind = err.indexOf(marker);
if (ind >= 0) {
var code = err.substring(ind+(marker.length), ind+(marker.length)+3);
this.status = Number(code);
this.statusText = err.substring(ind+4+(marker.length));
}
} else {
// serverless mode gives us basically no info on what happened, so fake it
this.status = 500; //
this.statusText = "Error";
}
this.setAttribute('readyState', 4); // 'receiving' (well, received...)
if (this.onreadystatechange != null) {
this.onreadystatechange(this);
}
]]>
</method>
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
