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
onelord2002
Posts: 66
Registered: ‎09-14-2011
My Device: Simulator
My Carrier: Developer

Unable to access the network for sending a soap request to remote webserver

I'm developing an application where I have to send a SOAP request to remote webserver. Through forums I have learned that I need to install MDS for accessing internet in the simulator.

I downloaded "BlackBerry Email and MDS Services Simulator Package" and installed it, successfully configured the proxy and i can access internet through the browser of the blackberry simulator.

But still I;m unable to connect to the webserver.

Simulator is giving this error "Could not select proper Transport Descriptor for :<server address>".

I even allowed access to everything in my config.xml file

here is how it looks

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0.0" rim:backButton="exit">
  <name>Sample Application</name>
  <access subdomains="false" uri="*"/>
  <icon rim:hover="false" src="ext/icon_launcher.png"/>
  <icon rim:hover="true" src="ext/icon_launcher.png"/>
  <content src="index.html"/>
  <rim:loadingScreen backgroundImage="ext/LadyOnPhone.png" foregroundImage="ext/loadingicon.gif" onRemotePageLoad="true" onLocalPageLoad="true" onFirstLaunch="true"/>
  <rim:navigation mode="focus"/>
</widget>

When I tried to run the same html page in the Internet Explorer I'm getting the correct response. So the code regarding sending XmlHttpRequest is correct.

Am I missing something here?? Do I have to register my application to MDS or is there some procedure I have to follow to give my application access to internet???

I can access the internet through the browser of the simulator but cannot access internet in my application.

Need help :Helpsmilie:

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Unable to access the network for sending a soap request to remote webserver

Are you accessing a URL on your machine or local LAN or a publicly available domain?  If you are accessing a URL on your machine or local LAN be sure to use the fully qualified domain name for the machine on your network.

 

Sometimes the MDS can have difficulty resolving local domains.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
onelord2002
Posts: 66
Registered: ‎09-14-2011
My Device: Simulator
My Carrier: Developer

Re: Unable to access the network for sending a soap request to remote webserver

Its remote server not local..... It is a publicly available domain

I read many forums and came to know that many are having same problem that I have

They are unable to access the network on their office network because of proxies

So I took .cod file to my home and checked it at my home it worked perfectly I got the response

This might be some issue that you guys have to look into

because i can access internet through browser and I'm able to open the page to which i'm sending request to in the browser of the simulator but in application i'm unable to access (if there are proxies)

And if there are no proxies I'm able to get the expected response

 

the same problem this one is face

Widget in simulator can not access web resources through a proxy

Please use plain text.
Developer
onelord2002
Posts: 66
Registered: ‎09-14-2011
My Device: Simulator
My Carrier: Developer

Re: Unable to access the network for sending a soap request to remote webserver

I contacted my office system admin and asked him to add me into exception on proxy and now its working

That's the solution I came up with for this problem

If anyone is having the same problem I hope this thread might help them

Thanks for your time :smileyhappy:

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Unable to access the network for sending a soap request to remote webserver

The browser does "its own special thing" on the BlackBerry platform and goes through entirely different communications than any other application on the device.

 

WebWorks applications communicate the same way as other Java applications and unfortunately are thus subject to the same quirks.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
onelord2002
Posts: 66
Registered: ‎09-14-2011
My Device: Simulator
My Carrier: Developer

Re: Unable to access the network for sending a soap request to remote webserver

In that case are you implying that if any user who is connected to internet through wi-fi which uses proxy wont be able to use my application since it cannot go through the proxy :Eek:

 

is there any way to detect the proxy and make way through the proxy in webworks???

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Unable to access the network for sending a soap request to remote webserver

WebWorks does not have a problem with proxies.. the MDS simulator that is installed on your desktop or in a corporate environment needs to be configured to allow for proxy access.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.