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

Re: why it goes to if condiation..?

I tested by downloading your sample code from the codeproject link.  Then I changed the first example to this:

 

	// DEMO 1
	function HelloWorld()
	{
		var pl = new SOAPClientParameters();
		pl.add("crsCode", "AAP");
		//SOAPClient.invoke(url, "HelloWorld", pl, true, HelloWorld_callBack);
		SOAPClient.invoke("http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS", "getDestinationStationDashboard", pl, true, HelloWorld_callBack);
	}
	function HelloWorld_callBack(r)
	{
		alert(r);
	}

 

 

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

Re: why it goes to if condiation..?

Thanks

 sir  code is fine ...you only change the property of chrome ?

 

add –disable-web-security

this

Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012

Re: why it goes to if condiation..?

Yes.  A s I mentioned before chrome does not allow cross domain SOAP calls.  So you need to disable it, to test your product.  Do this by following the tutorial in the link I provided.

 

The code I gave above is from the website you wanted to use (codeproject), with a few modifications so that it works with your railapps.

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

Re: why it goes to if condiation..?

i am getting 2 errors 

 

1)Uncaught TypeError: Cannot read property 'documentElement' of null

 

Origin null is not allowed by Access-Control-Allow-Origin.

 

 

Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012

Re: why it goes to if condiation..?

Change your chrome shortcut like this:

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

 

Worked for me

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

Re: why it goes to if condiation..?

Thanks can we do the same thing for firefox also..?

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

Re: why it goes to if condiation..?

XMLHttpRequest cannot load http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS?wsdl. Origin null is not allowed by Access-Control-Allow-Origin

 

 

 

getting this error..as you change anything in soapclient.js also..?

 

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

Re: why it goes to if condiation..?

Sir not able to remove this  error..:smileysad:

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Carrier: none

Re: why it goes to if condiation..?

The problem you are running in is CORS (Cross-origin resource sharing) using XHR. XHR in the browser isn't able to call sources of an other domain then the hosting domain without configuration on server side. Using your source code within an app it should work by default to call URLs from another domain.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
ravi1989
Posts: 773
Registered: ‎07-21-2012
My Carrier: 0

Re: why it goes to if condiation..?

But you are getting output .Today

Please use plain text.