AJAX and web service in Safari

B

bookmac

Hello

In Safari, (cant do it in Firefox because of security restriction) I'm
trying to access a web service in another domain via

function doAjax() {
xmlhttp.open("POST",
"http://company.com.au/dir/servlet/rpcrouter",true);
xmlhttp.onreadystatechange = myreturnmethod;
xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlhttp.send('input=88921');
}


and I'm getting this error back from the Web Service:


<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Body>

<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>parsing error: org.xml.sax.SAXParseException: Document
root element is missing.</faultstring>
<faultactor>/aplus2006/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Anybody can shed some light?

Thank you.
 
A

ASM

bookmac a écrit :
In Safari, (cant do it in Firefox because of security restriction) I'm
trying to access a web service in another domain via ..../...
Anybody can shed some light?

It seems to me almost clear : "root element is missing"

What make your 'myreturnmethod' function ?
 
B

bookmac

I am writing an Apple Mac OS X Widget which can do cross-domain
invocations ( I believe) when its deployed as a widget after developing
it in Safari. Just in answer to your question.
 
U

Une Bévue

bookmac said:
I am writing an Apple Mac OS X Widget which can do cross-domain
invocations ( I believe) when its deployed as a widget after developing
it in Safari. Just in answer to your question.

and you "believe" this is possible doing cross-domain ajax without a
proxy ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,283
Messages
2,571,202
Members
48,781
Latest member
Charlie_2025

Latest Threads

Top