It is working on Pocket PCs, very simple...!
As I posted some weeks ago I am using DHTML and Javascript to display values I get from a webservice on my html page. The new thing is that I can do this with the Pocket PC device without changing the code. Thanks Microsoft for the nice ActiveXObject "Microsoft.XMLHTTP" that is installed on Windows clients (I think it will be installed with IE4 or IE5) and on Pocket PCs.
XmlHttp.open("POST", "http://localhost/mymethod.asmx", true);
XmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
XmlHttp.setRequestHeader("SOAPAction", "http://my-comany.com/RequestX");
XmlHttp.onreadystatechange =
new Function("try{if(XmlHttp.readystate==4){
ParseResponse(XmlHttp.responseXML);}
}catch(e){}");
XmlHttp.send(SoapEnvelope);
Download the complete script form http://www.schwarz-interactive.de/webservice.txt.
You will find a running version on http://test.schwarz-interactive.de/pocketpc.htm. Sorry, it is a german sample. The sample is showing the servers date and time. In the second line you will see the numbers of calls already done, you can see how fast it is working!!!!
1 Comment
Comments have been disabled for this content.
Neil Moss said
Thank you SO MUCH for showing that an XMLHTTP onreadystatechange event handler can be a dynamically defined function.
This has let me convert a serious of synchronous calls into asynchronous operation. The event handler runs on the lines of
XmlHttp.onreadystatechange = new Function("handleReadyStateChange(" + intCallIndex + ")");
where intCallIndex is an index into an array of async XMLHTTP objects.
Clever, clever, clever.