Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: why it goes to if condiation..?

Are you looking at what happens in the web inspector?  You will see that, that code hits the page and gets redirected to a login page...  Do you have login details for that web service?  What is supposed to happen?  

 

The other result I managed to get was a page saying: here is where you invoke a service...

If it helped you, click like. :smileyhappy:
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: why it goes to if condiation..?

i used your code..error is display..syntex error : 

...C "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm...
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<script type="text/javascript" src="jquery.min.js"></script>
<script>

var productServiceUrl = 'http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS/getVersion';

function beginProduct()
{

$.ajax({
url: productServiceUrl,
type: "GET",
contentType: "application/javascript",
dataType: "jsonp",
data: '{}',
complete: endSaveProduct,
});

return false;
}

function endSaveProduct(xmlHttpRequest, status)
{
 $(xmlHttpRequest.responseXML)
    .find('SaveProductResult')
    .each(function()
 {
   var name = $(this).find('myDiv').text();
 });
}

</script>
</head>
<body>

<div id="myDiv"><h2>Sample Code</h2></div>
<button type="button" onclick="beginProduct()">Get Content</button>

</body>
</html>

 

Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: why it goes to if condiation..?

Hi.sir

there is no user name or password (login detail) of web service , actually i called this web service from http://www.codeproject.com/Articles/12816/JavaScript-SOAP-Client this artical . but the problem is that response is display only in IE not in chrome or firefox.Error disply wsdl is null .so in future i am not able to debug my code when i stuck , so i want to call this web service with different way

Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: why it goes to if condiation..?

What is the response in IE?

If it helped you, click like. :smileyhappy:
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: why it goes to if condiation..?

i am able to call every method in IE while using http://www.codeproject.com/Articles/12816/JavaScript-SOAP-Client

 

this code..

 

example : getversion = 1.3

 

example getDeparturedashboard: array of object.

Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: why it goes to if condiation..?

When I test that project on my machine I get error (in chrome BTW):

Origin http://localhost is not allowed by Access-Control-Allow-Origin.

 

Which is right.  You cannot use SOAP across domains.  The SOAP web service needs to be requested on the same machine.  Meaning that a phone app will not be able to use SOAP as it is on another device, trying to access information across domains.

 

IE does work but then again it's not a very secure browser.

If it helped you, click like. :smileyhappy:
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: why it goes to if condiation..?

sir you are right ...But i am getting response in phone also. of all platform..

 

Every thing is fine from my side . problem is in future if there is some issue i want to debug the script i will not able to do that.so i searching for another way to call this web service..

 

 

Thanks

Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: why it goes to if condiation..?

BTW I got your code to work in Chrome by doing this... Running it with --disable-web-security

 

More ingo here:

http://ripple.tinyhippos.com/forums/3-ripple/topics/36-disabling-web-security-in-chrome-for-cross-do...

 

And this is how I did it:

http://rickluna.com/wp/2012/06/test-cross-domain-ajax-in-chrome/

 

 

If it helped you, click like. :smileyhappy:
Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: why it goes to if condiation..?

please wait i will check

Please use plain text.
Developer
ravi1989
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: why it goes to if condiation..?

can you please share code which is running..

Please use plain text.