Hi friends,
i'm new to RESTful services, i want to make a client for some services,i have the curl command and want to write them in java using jersey, you can see the curl commands and my java codes follow,please tell me how can i correct my codes:
the first one:
curl command:
Code:
curl -i -X POST --data "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&path=/contenthubfeedtest&recursive=true" http://dev.iks-project.eu:8081/cmsadapter/contenthubfeed
my java code(the first parameter in post method is the endpoint,second the data that should be posted and the last is the accept media type)
Code:
public static void submitContentItem(String sessionKey){
        
        String url="http://dev.iks-project.eu:8081/cmsadapter/contenthubfeed?sessionKey="+sessionKey;
        ClientResponse response=post(url, sessionKey, "application/rdf+xml");
        
    }
and the second one:
curl command:
Code:
curl -i -X POST -d "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&baseURI=http://www.apache.org/stanbol/cms&store=true" http://dev.iks-project.eu:8081/cmsadapter/map/cms
my java code for it:
Code:
public static void mapRepositoryToRDF(String sessionKey){
        
        String url="http://dev.iks-project.eu:8081/cmsadapter/map/cms";
        ClientResponse response=StanbolClient.post(url, sessionKey, "application/rdf+xml");
    }
[HTML][/HTML]