Re: [Dspace-tech] LNI/WebDAV : GET returns 501

2008-06-03 Thread Rick Runyan
Thanks a million.  I got lookup and get working today after fooling
around with wget.  I'm glad you told me about not following the
redirects, or I'd have been scratching my head over 400 errors still.

I'm not using PERL; I am using C#.

- Rick

-Original Message-
From: Larry Stone [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2008 1:00 AM
To: Rick Runyan
Cc: dspace-tech@lists.sourceforge.net
Subject: RE: [Dspace-tech] LNI/WebDAV : GET returns 501

You can see how the lookup feature works by using a simple HTTP client
like the GNU "wget" application to do a GET, and reading its diagnostic
output.. for example, this does a lookup of handle 123456789/1
using HTTP Basic authentication to login (assuming you have
username/password
login on your server):

wget [EMAIL PROTECTED] --http-password=PASSWORD -S
http://MYDSPACE.mit.edu:8080/lni/dav/lookup/handle/123456789/1

Now, watch the headers -- the request as a whole will fail because
"wget"
is aggressive about responding to the HTTP 302 status with another GET
on
the real resource, but that GET probably isn't allowed or is missing
some
option.  Anyway, just look for the Location: header in the first
response:

Connecting to rotarran.mit.edu|18.42.4.43|:8080... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 302 These are not the droids you are looking for.
  Set-Cookie:
DSpaceDavAuth=1212468843785!1!18.42.4.8!ac52bf780d4bb6eb486b810a7d
5c4f24; Path=/lni
  Location: http://rotarran.mit.edu:8080/lni/dav/dso_123456789%241
  ^^

  Content-Length: 0
  Date: Tue, 03 Jun 2008 04:54:03 GMT
  Server: Apache-Coyote/1.1
  Connection: Keep-Alive

{Here's the second try, which fails.. ignore it, we've got what we
need.}

Location: http://rotarran.mit.edu:8080/lni/dav/dso_123456789%241
[following]
--00:54:03--  http://rotarran.mit.edu:8080/lni/dav/dso_123456789%241
   => `dso_123456789$1'
Reusing existing connection to rotarran.mit.edu:8080.
HTTP request sent, awaiting response...
  HTTP/1.1 501 GET method not implemented for Community.
  Content-Type: text/html;charset=utf-8
  Content-Length: 1112
  Date: Tue, 03 Jun 2008 04:54:03 GMT
  Server: Apache-Coyote/1.1
  Connection: close
00:54:03 ERROR 501: GET method not implemented for Community..

This ought to show how to implement what you need with Apache HTTPClient
or something like that.

You're not using Perl, are you?  The WebDAV library on CPAN was horribly
broken last I looked, not really usable for this at all.

Also, note that you don't *need* to go through the hierarchy to get at
any Handle in the archive.  If you already have the Handle of the
resource
you're looking for, just do a "lookup" to get its URL and use that.
Traversing the hierarchy is just for exploring, and because it's the
model of HTTP and WebDAV.

-- Larry

> Thanks for the helpful response.  I've still been unable to do a
lookup
> or a get, but I'm concentrating right now on walking through the
> hierarchy to learn what turns up and what kind of properties I'll
find.
> When I get comfortable with that, I'll re-read your message and try
> again.
>
> - Rick
>


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] LNI/WebDAV : GET returns 501

2008-06-02 Thread Larry Stone
You can see how the lookup feature works by using a simple HTTP client
like the GNU "wget" application to do a GET, and reading its diagnostic
output.. for example, this does a lookup of handle 123456789/1
using HTTP Basic authentication to login (assuming you have username/password
login on your server):

wget [EMAIL PROTECTED] --http-password=PASSWORD -S 
http://MYDSPACE.mit.edu:8080/lni/dav/lookup/handle/123456789/1

Now, watch the headers -- the request as a whole will fail because "wget"
is aggressive about responding to the HTTP 302 status with another GET on
the real resource, but that GET probably isn't allowed or is missing some
option.  Anyway, just look for the Location: header in the first response:

Connecting to rotarran.mit.edu|18.42.4.43|:8080... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 302 These are not the droids you are looking for.
  Set-Cookie: DSpaceDavAuth=1212468843785!1!18.42.4.8!ac52bf780d4bb6eb486b810a7d
5c4f24; Path=/lni
  Location: http://rotarran.mit.edu:8080/lni/dav/dso_123456789%241
  ^^

  Content-Length: 0
  Date: Tue, 03 Jun 2008 04:54:03 GMT
  Server: Apache-Coyote/1.1
  Connection: Keep-Alive

{Here's the second try, which fails.. ignore it, we've got what we need.}

Location: http://rotarran.mit.edu:8080/lni/dav/dso_123456789%241 [following]
--00:54:03--  http://rotarran.mit.edu:8080/lni/dav/dso_123456789%241
   => `dso_123456789$1'
Reusing existing connection to rotarran.mit.edu:8080.
HTTP request sent, awaiting response...
  HTTP/1.1 501 GET method not implemented for Community.
  Content-Type: text/html;charset=utf-8
  Content-Length: 1112
  Date: Tue, 03 Jun 2008 04:54:03 GMT
  Server: Apache-Coyote/1.1
  Connection: close
00:54:03 ERROR 501: GET method not implemented for Community..

This ought to show how to implement what you need with Apache HTTPClient
or something like that.

You're not using Perl, are you?  The WebDAV library on CPAN was horribly
broken last I looked, not really usable for this at all.

Also, note that you don't *need* to go through the hierarchy to get at
any Handle in the archive.  If you already have the Handle of the resource
you're looking for, just do a "lookup" to get its URL and use that.
Traversing the hierarchy is just for exploring, and because it's the
model of HTTP and WebDAV.

-- Larry

> Thanks for the helpful response.  I've still been unable to do a lookup
> or a get, but I'm concentrating right now on walking through the
> hierarchy to learn what turns up and what kind of properties I'll find.
> When I get comfortable with that, I'll re-read your message and try
> again.
>
> - Rick
>


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


Re: [Dspace-tech] LNI/WebDAV : GET returns 501

2008-06-02 Thread Rick Runyan
Larry -

Thanks for the helpful response.  I've still been unable to do a lookup
or a get, but I'm concentrating right now on walking through the
hierarchy to learn what turns up and what kind of properties I'll find.
When I get comfortable with that, I'll re-read your message and try
again.

- Rick

-Original Message-
From: Larry Stone [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2008 4:54 PM
To: Rick Runyan
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] LNI/WebDAV : GET returns 501

GET only works on Items and Bitstreams, so if you get the resource path
to a Bitstream from PROPFIND (depth=1) on an Item, then you ought to be
able
to do a GET on it and receive its contents.

This path looks like you've traversed some communities and collections:

>
http://[server]:8080/lni/dav/dso_123456789%241/dso_123456789%242/dso_123
456789%243

You can also get a resource URL by doing a "lookup" on a Handle, e.g.
GET
on http://[server]:8080/lni/dav/lookup/handle/123456789/42
returns a Location: header with the URL.  I don't think it works on
Bitstreams, though.

Anyway, if you do a PROPFIND on that resource you're trying to GET, look
at the value for "type" (in the "http://www.dspace.org/xmlns/dspace";
namespace).
It'll be an empty element for the DSpace object type, either
,
, , 

Typically, the Bitstream resources have a path ending in
  /bitstream_{n}.{suffix}, e.g.  .../bitstream_3.pdf

So, I think the problem here is that you've got a resource for which
GET isn't implemented.

For some sketchy doc which is unfortunately the best available, see
http://web.mit.edu/lcs/www/lni/

-- Larry

> I've finally figured out how to hook up a .NET app to LNI and am
running
> some exploratory tests, using straight HTTP/DAV rather than SOAP. =20
>
> Alas, GET doesn't seem to work.  I've done a propfind call to get URIs
> for the bitstreams in a collection, but when I try to GET one of them,
I
> get
>
> =20
>
> System.ApplicationException: Error trying to GET
>
http://[server]:8080/lni/dav/dso_123456789%241/dso_123456789%242/dso_123
> 456789%243 --->=20
>
> System.Net.WebException: The remote server returned an error: (501)
Not
> Implemented.
>
>  at System.Net.HttpWebRequest.GetResponse()
>
> =20
>
> I am unfamiliar with Axis web services, so I'm having to learn
> everything as I go, which slows me down a lot.
>
> This entry in server-config.wsdd listing "allowedMethods" looks
> suspicious to me
>
>  
>
>  lookup
> copy"/>
>
>  value=3D"org.dspace.app.dav.LNISoapServlet"/>
>
>  
>
> But the web.xml file has a different class
> (org.dspace.app.dav.DAVServlet) set up to respond to /dav URIs, so I
> suspect that's not my problem.
>
> =20
>
> - Rick
>
> =20
>
> =20
>
>
> --_=_NextPart_001_01C8C190.AFE31B16
> Content-Type: text/html;
>   charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
>  xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
> xmlns=3D"http://www.w3.org/TR/REC-html40";>
>
> 
>  charset=3Dus-ascii">
> 
> 
> <!--
>  /* Font Definitions */
>  @font-face
>   {font-family:"Californian FB";
>   panose-1:2 7 4 3 6 8 11 3 2 4;}
>  /* Style Definitions */
>  p.MsoNormal, li.MsoNormal, div.MsoNormal
>   {margin:0in;
>   margin-bottom:.0001pt;
>   font-size:12.0pt;
>   font-family:"Times New Roman";}
> a:link, span.MsoHyperlink
>   {color:blue;
>   text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
>   {color:purple;
>   text-decoration:underline;}
> span.EmailStyle17
>   {mso-style-type:personal-compose;
>   font-family:"Californian FB";
>   color:windowtext;
>   font-weight:normal;
>   font-style:normal;
>   text-decoration:none none;}
> @page Section1
>   {size:8.5in 11.0in;
>   margin:1.0in 1.25in 1.0in 1.25in;}
> div.Section1
>   {page:Section1;}
> -->
> 
>
> 
>
> 
>
> 
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>I’ve finally figured out
how =
> to hook
> up a .NET app to LNI and am running some exploratory tests, using =
> straight
> HTTP/DAV rather than SOAP.  
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>Alas, GET doesn’t seem to
> work.  I’ve done a propfind call to get URIs for the =
> bitstreams in a
> collection, but when I try to GET one of them, I =
> get
>
>  style=3D'font-size:
> 11.0pt;font-family:"C

Re: [Dspace-tech] LNI/WebDAV : GET returns 501

2008-05-29 Thread Larry Stone
GET only works on Items and Bitstreams, so if you get the resource path
to a Bitstream from PROPFIND (depth=1) on an Item, then you ought to be able
to do a GET on it and receive its contents.

This path looks like you've traversed some communities and collections:

> http://[server]:8080/lni/dav/dso_123456789%241/dso_123456789%242/dso_123456789%243

You can also get a resource URL by doing a "lookup" on a Handle, e.g. GET
on http://[server]:8080/lni/dav/lookup/handle/123456789/42
returns a Location: header with the URL.  I don't think it works on
Bitstreams, though.

Anyway, if you do a PROPFIND on that resource you're trying to GET, look
at the value for "type" (in the "http://www.dspace.org/xmlns/dspace"; namespace).
It'll be an empty element for the DSpace object type, either ,
, , 

Typically, the Bitstream resources have a path ending in
  /bitstream_{n}.{suffix}, e.g.  .../bitstream_3.pdf

So, I think the problem here is that you've got a resource for which
GET isn't implemented.

For some sketchy doc which is unfortunately the best available, see
http://web.mit.edu/lcs/www/lni/

-- Larry

> I've finally figured out how to hook up a .NET app to LNI and am running
> some exploratory tests, using straight HTTP/DAV rather than SOAP. =20
>
> Alas, GET doesn't seem to work.  I've done a propfind call to get URIs
> for the bitstreams in a collection, but when I try to GET one of them, I
> get
>
> =20
>
> System.ApplicationException: Error trying to GET
> http://[server]:8080/lni/dav/dso_123456789%241/dso_123456789%242/dso_123
> 456789%243 --->=20
>
> System.Net.WebException: The remote server returned an error: (501) Not
> Implemented.
>
>  at System.Net.HttpWebRequest.GetResponse()
>
> =20
>
> I am unfamiliar with Axis web services, so I'm having to learn
> everything as I go, which slows me down a lot.
>
> This entry in server-config.wsdd listing "allowedMethods" looks
> suspicious to me
>
>  
>
>  lookup
> copy"/>
>
>  value=3D"org.dspace.app.dav.LNISoapServlet"/>
>
>  
>
> But the web.xml file has a different class
> (org.dspace.app.dav.DAVServlet) set up to respond to /dav URIs, so I
> suspect that's not my problem.
>
> =20
>
> - Rick
>
> =20
>
> =20
>
>
> --_=_NextPart_001_01C8C190.AFE31B16
> Content-Type: text/html;
>   charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
>  xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
> xmlns=3D"http://www.w3.org/TR/REC-html40";>
>
> 
>  charset=3Dus-ascii">
> 
> 
> 
> 
>
> 
>
> 
>
> 
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>I’ve finally figured out how =
> to hook
> up a .NET app to LNI and am running some exploratory tests, using =
> straight
> HTTP/DAV rather than SOAP.  
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>Alas, GET doesn’t seem to
> work.  I’ve done a propfind call to get URIs for the =
> bitstreams in a
> collection, but when I try to GET one of them, I =
> get
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'> 
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>System.ApplicationException: Error =
> trying
> to GET =
> http://[server]:8080/lni/dav/dso_123456789%241/dso_123456789%242/dso_1234=
> 56789%243
> ---> 
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>System.Net.WebException: The remote =
> server
> returned an error: (501) Not Implemented.
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>     at
> System.Net.HttpWebRequest.GetResponse()
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'> 
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>I am unfamiliar with Axis web =
> services, so
> I’m having to learn everything as I go, which slows me down a =
> lot.
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>This entry in server-config.wsdd =
> listing “allowedMethods”
> looks suspicious to me
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>  name=3D"DSpaceLNI" =
> provider=3D"java:RPC">
>
>  style=3D'font-size:
> 11.0pt;font-family:"Californian FB"'>     name=3D"allowedMethods" value=3D"pr

[Dspace-tech] LNI/WebDAV : GET returns 501

2008-05-29 Thread Rick Runyan
I've finally figured out how to hook up a .NET app to LNI and am running
some exploratory tests, using straight HTTP/DAV rather than SOAP.  

Alas, GET doesn't seem to work.  I've done a propfind call to get URIs
for the bitstreams in a collection, but when I try to GET one of them, I
get

 

System.ApplicationException: Error trying to GET
http://[server]:8080/lni/dav/dso_123456789%241/dso_123456789%242/dso_123
456789%243 ---> 

System.Net.WebException: The remote server returned an error: (501) Not
Implemented.

 at System.Net.HttpWebRequest.GetResponse()

 

I am unfamiliar with Axis web services, so I'm having to learn
everything as I go, which slows me down a lot.

This entry in server-config.wsdd listing "allowedMethods" looks
suspicious to me

 





 

But the web.xml file has a different class
(org.dspace.app.dav.DAVServlet) set up to respond to /dav URIs, so I
suspect that's not my problem.

 

- Rick

 

 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech