Package org.apache.commons.httpclient

Examples of org.apache.commons.httpclient.HttpURL


    private FileContentCollection localRepo;

    @Override
    public void initialize(ServerSessionManager loginInfo) {
        try {
            HttpURL baseURL = new HttpURL(loginInfo.getServerURL());
            baseURL = new HttpURL(baseURL, "webdav/content");

            //System.out.println("[WebdavClientPlugin] got base URL " + baseURL);

            // get the authentication service for this session
            AuthenticationService as =
View Full Code Here


        return sResult;
    }

    private static HttpURL uriToHttpURL(String uri) throws URIException {
        return uri.startsWith("https") ? new HttpsURL(uri.toCharArray())
                                       : new HttpURL(uri.toCharArray());
  }
View Full Code Here

  /**
   * Sample creating Draft mail in Exchange repository
   */
  public void addDraftMail() {
    HttpURL url = null;
    WebdavResource resource = null;

    try {
      /* Set XML Namespace collection */
      Hashtable<String, String> namespace = new Hashtable<String, String>();
      namespace.put("a", "DAV:");
      namespace
          .put("b", "urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/");
      namespace.put("g", "http://schemas.microsoft.com/mapi/");
      namespace.put("e", "urn:schemas:httpmail:");
      namespace.put("d", "urn:schemas:mailheader:");
      namespace.put("c", "xml:");
      namespace.put("f", "http://schemas.microsoft.com/mapi/proptag/");
      namespace.put("h", "http://schemas.microsoft.com/exchange/");
      namespace.put("i", "urn:schemas-microsoft-com:office:office");
      namespace.put("k", "http://schemas.microsoft.com/repl/");
      namespace.put("j", "urn:schemas:calendar:");
      namespace.put("l", "urn:schemas-microsoft-com:exch-data:");

      /* Connect to Exchange webdav repository */
      url = new HttpURL(Constant.DAV_URL);
      url.setUserinfo(Constant.APPLICATION_USER_ACCOUNT_NAME,
          Constant.APPLICATION_USER_PASSWORD);
      resource = new WebdavResource(url);
      resource.setDebug(Constant.DEBUG_LEVEL);

      /* Create draft mail (XML request) */
 
View Full Code Here

  /**
   * Sample creating Task in Exchange repository
   */
  public void addTask() {
    HttpURL url = null;
    WebdavResource resource = null;

    try {
      /* Set XML Namespace collection */
      Hashtable<String, String> namespace = new Hashtable<String, String>();
      namespace.put("a", "DAV:");
      namespace
          .put("b", "urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/");
      namespace.put("g", "http://schemas.microsoft.com/mapi/");
      namespace.put("e", "urn:schemas:httpmail:");
      namespace.put("d", "urn:schemas:mailheader:");
      namespace.put("c", "xml:");
      namespace.put("f", "http://schemas.microsoft.com/mapi/proptag/");
      namespace.put("h", "http://schemas.microsoft.com/exchange/");
      namespace.put("i", "urn:schemas-microsoft-com:office:office");
      namespace.put("k", "http://schemas.microsoft.com/repl/");
      namespace.put("j", "urn:schemas:calendar:");
      namespace.put("l", "urn:schemas-microsoft-com:exch-data:");
      namespace.put("m", "http://schemas.microsoft.com/exchange/tasks/");

      /* Connect to Exchange webdav repository */
      url = new HttpURL(Constant.DAV_URL);
      url.setUserinfo(Constant.APPLICATION_USER_ACCOUNT_NAME,
          Constant.APPLICATION_USER_PASSWORD);
      resource = new WebdavResource(url);
      resource.setDebug(Constant.DEBUG_LEVEL);

      /* Create task (XML request) */
 
View Full Code Here

            }
            if (!itself) {
                String myURI = httpURL.getEscapedURI();
                char[] childURI = (myURI + (myURI.endsWith("/") ? "" : "/")
                                   + getName(href, false)).toCharArray();
                HttpURL childURL = httpURL instanceof HttpsURL
                                   ? new HttpsURL(childURI)
                                   : new HttpURL(childURI);
                childURL.setRawAuthority(httpURL.getRawAuthority());
                workingResource.setHttpURL(childURL, NOACTION, defaultDepth);
                workingResource.setExistence(true);
                workingResource.setOverwrite(getOverwrite());
            }
            workingResource.setDisplayName(displayName);
View Full Code Here

        (HttpURL httpURL, String additionalPath, int action, int depth)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath), action, depth);
    }
View Full Code Here

        (HttpURL httpURL, String additionalPath, int action)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   action, defaultDepth);
    }
View Full Code Here

    public void setHttpURL(HttpURL httpURL, String additionalPath)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   defaultAction, defaultDepth);
    }
View Full Code Here

    public void setHttpURL(String escapedHttpURL)
        throws HttpException, IOException {

        setHttpURL(escapedHttpURL.startsWith("https")
                   ? new HttpsURL(escapedHttpURL)
                   : new HttpURL(escapedHttpURL));
    }
View Full Code Here

     */
    public HttpURL getHttpURLExceptForUserInfo()
        throws URIException {

        return httpURL instanceof HttpsURL ? new HttpsURL(httpURL.getRawURI())
                                           : new HttpURL(httpURL.getRawURI());
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.HttpURL

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.