Reputation: 3925
Trying to call web service in Tizen, it works in Tizen web simulator but it doesn't work in the device.
jQuery script linke added :
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
Internet privilege added:
tizen:privilege name="http://tizen.org/privilege/internet
Request jQuery:
jQuery.ajax({
url:"www.ServiceURL.com",
type:"POST",
beforeSend: function (request)
{
request.setRequestHeader("ver", "2.0.2217");
},
processData: false,
success: function(msg) {
alert("jQueryPost :: Result");
}
});
it's work in the simulator but not responded in the device ?
Upvotes: 1
Views: 1124
Reputation: 3925
Any resource that it is accessed outside should be declared(see Accessing External Network Resources):
You cannot access external network resources by default (WARP: W3C Access Requests Policy). So, you must request permissions for the widget to retrieve network resources. You can enter several URLs by using the Add button on the Access tab. For each URL, you can indicate if you want to allow the widget to access the URL sub-domains. The Allow subdomain column contents can be toggled by mouse clicks. so it cannot work without having access to the specific resource needed in our case defined in config.xml:
<access origin="http://url_resource" subdomains="true"/>
or
<access origin="*" subdomains="true"/>
to let everything pass.
Upvotes: 1