[Oberon] Feedback: WEbDAV via n-o Ver.2001

edgar at edgarschwarz.de edgar at edgarschwarz.de
Tue Nov 25 23:00:09 CET 2003


easlab at absamail.co.za wrote:
> Here's my first connect to WebDAV - from a spare 'safety' partition.
> Connect to ISP and do normal stuff (to confirm ISP connection) then:-
> 1. WebDAVClient.SetTraceLevel 2 ==no feedback
None expected. Configuration command. Do you think something should go to System.Log ?
> 2. DCT.SetHost "webdav.ethz.ch"  ==no feedback
None expected. Configuration command. Do you think something should go to System.Log ?
> 3. Desktops.OpenDoc"http://webdav.ethz.ch/" == see Frame new since last time
> 4. DCT.Propfind ^  <on /temp/WebDAV.Text  etc.  of Frame Received from 3.>
>  == can't see on new Frame: /temp/WebDAV.Text
> try: select "/index.html" and do: DCT.Propfind ^
> == see System.Log trace !!
> select: /ppp/ & do: DCT.Propfind ^ 
> == see System.Log trace !!
I'm not perfectly sure what you did. But if you do a
DCT.Propfind
"/temp" "1" D:getcontentlength D:getlastmodified D:resourcetype ~
You should get the following System.Log trace (Some comments added):
Logging info:
- Request header
{HTTP Client : PROPFIND http://webdav.ethz.ch/temp}
{HTTP Client : Host: webdav.ethz.ch}
{HTTP Client : Depth: 1}
{HTTP Client : Authorization: Basic ...}
{HTTP Client : Content-Type: text/xml; charset="UTF-8"}
{HTTP Client : Content-Length: 178}
{HTTP Client : <?xml version="1.0" encoding="UTF-8" standalone='yes'?>
- Request body
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:getcontentlength/>
<D:getlastmodified/>
<D:resourcetype/>
</D:prop>
</D:propfind>
}
- no.AosTCP.Mod Trace
{Connection.Receive: size, min, read, res 4096    1    1    0}
{Connection.Receive: size, min, read, res 4096    1  180    0}
- Reply header
{HTTP Client : BEGIN HTTP-Reply Header information (25.11.03 22:18:54 )}
{HTTP Client : Status Code:   207 Reason:  Multi-Status}
{HTTP Client : Server: Aos HTTP Server/0.3}
{HTTP Client : Date: Tue, 25 Nov 2003, 22:22:33 GMT}
{HTTP Client : Content-Type: text/xml; charset="UTF-8"}
{HTTP Client : Content-Length: -1}
{HTTP Client : Transfer-Encoding: chunked}
{HTTP Client : END HTTP-Reply Header information}
{HTTP Client : }
{HTTP Client : }
{HTTP Client : HTTP/1.1  207}
- no.AosTCP.Mod Trace
{Connection.Receive: size, min, read, res 4096    1 1608    0}
{Connection.Receive: size, min, read, res 4096    1   44    0}
- Payload: "Directory listing" of http://webdav.ethz.ch/temp/
{HTTP Client : http://webdav.ethz.ch/temp/equal 231 Sat, 22 Nov 2003 23:11:00 GMT}
{HTTP Client : http://webdav.ethz.ch/temp/WebDAVPlugin.Sun 60928 Sun, 05 Oct 2003 13:39:40 GMT}
{HTTP Client : http://webdav.ethz.ch/temp/sub0 0 Wed, 04 Jun 2003 20:56:36 GMT}
{HTTP Client : http://webdav.ethz.ch/temp/WebDAV.Text 11638 Wed, 12 Nov 2003 19:47:48 GMT}
{HTTP Client : http://webdav.ethz.ch/temp/Data.Text 231 Sun, 23 Nov 2003 00:15:10 GMT}
With DCT.Propfind
"/temp/WebDAV.Text" "1" D:getcontentlength D:getlastmodified D:resourcetype "D:creator-displayname" 
	"D:checked-in" "D:checked-out" ~
you should get the following payload:
{HTTP Client : http://webdav.ethz.ch/temp/WebDAV.Text 11638 Wed, 12 Nov 2003 19:47:48 GMT}
{HTTP Client : Edgar Schwarz checked-in /hist/0es.WebDAV.Text.4}

SO DO YOU SEE THIS STUFF ?

IF you get this far you can do WebDAVClient.SetTraceLevel 0 to get less logging noise.
Also you could turn of the trace in no.AosTCP.Mod if you like
and start RTFM meaning browse RFC 2518 WebDAV and RFC 3253 DeltaV.
> Log off ppp.
> 5. System.Directory XmlIn*.Log\d ==
>   XmlIn0.Log  25.11.2003 20:28:30     440
>   XmlIn1.Log  25.11.2003 20:29:57    3851
> 6. EditTools.OpenAscii XmlIn0.Log == see ?xml Frame
> EditTools.OpenAscii XmlIn1.Log == see other ?xml Frame
> 7. Now what ?
> 8. Can n-o view/use the XML files ?
The XML files are the response of the WebDAV server to the request.
For the NO client they are parsed and the payload is shown on System.Log
For Bluebottle there is DAVDocs which gives a nicer output. OTOH
you can do what you like with the raw data given as XML.
Just speak up how you would like to see the data presented. Also porting
DAVDocs from Bluebottle shouldn't be too hard.

> You don't tell which command makes the connection to the server.
> eg. equivalent to: Desktops.OpenDoc"<server>"
> What is the (possible) selection for DCT.Propfind ^ ?
> Is "/temp/WebDAV.Text" 'wired into' your code ?
DCT.Propfind is sortof System.Directory where you can tell which properties
of a file or directory you want to see.

> > > Q1. Which command tries to connect to the server ?
> The most important question - you did not answer.
> > > Q2. Does it normally get a confirmation response ?
> > In HTTP 1.0 you connect anew with any command (E.g. PROPFIND) 
> > and then you will get a response hopefully.
> What is 'PROPFIND' ?  
>    I'm guessing this is a 'command' to be used AFTER connection,
>       analagous to 'Dir' AFTER a ftp connection has been made ?
I tried to answer but perhaps assumed too much background knowledge (Meaning HTTP).
In HTTP 1.0 there are commands like GET, PUT and POST. For every command
your browser sends it connects to the server. After your browser gets his reply
the server closes the connection. This is different from FTP.
I'm careful to say 1.0 because HTTP 1.1 allows to keep a connection open
to use it for followup commands. To keep my WebDAV client simple for now it
closes the connection after each command.
WebDAV commands like PROPFIND, VERSION-CONTROL, CHECKIN, ... are also HTTP commands
so the same applies to them.
That clear ?
But finally again the question: Did you get the stuff in System.Log I showed above ?
Then your client connected and you could go on doing real work after perhaps
reading the documentation in the Bluebottle release of WebDAV also on my homepage.

Regards, Edgar

-- 
edgar at edgarschwarz.de                  "http://www.edgarschwarz.de"
"http://www.edgar-schwarz.de/forum/oberon"    Running Active Oberon
Make it as simple as possible, but not simpler.     Albert Einstein



More information about the Oberon mailing list