hi Declan

i used that (http://www.shanaghy.com/gdatamod/ ) files to "gdata\java
\lib" folder. But my emulator died.

so i tired 2th method.

===>
I modified the gdata source to override the https cert verifier in
the
following places.
com\google\gdata\client\GoogleAuthTokenFactory.java(461):
HttpURLConnection urlConnection = (HttpURLConnection)
url.openConnection();
com\google\gdata\client\authn\oauth\OAuthHttpClient.java(43):
HttpURLConnection connection = (HttpURLConnection)
url.openConnection();
com\google\gdata\client\http\AuthSubUtil.java(303): HttpURLConnection
httpConn = (HttpURLConnection) url.openConnection();
com\google\gdata\client\http\AuthSubUtil.java(371): HttpURLConnection
httpConn = (HttpURLConnection) url.openConnection();
com\google\gdata\client\http\AuthSubUtil.java(431): HttpURLConnection
httpConn = (HttpURLConnection) url.openConnection();
com\google\gdata\client\http\HttpGDataRequest.java(320):
HttpURLConnection uc = (HttpURLConnection)
requestUrl.openConnection();


The modified code looks like this:


    // Open connection
    HttpURLConnection urlConnection = (HttpURLConnection)
url.openConnection();
    if ( urlConnection instanceof HttpsURLConnection ) {
        HttpsURLConnection ucs = (HttpsURLConnection) urlConnection;
        ucs.setHostnameVerifier( new X509HostnameVerifier(){
            @Override
            public boolean verify(String arg0, SSLSession arg1) {
                return true;
            }
            @Override
            public void verify(String arg0, SSLSocket arg1) throws
IOException {
            }
            @Override
            public void verify(String arg0, X509Certificate arg1)
throws SSLException {
            }
            @Override
            public void verify(String arg0, String[] arg1, String[]
arg2) throws SSLException {
            }
        });
    }
<=====

i wanted to make JAR files, so i created project with eclipse and
modified each files you recommeded.

BUT i have some problem below that.

[javac] D:\java\workspace\324\java\src\com\google\gdata\client\http
\HttpGDataRequest.java:42: package org.apache.http.conn.ssl does not
exist
    [javac] import org.apache.http.conn.ssl.*;
    [javac] ^
    [javac] D:\java\workspace\324\java\src\com\google\gdata\client\http
\HttpGDataRequest.java:317: cannot find symbol
    [javac] symbol  : class X509HostnameVerifier
    [javac] location: class
com.google.gdata.client.http.HttpGDataRequest
    [javac]         ucs.setHostnameVerifier( new X509HostnameVerifier()
{
    [javac]                                      ^

I don't know how do i do that ?
I can't solve the problem.

i added the android.jar files throgh buildpath confiuration to import
"org.apache.http.conn.ssl.X509HostnameVerifier" but i meet the above
problem.
i really want  to make new JAR files. Plz tell me the solution more
details as step by step because i',m beginner with eclipse and Java.
Or any solutions do you have?

Regards


On 11월26일, 오전4시40분, "Declan Shanaghy" <[email protected]> wrote:
> Following the recommendation from this 
> thread:http://markmail.org/message/2do7hlyw6ka4dat2#query:android%20HttpsUrl...
>
> I have placed some modified jars here:http://www.shanaghy.com/gdatamod/
>
> I modified the gdata source to override the https cert verifier in the
> following places.
> com\google\gdata\client\GoogleAuthTokenFactory.java(461):
> HttpURLConnection urlConnection = (HttpURLConnection)
> url.openConnection();
> com\google\gdata\client\authn\oauth\OAuthHttpClient.java(43):
> HttpURLConnection connection = (HttpURLConnection)
> url.openConnection();
> com\google\gdata\client\http\AuthSubUtil.java(303): HttpURLConnection
> httpConn = (HttpURLConnection) url.openConnection();
> com\google\gdata\client\http\AuthSubUtil.java(371): HttpURLConnection
> httpConn = (HttpURLConnection) url.openConnection();
> com\google\gdata\client\http\AuthSubUtil.java(431): HttpURLConnection
> httpConn = (HttpURLConnection) url.openConnection();
> com\google\gdata\client\http\HttpGDataRequest.java(320):
> HttpURLConnection uc = (HttpURLConnection)
> requestUrl.openConnection();
>
> The modified code looks like this:
>
>     // Open connection
>     HttpURLConnection urlConnection = (HttpURLConnection) 
> url.openConnection();
>     if ( urlConnection instanceof HttpsURLConnection ) {
>         HttpsURLConnection ucs = (HttpsURLConnection) urlConnection;
>         ucs.setHostnameVerifier( new X509HostnameVerifier(){
>             @Override
>             public boolean verify(String arg0, SSLSession arg1) {
>                 return true;
>             }
>             @Override
>             public void verify(String arg0, SSLSocket arg1) throws 
> IOException {
>             }
>             @Override
>             public void verify(String arg0, X509Certificate arg1)
> throws SSLException {
>             }
>             @Override
>             public void verify(String arg0, String[] arg1, String[]
> arg2) throws SSLException {
>             }
>         });
>     }
>
> I have only tested this using PicasawebService.setUserCredentials and
> it passed the verification step without any problems.
>
> I have not tested this extensively and do not plan to maintain it.
> If you wish to use it do so at your own leisure/risk   ;-P
>
>
>
> On Tue, Nov 18, 2008 at 1:44 AM, Waldo <[email protected]> wrote:
>
> > I'm having the same problem.  Apparently lots of people are, judging
> > from searches I've done...
>
> > W
>
> > On Nov 3, 7:35 am, "[email protected]" <[email protected]> wrote:
> > > Hello. I'm from Belgium, so, sorry for my english ;-)
>
> > > I'm developing an application withgdataAPI.
>
> > > I tried :
> > > PicasawebService myService = new PicasawebService("exampleCo-
> > > exampleApp-1");                    
> > > myService.setUserCredentials("[email protected]",
> > > "password");
>
> > > it works fine on an J2SE application but there is an error with
> > > Android :
>
> > > com.google.gdata.util.AuthenticationException: Error connecting with
> > > login URI
>
> > > I put the INTERNET permission in manifest file but it doesn't works
>
> > > Can anybody help me ?
>
> > > thanks
>
> > > Julien- 따온 텍스트 숨기기 -
>
> - 따온 텍스트 보기 -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to