08-11-2011 04:35 PM
I am currently working with webworks on a blackberry torch application and am having trouble making an XHR call with devices that have a sim card in them.
When I test via wifi with no sim card or the simulator my xhr requests connect properly. The XHR request is connecting to an HTTPS endpoint.
currently I have a very vanilla config.xml
<access subdomains="true" uri="https://www.example.com" /> (example.com is replaced with my own domain)
and I have
<rim:connection timeout="25"> <id>TCP_WIFI</id> <id>MDS</id> <id>BIS-B</id> <id>TCP_CELLULAR</id> <id>WAP2</id> <id>WAP</id> </rim:connection>
Any thoughts why my app can connect just fine without a sim card or via the simulator but not with the sim card installed?
08-11-2011 04:52 PM
Unless you have a great understanding of Java Transports do not change these at all. The default order is always the best as it will complete requests fastest but still use the Wifi radio first. Try removing the <rim:connection> entry and see if this is still the case.
08-11-2011 05:08 PM
Thanks for the quick reply.
I tried removing the lines from the config.xml related to <rim:connection> but I am still encountering the same trouble. The strange thing is if I remove the sim card from the phone and rely exclusively on the wifi connection all of my requests go through properly.
Could there be something related to the SSL certificate I am using for the SSL encryption? Trying to think of reasons why the XHR request would work without a sim card installed but fail when the sim is in the phone (both 3g and wifi connections enabled).
This was the original reason I had the <rim:connection> lines in the config.xml to try to isolate which transport might be failing to connect.
Thanks for the speedy reply.
08-12-2011 11:08 AM
You could be right about it being the SSL certificate. Can you try a quick test for me? Does it work in the normal BB browser using the SIM card?