Question

With dhtmlx touch you can send ajax calls with ease like:

dhx.ajax().get("some.php","a=1"); //GET: some.php?a=1
dhx.ajax().post("some.php","a=2"); //GET: some.php; POST: a=2;

But is there also a possibility to send SOAP requests with dhtmlx? Something like:

var xml = //XML string HERE;
dhx.ajax().post("some.php",xml); //Post SOAP request
Était-ce utile?

La solution 3

I've looked at it more thorough but it doesn't seem to be possible with the framework. The solution being that I have to create my own calls.

Autres conseils

I don't think the ajax() function is the way to go about it. Have you tried using dhtmlxService

Here is a great example of the markup:

function doInvoke() {
    var ip = document.getElementById("ipaddress").value;
    var service = new dhtmlxService(
        "http://www.webservicex.net/geoipservice.asmx?WSDL", "GeoIPService", "GeoIPServiceSoap");
    var response = service.invokel("GetGeoIP", "IPAddress", ip);
    document.getElementById("country").value = response.getValue("CountryName"); 
}

A SOAP web service is just like a RESTful request in that they are both basically doing an HTTP POST of data to the server. The difference is that the web service has a lot of extra "stuff" that is required (the SOAP envelope for example). So, as long as you can build up the SOAP part of the request programatically within your code, there is no reason that you can't use ajax().post mechanism to call a SOAP web service in exactly the way that you have described in your question above.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top