AnsweredAssumed Answered

Unable to call assign workflow

Question asked by veena16 on Feb 7, 2012
Latest reply on Mar 7, 2012 by ddraper
Hi all,

I have taken RemoteClient Java file, to call alfresco services and get the responce.

I tried with this service "http://localhost:8080/alfresco/service/api/login?u=admin&pw=admin" , I got the xml response as Ticket.

Next, I would like to access assign workflow service like below code……..

    String st2 = "http://localhost:8080/alfresco/service/slingshot/doclib/action/assign-workflow?alf_ticket='+ticket+";
   
    RemoteClientTest rct1 = new RemoteClientTest(st2);
    rct1.setRequestMethod(HttpMethod.POST);
    Map<String, String> requestProperties = new HashMap<String, String>();
    requestProperties.put("date",
                          "Wed Feb 08 2012 00:00:00 GMT+0530 (India Standard Time)");
    requestProperties.put("description", "success");
    requestProperties.put("nodeRefs",
                          "workspace://SpacesStore/5a782342-e2c2-434b-a169-75f1808ab46c");
    requestProperties.put("people", "admin");
    requestProperties.put("id", "Ask Flow.doc");
    requestProperties.put("type", "wf:review");
    rct1.setRequestProperties(requestProperties);
    rct1.endpoint = st2;
    resp = rct1.call(st2);

  I'm getting empty response…..

Please tell me any wrong in the code and need to pass more parameters….suggest me.

And also……

  Can anyone tell me, how to access alfresco webservices from other web application using normal javascript(using jquery) or java file. Could please provide   sample application(not using surf implememtation)

Thank you a lot in advanced
Regards,

Outcomes