Package com.huangzhimin.contacts.exception

Examples of com.huangzhimin.contacts.exception.ContactsException


        return url;
    }

    private void loginResponseHandle(String data) throws Exception {
        if (data.indexOf("FailedAuthentication") >= 0) {
            throw new ContactsException("failed authentication");
        }

        if (data.indexOf("<wsse:BinarySecurityToken") < 1) {
            throw new ContactsException("failed authentication");
        }

        XmlPullParserFactory factory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null);
        factory.setNamespaceAware(true);
View Full Code Here


            String responseStr = doPost(loginUrl, params,
                    "http://mail.139.com");
            String redirectUrl = getHrefUrl(responseStr, "http://");
            responseStr = doGet(redirectUrl, loginUrl);
        } catch (Exception e) {
            throw new ContactsException("139 protocol has changed", e);
        }
    }
View Full Code Here

                String email = jsonContact.getString("y");
                contacts.add(new Contact(username, email));
            }
            return contacts;
        } catch (Exception e) {
            throw new ContactsException("139 protocol has changed", e);
        }
    }
View Full Code Here

                        new Cookie(".yeah.net", "ntes_mail_noremember",
                        "true", "/", calendar.getTime(), false)});
            String redirectUrl2 = getJSRedirectLocation(responseStr);
            indexPage = doGet(redirectUrl2, redirectUrl1);
        } catch (Exception e) {
            throw new ContactsException("yeah protocal has changed", e);
        }
    }
View Full Code Here

                    }
                }
            }
            return contacts;
        } catch (Exception e) {
            throw new ContactsException("yeah protocol has changed", e);
        }
    }
View Full Code Here

            String redirectUrl = getJSRedirectLocation(responseStr);
            redirectUrl += "%26verifycookie%3D1%26language%3D-1%26style%3D35";
            doGet(redirectUrl, loginUrl);
        } catch (Exception e) {
            throw new ContactsException("163 protocol has changed", e);
        }
    }
View Full Code Here

                    contacts.add(new Contact(username, email));
                }
            }
            return contacts;
        } catch (Exception e) {
            throw new ContactsException("163 protocol has changed", e);
        }
    }
View Full Code Here

              new Cookie("mail.sina.com.cn",
                  "sina_vip_mail_recid", "false", "/", null,
                  false) });
      doPost(loginUrl, params, "http://mail.sina.com.cn");
    } catch (Exception e) {
      throw new ContactsException("sina protocol has changed", e);
    }
  }
View Full Code Here

        }

      }
      return contacts;
    } catch (Exception e) {
      throw new ContactsException("sina protocol has changed", e);
    }
  }
View Full Code Here

            try {
                doLogin();
                return parseContacts();
            } catch (Exception e) {
                if (--i == 0) {
                    throw new ContactsException(e.getMessage(), e);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.huangzhimin.contacts.exception.ContactsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.