In the main java file I load the app using the file:// protocol
because I know the http:// protocol won't work.
Here is the code in the App.java file:
public class App extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
super.loadUrl("file:///android_asset/www/index.html");
}
}
Here is the code for the web service call:
function dowebservicecall() {
alert('starting call');
var xml = '<?xml version="1.0" encoding="utf-8"?>';
xml += '<soap:Envelope xmlns:xsi="
http://www.w3.org/2001/XMLSchema-
instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">';
xml += '<soap:Body>';
xml += '<GetCareersWithVideos xmnls="
http://website.ca/"/>';
xml = '</soap:Body>';
xml += '</soap:Envelope>';
var xmlRequest;
xmlRequest = new XMLHttpRequest();
xmlRequest.open("POST",server_url+"page.asmx",false);
xmlRequest.setRequestHeader("Content-Type", "text/xml;
charset=utf-8");
xmlRequest.setRequestHeader("Content-Length", xml.length);
xmlRequest.setRequestHeader("SOAPAction", xmlns_url +
"GetCareersWithVideos");
try {
xmlRequest.send(xml);
alert('received');
} catch (Ex) { alert(Ex.message); }
}
The logging in the logcat is not showing me anything relating to this
error, just the catch statement is receiving the error and catching
it.
Thanks
On May 19, 10:51 am, Simon MacDonald <
simon.macdon...@gmail.com>
wrote:
> Yes, if you remove that permission everything on Android will break
> horribly.
>
> Can you post some code showing what you are trying to do?
> Perhaps the "adb logcat" output of your device?
> What version of Android and PhoneGap are you testing with?
> Are you loading your code from the file:// or http:// protocol?
>
> Simon Mac Donaldhttp://
hi.im/simonmacdonald