I am trying to create a community activity using API and Abdera. I am using Abdera Client to post an entry to a uri.
The entry doucment to be posted is genearted using the following code
public static Entry generateActivitydefination(){
Abdera abdera=new Abdera();
Entry entry=abdera.getFactory().newEntry();
entry.setId(createCommunityActivityLink);
entry.addCategory("
http://www.ibm.com/xmlns/prod/sn/type","community_activity","Community Activity");
entry.setTitle(activityName);
entry.setContent("my activity", "application/atom+xml");
return entry;
}
the xml posted is below
<entry xmlns="http://www.w3.org/2005/Atom">
<id>
http://comm02.********/activities/service/atom2/service?commUuid=1d85786d-bd6d-4954-89f0-e8d0e1ddbb6d</id>
<category term="community_activity" scheme="http://www.ibm.com/xmlns/prod/sn/type" label="Community Activity"></category>
<title type="text">My Activity</title><content type="application/atom+xml"></content></entry>
code to post
ClientResponse resp1=abclient.post(
http://comm02.******/activities/service/atom2/service?commUuid=1d85786d-bd6d-4954-89f0-e8d0e1ddbb6d, generateActivitydefination());
System.out.println(resp1.getStatus());
I get the following in the log
org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
302
even after changing the url to post to i still get the same error
Any advice will be highly appreciated