You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Michel Bohn <bo...@hotmail.com> on 2004/08/11 00:13:46 UTC

Re: PLEASE HELP WebdavResource init error, invalid port number

When I try and connect to the following url I get the following error.  
Could someone clarify why?  What am I doing wrong.

Error Output:
Init WebdavResource
invalid port number
org.apache.commons.httpclient.URIException: invalid port number
       at org.apache.commons.httpclient.URI.parseAuthority(URI.java:2218)
       at org.apache.commons.httpclient.URI.parseUriReference(URI.java:1961)
       at org.apache.commons.httpclient.HttpURL.<init>(HttpURL.java:379)
       at org.apache.commons.httpclient.HttpURL.<init>(HttpURL.java:207)
       at 
org.apache.webdav.lib.WebdavResource.isTheClient(WebdavResource.java:1104)
       at 
org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1130)
       at 
org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1118)
       at 
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3170)
       at 
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3145)
       at 
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:879)
       at 
org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:824)
       at 
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1746)
       at 
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1156)
       at 
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1175)
       at 
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1261)
       at 
org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:274)
       at Httpmail.init(Httpmail.java:52)
       at Httpmail.<init>(Httpmail.java:30)
       at propFindTest.main(propFindTest.java:8)
java.lang.Exception: invalid port number
       at Httpmail.<init>(Httpmail.java:32)
       at propFindTest.main(propFindTest.java:8)
Oops, got a problem invalid port number

   private String password = "xxxxxxxx";
   private String url = "http://oe.hotmail.com/cgi-bin/hmdata";
   private String user = "xxxxxxxx@hotmail.com";
      private WebdavResource wdr = null;
   private HttpURL HUrl;
   private HttpClient client;
   private HttpMethod method;
      public Httpmail() throws Exception {
       try {
           System.out.println("init " + url + " " + user + " " +password);
           init(url, user, password);
       } catch (Exception e) {
           throw new Exception(e.getMessage());
       }
   }
      public void init(String url, String usr, String pass) throws Exception 
{
              HUrl = new HttpURL(url);
       HUrl.setUserinfo(usr, pass);
              //set request headers
       System.out.println("Init WebdavResource");
              try {
           wdr = new WebdavResource(HUrl); <-- *dies here!!!!*
           wdr.proppatchMethod("Host", "services.msn.com");
           wdr.proppatchMethod("Content-Length", "XXXX");
           wdr.proppatchMethod("Connection",  "Close");
           wdr.proppatchMethod("User-Agent", "Outlook Express/5.0 (MSIE 5.0; 
Windows 98; DigExt; MSNIA)");
           wdr.proppatchMethod("Content-Type", "text/xml");
       } catch (Exception e) {
           System.out.println(e.getMessage());
           e.printStackTrace();
           throw new Exception(e.getMessage());
       }
   }

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: PLEASE HELP WebdavResource init error, invalid port number

Posted by James Mason <ma...@apache.org>.
Can you setup a sniffer/proxy for your connection (say Apache Ant's 
tcpmon or ethereal)? I think this may be a redirection problem, and it 
would be helpful to know what the http traffic looks like.

-James

Michel Bohn wrote:

