From: Jaap de w. <ht...@de...> - 2006-10-01 13:42:40
|
Hello, I want to use the xsl method to get info from a web service. However, a webservice is using a namespaces, and it looks like this is not handled by the xsl element. See the code below for an example of what I want. Also I am looking for a decription on how to use the xml post callback function (logonCallback in the example below) Any suggestions? BTW Mattias, hows the schedule for the next release? Jaap What I want to do is something like: ---- start code ---- <?xml version="1.0" encoding="utf-8"?> <html xmlns:htmli="http://www.htmli.com/ns/ui" xmlns:forms="http://www.htmli.com/ns/forms" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://namespace/" > <head> <title>LoginTest</title> <script type="text/javascript" defer="defer"> function logonCallback() { // validate result } function DoLogon() { var login_xml = application.getElementById('xmlLogin'); login_xml.setUrl('./service.asmx'); login_xml.post(logonCallback); } function init() { application.getElementById('xslLogin').refresh(); } </script> </head> <body style="font-family: Palatino Linotype, Arial; font-size: 10pt;" onload="init()" onresize="resize()"> <htmli:xml id="xmlLogin"> <![CDATA[ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Login xmlns="http://namespace/"> <Name>string</Name> <Password>string</Password> </Login> </soap:Body> </soap:Envelope> ]]> </htmli:xml> <htmli:xsl id="xslLogin" src="xmlLogin"> <div> <table cellspacing="4" cellpadding="0" class="simple_form" id="formEmployee"> <tr> <td valign="top"> <label id="labelLogin_Name" for="Login_Name"> Name </label> </td> <td> <forms:input class="textbox" value="{/soap:Envelope/soap:Body/ns:Login/ns:Name}" id="Login_Name" type="text" select="/soap:Envelope/soap:Body/ns:Login/ns:Name" src="xmlLogin" /> </td> </tr> <tr> <td valign="top"> <label id="labelLogin_Password" for="Login_Password"> Password </label> </td> <td> <forms:input class="textbox" value="{/soap:Envelope/soap:Body/ns:Login/ns:Password}" id="Login_Password" type="password" select="/soap:Envelope/soap:Body/ns:Login/ns:Password" src="xmlLogin" /> </td> </tr> </table> </div> <div style="width: 400px;" id="buttonLogin"> <hr /> <button style="float: right;" onclick="DoLogon" id="ok"> Log on </button> </div> </htmli:xsl> </body> </html> ---- end code ---- |