View Full Version : Loading data from SOAP WebService

4 Nov 2009, 2:14 AM
Hi there,

I already searched the forum for this topic and found some threads, but they are not working for me. I got a .net webservice at the domain "http://test.page.com/webservice/v1.00/service.asmx" and want to get data from that service into my Adobe Air application. One solution I found was:

var options = {
url: 'http://test.page.com/webservice/v1.00/service.asmx/func1',
method: "POST",
success: function(a, b){alert("okay");},
failure: function(a, b){alert("not okay");},
callback: function(a,b,c){if (b) {
for(var prop in c){
air.trace(prop + " = " + c[prop]);
}else alert("ohh");},
xmlData: { param1: 'michi', param2: '123'}
Ext.Ajax.request( options );But that does not work for me =( air.trace does write to the console whats in the response:

status = 200
statusText = OK
responseText = <html><head><title>FEHLER: Server nicht gefunden</title></head><body><h1>FEHLER: Server nicht gefunden</h1><h3>Der Server mit dem Namen <I>test.page.com</I> wurde nicht gefunden (DNS).</h3><hr><p><i>Datum: Wed Nov 04 10:27:30 CET 2009</i></p></body></html> (in english: Error: Server not found)
responseXML = null
argument = undefined

But when I call the url http://test.page.com/webservice/v1.00/service.asmx it seems wo work oO Does anyone got an idea whats wrong?

Thanks for your help!

22 Dec 2009, 2:36 PM
Still searching for the error :(

6 Feb 2010, 9:57 AM
Is it true that ExtJS doesn't support SOAP-XML?

7 Feb 2010, 4:18 PM
This isn't an issue with Ext. If it can't find the server, then it's the underlying environment. Does Air respect the same origin policy? Something to check out.

10 Mar 2010, 12:53 PM
I get it to work :)

var options = {
url: 'http://test.server.de/WebService/v1.0/WebService.asmx/GetFunction',
method: "POST",
params: {
callback: function(options, success, response){
if (success) {
var store = new Ext.data.XmlStore({
storeId: 'GetFunctionStore',
autoLoad: true,
autoDestroy: true,
data: response.responseXML,
record: 'root',
idPath: 'ID',
fields: ...,
sortInfo: {
field: 'ID',
direction: 'DESC'
} else {
for (var prop in response) {
air.trace(prop + " = " + response[prop]);
Ext.Ajax.request( options );

I had to change the web service to accept POST/GET-vars.