> When I try and connect to the following url I get the following error.  
> Could someone clarify why?  What am I doing wrong.
> 
> Error Output:
> Init WebdavResource
> invalid port number
> org.apache.commons.httpclient.URIException: invalid port number
>       at org.apache.commons.httpclient.URI.parseAuthority(URI.java:2218)
>       at org.apache.commons.httpclient.URI.parseUriReference(URI.java:1961)
>       at org.apache.commons.httpclient.HttpURL.<init>(HttpURL.java:379)
>       at org.apache.commons.httpclient.HttpURL.<init>(HttpURL.java:207)
>       at 
> org.apache.webdav.lib.WebdavResource.isTheClient(WebdavResource.java:1104)
>       at 
> org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1130)
>       at 
> org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1118)
>       at 
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3170) 
> 
>       at 
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3145) 
> 
>       at 
> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:879)
>       at 
> org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:824) 
> 
>       at 
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1746) 
> 
>       at 
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1156)
>       at 
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1175)
>       at 
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1261)
>       at 
> org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:274)
>       at Httpmail.init(Httpmail.java:52)
>       at Httpmail.<init>(Httpmail.java:30)
>       at propFindTest.main(propFindTest.java:8)
> java.lang.Exception: invalid port number
>       at Httpmail.<init>(Httpmail.java:32)
>       at propFindTest.main(propFindTest.java:8)
> Oops, got a problem invalid port number
> 
>   private String password = "xxxxxxxx";
>   private String url = "http://oe.hotmail.com/cgi-bin/hmdata";
>   private String user = "xxxxxxxx@hotmail.com";
>      private WebdavResource wdr = null;
>   private HttpURL HUrl;
>   private HttpClient client;
>   private HttpMethod method;
>      public Httpmail() throws Exception {
>       try {
>           System.out.println("init " + url + " " + user + " " +password);
>           init(url, user, password);
>       } catch (Exception e) {
>           throw new Exception(e.getMessage());
>       }
>   }
>      public void init(String url, String usr, String pass) throws 
> Exception {
>              HUrl = new HttpURL(url);
>       HUrl.setUserinfo(usr, pass);
>              //set request headers
>       System.out.println("Init WebdavResource");
>              try {
>           wdr = new WebdavResource(HUrl); <-- *dies here!!!!*
>           wdr.proppatchMethod("Host", "services.msn.com");
>           wdr.proppatchMethod("Content-Length", "XXXX");
>           wdr.proppatchMethod("Connection",  "Close");
>           wdr.proppatchMethod("User-Agent", "Outlook Express/5.0 (MSIE 
> 5.0; Windows 98; DigExt; MSNIA)");
>           wdr.proppatchMethod("Content-Type", "text/xml");
>       } catch (Exception e) {
>           System.out.println(e.getMessage());
>           e.printStackTrace();
>           throw new Exception(e.getMessage());
>       }
>   }
> 
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: PLEASE HELP WebdavResource init error, invalid port number

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
Please try out Slide 2.1-beta1 to see if the problem still exists.

Ingo

> When I try and connect to the following url I get the following error.  
> Could someone clarify why?  What am I doing wrong.
> 
> Error Output:
> Init WebdavResource
> invalid port number
> org.apache.commons.httpclient.URIException: invalid port number
>        at org.apache.commons.httpclient.URI.parseAuthority(URI.java:2218)
>        at org.apache.commons.httpclient.URI.parseUriReference(URI.java:1961)
>        at org.apache.commons.httpclient.HttpURL.<init>(HttpURL.java:379)
>        at org.apache.commons.httpclient.HttpURL.<init>(HttpURL.java:207)
>        at 
> org.apache.webdav.lib.WebdavResource.isTheClient(WebdavResource.java:1104)
>        at 
> org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1130)
>        at 
> org.apache.webdav.lib.WebdavResource.setClient(WebdavResource.java:1118)
>        at 
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3170)
>        at 
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3145)
>        at 
> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:879)
>        at 
> org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:824)
>        at 
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1746)
>        at 
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1156)
>        at 
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1175)
>        at 
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1261)
>        at 
> org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:274)
>        at Httpmail.init(Httpmail.java:52)
>        at Httpmail.<init>(Httpmail.java:30)
>        at propFindTest.main(propFindTest.java:8)
> java.lang.Exception: invalid port number
>        at Httpmail.<init>(Httpmail.java:32)
>        at propFindTest.main(propFindTest.java:8)
> Oops, got a problem invalid port number
> 
>    private String password = "xxxxxxxx";
>    private String url = "http://oe.hotmail.com/cgi-bin/hmdata";
>    private String user = "xxxxxxxx@hotmail.com";
>       private WebdavResource wdr = null;
>    private HttpURL HUrl;
>    private HttpClient client;
>    private HttpMethod method;
>       public Httpmail() throws Exception {
>        try {
>            System.out.println("init " + url + " " + user + " " +password);
>            init(url, user, password);
>        } catch (Exception e) {
>            throw new Exception(e.getMessage());
>        }
>    }
>       public void init(String url, String usr, String pass) throws Exception 
> {
>               HUrl = new HttpURL(url);
>        HUrl.setUserinfo(usr, pass);
>               //set request headers
>        System.out.println("Init WebdavResource");
>               try {
>            wdr = new WebdavResource(HUrl); <-- *dies here!!!!*
>            wdr.proppatchMethod("Host", "services.msn.com");
>            wdr.proppatchMethod("Content-Length", "XXXX");
>            wdr.proppatchMethod("Connection",  "Close");
>            wdr.proppatchMethod("User-Agent", "Outlook Express/5.0 (MSIE 5.0; 
> Windows 98; DigExt; MSNIA)");
>            wdr.proppatchMethod("Content-Type", "text/xml");
>        } catch (Exception e) {
>            System.out.println(e.getMessage());
>            e.printStackTrace();
>            throw new Exception(e.getMessage());
>        }
>    }
> 
> _________________________________________________________________
> Don�t just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org