Peace,
R:
>
> Exception in thread "main"
> org.osaf.caldav4j.exceptions.CalDAV4JException: Unexpected status
> code: 400
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>400 Bad Request</title>
> </head><body>
> <h1>Bad Request</h1>
> <p>Your browser sent a request that this server could not
> understand.<br />
> </p>
> </body></html>
>
> at
> org.osaf.caldav4j.CalDAVCalendarCollection.addEvent(CalDAVCalendarCollection.java:
> 292)
> at
> org.osaf.caldav4j.example.CalDavCollectionManager.addEvent(CalDavCollectionManager.java:
> 214)
> at
> org.osaf.caldav4j.example.CalDavCollectionManager.main(CalDavCollectionManager.java:
> 359)
> ------------------------------------------------------------------------
>
> Imran zaffar
>
> --
> You received this message because you are subscribed to the Google Groups "caldav4j" group.
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to caldav4j+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/caldav4j?hl=en.
>
> To unsubscribe from this group, send email to caldav4j+unsubscribe@googlegroups.com.
If you don't know HTTP take an hour to learn about HTTP.
If you don't know TCP/IP...well, you just need to know what ip and ports are :P
> so i don't know how to
> dump my request
search http.wire on this list or on google. It's enabled by default in
junit, so you just have to see eclipse console log.
Otherwise you can use wireshark or tcpdump do play the game.
If you don't use eclipse/netbeans...use eclipse/netbeans and you'll
save a lot of days :P
Can't say it from code. Dump the request and let me know.
Peace,
R.
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/J5xjvBvEF7AJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
> caldav4j+u...@googlegroups.com.
Ok, now I just need:
1- the path of the request (should be a couple of lines before the request)
2 - the response.
Peace,
R.
>> > caldav4j+u...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/caldav4j?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/X3hyWRQUngsJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
> caldav4j+u...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/caldav4j?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/X3hyWRQUngsJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
try to add a "/" before collection...like
PUT /collection/javadive/events/20120419T201521-2951d733-e44e-4350-9905-7022e2155cf8-javadive.ics
There should be a CaldavCredential test class...I can't see the full
path in your request.
Check it!
public String host = "hub.chandlerproject.org";
public int port = 443;
public String protocol = "https";
public String user = "caldav4j";
public String home = "/dav/"+user+"/";
public String password = "CalDAV4J";
public String collection = "collection_rpolli/";
>> >> > caldav4j+u...@googlegroups.com.
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/caldav4j?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "caldav4j" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/caldav4j/-/X3hyWRQUngsJ.
>> >
>> > To post to this group, send email to cald...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > caldav4j+u...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/caldav4j?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/1HClKFAzSYYJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
> caldav4j+u...@googlegroups.com.
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/caldav4j?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "caldav4j" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/caldav4j/-/X3hyWRQUngsJ.
>> >
>> > To post to this group, send email to cald...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > For more options, visit this group at
>> > http://groups.google.com/group/caldav4j?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/1HClKFAzSYYJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
The /dav/ string should appear in the PUT request, just after the PUT word.
I can't see it in your request.
Peace,
R.
>> >> >> > caldav4j+u...@googlegroups.com.
>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/caldav4j?hl=en.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups
>> >> > "caldav4j" group.
>> >> > To view this discussion on the web visit
>> >> > https://groups.google.com/d/msg/caldav4j/-/X3hyWRQUngsJ.
>> >> >
>> >> > To post to this group, send email to cald...@googlegroups.com.
>> >> > To unsubscribe from this group, send email to
>> >> > caldav4j+u...@googlegroups.com.
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/caldav4j?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "caldav4j" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/caldav4j/-/1HClKFAzSYYJ.
>> >
>> > To post to this group, send email to cald...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > caldav4j+u...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/caldav4j?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/bAHqy-E2KXQJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
> caldav4j+u...@googlegroups.com.
>> >> >> > caldav4j+unsubscribe@googlegroups.com.
>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/caldav4j?hl=en.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups
>> >> > "caldav4j" group.
>> >> > To view this discussion on the web visit
>> >> > https://groups.google.com/d/msg/caldav4j/-/X3hyWRQUngsJ.
>> >> >
>> >> > To post to this group, send email to cald...@googlegroups.com.
>> >> > To unsubscribe from this group, send email to
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/caldav4j?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "caldav4j" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/caldav4j/-/1HClKFAzSYYJ.
>> >
>> > To post to this group, send email to cald...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > For more options, visit this group at
>> > http://groups.google.com/group/caldav4j?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "caldav4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/caldav4j/-/bAHqy-E2KXQJ.
>
> To post to this group, send email to cald...@googlegroups.com.
> To unsubscribe from this group, send email to
Il 19 aprile 2012 18:23, imran zaffar <izaf...@hotmail.com> ha scritto:
> Thank u very much for your reply again, i move one step ahead but it give me
> another exception
>
> Exception in thread "main" org.osaf.caldav4j.exceptions.CalDAV4JException:
> Unexpected status code: 409
> <?xml version='1.0' encoding='UTF-8'?><D:error xmlns:D="DAV:"
> xmlns:cosmo="http://osafoundation.org/cosmo/DAV"><cosmo:conflict>One or more
> intermediate collections must be created</cosmo:conflict></D:error>
It says
"One or more intermediate collections must be created"
Peace,
R.
Imran,
you are trying to create an event in a collection that does not exist.
To learn the difference between collections and event, please check my slides and the rfc.
I suggest you to try to understand the errors and their meaning, otherwise you won't be able to accomplish your task.
--
You received this message because you are subscribed to the Google Groups "caldav4j" group.
To view this discussion on the web visit https://groups.google.com/d/msg/caldav4j/-/PRM6-euGo0MJ.
To post to this group, send email to cald...@googlegroups.com.
To unsubscribe from this group, send email to caldav4j+u...@googlegroups.com.
To unsubscribe from this group, send email to caldav4j+unsubscribe@googlegroups.com.
> Thanks a lot
You welcome ;)
Peace,
R.