Thanks for both of your responses.  I got the body to set correctly.

I am really struggling here. I am sure you both have been to the point where even pounding your head on the wall doesn't work. Could you provide me with a snippet of code that would create a request like the one below. The default properties don't work for this server so it fails. I can't find any working examples on the web and don't want to have to extend any classes if I don't have to.

It seems that if I set up my resource

wdr = new WebdavResource(HUrl);

it uses the DEFAULT action to set properties. You can also specify ALL and BASIC and maybe a few others when instantiating. What if those aren't what I need? I must not be understanding this properly, It can't be this difficult. I have custom properties that need to be set for the instatiating of the webdavresource.

***THIS IS WHAT MY INITIAL REQUEST SHOULD LOOK LIKE***
PROPFIND /svcs/hotmail/httpmail.asp HTTP/1.1\r\n
Host: services.msn.com\r\n
Content-Length: 343\r\n
Content-Type: text/xml\r\n
User-Agent: Outlook Express/5.5 (MSIE 5.0; Windows 98; TmstmpExt)\r\n
\r\n

<?xml version="1.0"?>
<D:propfind xmlns:D="DAV:" xmlns:h="http://schemas.microsoft.com/hotmail/"; xmlns:hm="urn:schemas:httpmail:">
\t<D:prop>
\t\t<h:adbar/>
\t\t<hm:contacts/>
\t\t<hm:inbox/>
\t\t<hm:outbox/>
\t\t<hm:sendmsg/>
\t\t<hm:sentitems/>
\t\t<hm:deleteditems/>
\t\t<hm:drafts/>
\t\t<hm:msgfolderroot/>
\t\t<h:maxpoll/>
\t\t<h:sig/>
\t</D:prop>
</D:propfind>


***THIS IS WHAT IT LOOKS LIKE ***
PROPFIND /cgi-bin/hmdata HTTP/1.1
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: oe.hotmail.com
Content-Length: 207
Depth: 0

<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
   <D:prop>
       <D:displayname/>
       <D:getcontentlength/>
       <D:getcontenttype/>
       <D:resourcetype/>
       <D:getlastmodified/>
       <D:lockdiscovery/>
   </D:prop>
</D:propfind>

Thank you for your patience.
Michel Bohn

James Mason wrote:

Ya, it's strange that there's a Content-Length header but no body
information. Maybe try specifying the properties you want when you make
your propfind request. The first step is going to be getting an actual
request body to be generated. Then you can work on getting it looking right.


-James

Ingo Brunberg wrote:

You can of course request those custom properties with WebdavResource.

But I guess your problem is still not solved. If you have a look at
the request you generated you will see that it is missing the request
body. You got a URIException, right? So again, please check your
username.

Ingo


James,

Thanks for your response on the webdavResource error (previous post title ->
Re: PLEASE HELP WebdavResource init error, invalid port number.) I
monitored the packets using Ethereal and found that my request and the
request the webdav server wants were different. My inital request has to
have xml data as indicated below as well as some properties that are
different from the 'vanilla' properties that are passed to the webdav server
when the resource is constructed. Do I have to extend the session and
create my own resource to accomplish this or can I use the webdavResource?
Or in other words.....


HOW DO I GET FROM HERE (My current request)-->

Hypertext Transfer Protocol
   PROPFIND /cgi-bin/hmdata HTTP/1.1\r\n
       Request Method: PROPFIND
   Authorization: Basic Ym9obm1hbkBob3RtYWlsLmNvbTpsb3ZlMWRheQ==\r\n
       Credentials: [EMAIL PROTECTED]:xxxxxxx
   Content-Type: text/xml; charset=utf-8\r\n
   User-Agent: Jakarta Commons-HttpClient/2.0final\r\n
   Host: oe.hotmail.com\r\n
   Content-Length: 207\r\n
   Depth: 0\r\n
   \r\n

TO HERE? -->

Hypertext Transfer Protocol
PROPFIND /svcs/hotmail/httpmail.asp HTTP/1.1\r\n
Request Method: PROPFIND
Host: services.msn.com\r\n
Content-Length: 343\r\n
Content-Type: text/xml\r\n
User-Agent: Outlook Express/5.5 (MSIE 5.0; Windows 98; TmstmpExt)\r\n
\r\n
Line-based text data: text/xml
<?xml version="1.0"?>
<D:propfind xmlns:D="DAV:"
xmlns:h="http://schemas.microsoft.com/hotmail/";
xmlns:hm="urn:schemas:httpmail:">
\t<D:prop>
\t\t<h:adbar/>
\t\t<hm:contacts/>
\t\t<hm:inbox/>
\t\t<hm:outbox/>
\t\t<hm:sendmsg/>
\t\t<hm:sentitems/>
\t\t<hm:deleteditems/>
\t\t<hm:drafts/>
\t\t<hm:msgfolderroot/>
\t\t<h:maxpoll/>
\t\t<h:sig/>
\t</D:prop>
</D:propfind>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to