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

Java Development

Reply
New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000
Accepted Solution

Vodafone proxy and Web scripts

I'm developing an application for BB. This app has to access to my server and pull XML or text data from the server. It works pretty well through Wi-Fi and a lot other mobile networks but fails to operate in Vodafone network. Instead of my data I receive HTML from Vodafone proxy:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<style type="text/css">
<!--
.portal_font {font-size: small; color: #000000;}
.menu_font {font-size: small; color: #FFFFFF;}
-->
</style>
</head>

<body class="portal_font">

<div class="menu_font" style=" background:#FF0000; padding-left: 2px; padding-top: 2px; padding-bottom: 2px; padding-right: 2px;">
  <b>First time user</b>
</div>
<div class="portal_font" style="background:#FEE071; padding-left: 2px; padding-top: 2px; padding-bottom: 2px; padding-right: 2px;">
  <b>Vodafone Mobile Internet</b>
</div>

<p>Some sites are already mobile friendly. Many more are not and may contain features that won't work on your phone.</p>

<p>We can modify these sites to improve your experience.</p>

<p>
  By continuing you accept our 
  <a href="http://live.vodafone.co.uk/mi_tsandcs_rewrite" class="portal_font">terms &amp; conditions</a>.
</p>

<form action="http://vfuk.p2.novarra.co.uk/__aHR0cDovL210ZC13ZWIuYXhtb3IuY29tL21vYmlsZS8xLnppcD8mbj0xMjY2NDkzODQ0M..." method="post">
  <p>
    <input type="submit" name="mobile" value="Adapt where necessary"/><br/>
    <input type="submit" name="standard" value="Leave untouched"/>
  </p>
</form>

<p>  
  You will see this page once. You can change your settings by going to 
  <a href="http://live.vodafone.co.uk/mi_myacc_rewrite" class="portal_font">My Account</a>
  &gt; 
  Web Preferences.
</p>

<div class="portal_font" style="background:#FEE071; padding-left: 2px; padding-top: 2px; padding-bottom: 2px; padding-right: 2px;">
  <b>Notes</b>
</div>

<p>* In some cases - such as at the site owners' request - we cannot modify sites even if you have asked us to do so.</p>

<p>* Vodafone is not responsible for the content of Mobile Internet sites.</p>

<p>
  * You will not be able to access adult-themed sites if child protection bar is enabled on your phone.
  <a href="http://live.vodafone.co.uk/mi_moreabout_rewrite" class="portal_font">More about this</a>
</p>

<p>* More about <a href="http://live.vodafone.co.uk/mi_charging_rewrite" class="portal_font">charging</a></p>

<div class="menu_font" style="background:#B2B2B2; padding-left: 2px; padding-top: 2px; padding-bottom: 2px; padding-right: 2px;">
   <a href="http://live.vodafone.co.uk/mi_home_rewrite" class="menu_font">Home</a> |
    <a href="http://live.vodafone.co.uk/mi_fun_rewrite" class="menu_font">Fun</a> |
    <a href="http://live.vodafone.co.uk/mi_web_rewrite" class="menu_font">Web</a> |
  <a href="http://live.vodafone.co.uk/mi_friends_rewrite" class="menu_font">Friends</a>
</div>

</body>
</html>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

 Sure this is not my intention.

Important: I reviewed the server access logs and found NO records from the mobile app. This means that Vodafone proxy gives this response without even trying to access to the server, so NO server side tweaks can help.

 

Here are details about my BB app:

1. Connection parameters: http://mtd-web.axmor.com/mobile/1.zip?&n=1266493844182;deviceside=true;apn=wap.vodafone.co.uk

 

 

2. Request headers. In order to force to path-through I specify:

 

            connection.setRequestProperty("Connection", "Keep-Alive");
            connection.setRequestProperty("Keep-Alive", "5000");
            connection.setRequestProperty("Http-version", "HTTP/1.1");
            connection.setRequestProperty("User-Agent", "Blackberry");
            connection.setRequestProperty("Cache-Control", "no-transform");

 

3. Also I put my text and zip files to /mobile folder as was suggested to get path-through.

 

 

Please let me know if there is a normal way to overcome this. Should I use different connection? Should I add something to request headers?

 

...even Verizon does not corrupt my data in that silly way. Smiley Mad

Andrey Zharkikh
Project Manager, Axmor Software
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Vodafone proxy and Web scripts

There are a number of Threads on this forum about Vodafone and its proxy Server.  Please have a search round.

 

I believe the last Thread ended with the solution of getting the users to log in using the WAP Browser (Vodafone Live) and responding directly to this page. 

New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: Vodafone proxy and Web scripts

Thanks for answering!

 

I searched this forum and that is why I applied that workarounds (no-transform, /mobile, etc.).

However all these does not help a lot still.

 

As the ultimate solution I can ask end users to go to Web browser. However I would like to learn the way to do this... The output I have I received from the HttpConnection object. How can I pass this to the Web browser?

Andrey Zharkikh
Project Manager, Axmor Software
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Vodafone proxy and Web scripts

I would ask the User to do this manually.  They have to start the WAP Browser to do it.  Any URL will give this response. 

 

However if you want to try to automate this, instead of trying to feed this data to a Browser, I would just start the WAP Browser with your own URL - when the User can see your own URL using the WAP Browser, then they will be OK to use your application.

 

Here is the KB article that should help you start the WAP Browser.

 

How to - Invoke the browser
Article Number: DB-00701
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800440/How_To_...

New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: Vodafone proxy and Web scripts

Thanks!!! Looks like this makes sense. I will try this ASAP.

 

Let me sum the things up.

1. I have some Web scripts in my "doman.com" and my BB app does not get scripts output because of the Vodafone proxy

2. I want to whitelist my Web site for specific user in order to disable transformation

3. I need to start WAP browser (it is essential that this is not the normal Browser) and navigate to ANY page on my Web site (say to a page which tells that now a user may use my app).

4. Prior ask the user to select "Leave untouched"

 

Please confirm this.

 

I really appreciate your efforts and your level of deduction to this forum. I reviewed a lot your posts! Respect.

Andrey Zharkikh
Project Manager, Axmor Software
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Vodafone proxy and Web scripts

Your summary seems exactly right.

 

One caveat.

 

I have not actually needed to anything involving Vodafone WAP processing for a while, so my knowledge is old.  Things might have changed.  Going  by other posts on this board, they haven't. 

New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: Vodafone proxy and Web scripts

Not sure I understand you. Smiley Sad

Should I show a page from my Web site in the WAP browser then? If I should not, I'm confused with the solution I should implement.

Andrey Zharkikh
Project Manager, Axmor Software
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Vodafone proxy and Web scripts

Now I'm confused!  Smiley Surprised

 

I was confirming that your 4 step process is exactly what I would do.

 

I was also saying that I'm basing this on my knowledge from a while ago.  It might not work, because things might have changed.  I don't think they have, but they might have.  So don't shoot me if I have missed something!   

New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: Vodafone proxy and Web scripts

Now I got you! Thanks. We are implementing this and going to send to our customer for validation. I only hope that this works.

 

Vodafone really makes me crazy!! I also reviewed some posts in http://www.betavine.net/ but looks like Vodafone specialists don't know about all these problems well, don't understand why anyone could have any problems, etc.

Andrey Zharkikh
Project Manager, Axmor Software
Highlighted
New Developer
Posts: 36
Registered: ‎08-04-2008
My Device: Curve 9000

Re: Vodafone proxy and Web scripts

Hello Peter.

 

We finally get is work! Smiley Happy Many thanks!!!

 

As the permanent solution we would like to get our and customer's Web site whitelisted but for the temporary solution we've made "Whitelist Site for Me" menu item.

Andrey Zharkikh
Project Manager, Axmor Software