Post request by Java code for Rails application

Hi, i am trying to call my Rails app using Java code using Jersey

I m having 2 tables .

Blogposts (id,name,slug,desc) Comments (id,data,node_id,node_type)

I m trying to post a comment through my ruby code.

The Url for me is like

The one is tried is
blogBean = objBlogWrapper.postComment(slug,comment);

public BlogBean postComment(String slug, String comment) {
// Create a multivalued map to store the parameters to be send in
the REST call
MultivaluedMap<String, String> newBlogParam = new
// newBlogParam.add(“blogpost[slug]”, slug);
// newBlogParam.add(“comment[data]”, comment);
newBlogParam.add(“slug”, slug);
newBlogParam.add(“comment”, comment);

BlogBean blogBean = null;
try {
    blogBean =


}catch (UniformInterfaceException uie) {
    if (uie.getResponse().getStatus() == 401) {
        System.out.println("Can not authenticate user

"+ConfigurationUtil.userName +
“. Please check your username/password and
try again.” );
} else {
System.out.println("Error when trying to talk to app. " +
"HTTP status code
"+uie.getResponse().getStatus()+“returned. Finishing.”);

    return null;
} catch (ClientHandlerException che) {
    System.out.println("Error when trying to talk toapp. Network

issues? " +
"Please check the following message and try
again later: "+che.getMessage());
return null;
return blogBean;

where my ConfigurationUtil.POST_COMMENT=“api/blogs/comment.xml”;

The above doesnt show me any error nor the comment is posted …

Please give suggestions.