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.onreadystatechange = function() {
        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



-----Alkuperäinen viesti-----
Lähettäjä: Henry Minsky [mailto:[EMAIL PROTECTED]
Lähetetty: 28. elokuuta 2006 16:32
Vastaanottaja: Mikko Valjento
Kopio: [email protected]
Aihe: Re: [Laszlo-user] Connecting SOLO to a web service


The Laszlo HTTP loader machinery for Flash runtimes is built on top of the
sendAndLoad API that Flash provides, and it is lacking a number of HTTP
options. Looking to the future, the DHTML runtime uses XMLHTTPRequest, and
so provides  somewhat better HTTP controls, and the Flash 9 runtime looks a
lot better in terms of support for HTTP network
operations which are closer to what you get from the java.net API.

 It is actually possible to send raw POST data I believe, if you use the XML
object in Flash instead of the LoadVars which is used by the system
currently, but it would be somewhat difficult to work into the existing
loader machinery. The major complication in the loader system is due to the
fact that we have to implement our own loader queue because Flash silently
drops requests that are made when the browser's maximum number of network
connections are opened. So for example if your app happens to be loading an
image or other data resource, your code cannot just make a request safely.
Internet Explorer has a maximum of 2 open connections available to each web
page.

Anyway, I could suggest some workarounds if you really want to pursue this,
otherwise I suggest writing a little
server side proxy that your app communicates with, that can handle all the
SOAP HTTP protocol issues, and return
just the XML that you want.



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to