HTTP Authentication on Rogers WAP Gateway
Was curious has anyone else out there had any problems using HTTP Authentication and a WAP gateway?
I am able to use both the WAP gateway and the Sim MDS to access a site without any problems. However as soon as I turn on HTTP Authentication the WAP Gateway version throws a net.rim.device.cldc.io.waphttp.WAPIOException. The SIM/MDS version works fine with HTTP Authentication. The offending code seems to be where I am setting the authentication header: httpConnection.setRequestProperty("Authorization", password); perhaps I need another header? I'm sifting through the documentation but haven't come across anything. Any help/advice/pointers are greatly appreciated! Thanks Darren On a separate note is there any way to get at the message in WAPIOException when you are building a midlet blackberry app? my app can't seem to utilize the RIM libraries when it is being built as a midlet, I've tried to include the libraries but the compiler won't allow me. |
Try this....
Quote:
|
Edit: I found you've already done this -- in this post
Try the Search Results "HTTP Authentication" and see if any of this is relevant... Please reply here to let all of us know how you solved your problem, if you do! |
Thanks
Thanks Mark,
I'll go over my headers again and see if I'm missing anything and report finding back here. cheers, Darren |
I assume you are trying to do Basic Authentication (not NTLM/Digest). If so, I found 3 things:
1. With a WAP gateway, it only works if you leave the username/password as plaintext (base64 encoding does not work). 2. With IDEN (6510/7510) or MDS you need to base64 encode the username/password string 3. On the 3.6 OS when using WAP, some http headers get dropped on a http POST if the post data is over a certain size (I think the size is ~38 bytes if I remember correctly). Here is the code I am using for basic authentication which works: Code:
private static String AUTHORIZATION = "Authorization"; |
All times are GMT -5. The time now is 01:16 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.