Not able to access Process Suite web services.

Options

Hi,
I'm making an application to consume the Process Suite Web Services. The steps I have done are as follows

  1. Installed AppWorks.
  2. Installed Process Platform (10.7)
  3. Deployed Process Suite REST Client into AppWorks(Copied the BPMService.war extract into TOMCAT_INSTALL_DIR/webapps).
  4. Updated rest.properties pointing to Process Platform
  5. Created an App with the code to login and to call a service. The Code is as follows
    JavaScript Code

(function ($) {

// Keep strict JavaScript standards

"use strict";
var request = new XMLHttpRequest();

request.open("POST", "http://192.168.2.101:8080/BPMService/v1/login", false );

request.setRequestHeader("user_id","dev");

request.setRequestHeader("password","dev");

request.setRequestHeader("Content-Type","text/plain");

request.send(null);

var samlartifact = request.responseText;

$( '#error-msg' ).append( ' Login Respone:' + samlartifact + '' );

var xmlrequest="cn=dev,cn=organizational users,o=system,cn=cordys,cn=OPC_10_6_7,o=opentext.netUI_TASK ";

request = new XMLHttpRequest();<br/>
request.open("POST", "http://192.168.2.101:8080/BPMService/v1/tasks/getTasksForUser", false );<br/>
request.setRequestHeader("SAMLart",samlartifact);   <br/>
request.setRequestHeader("Content-Type","application/xml"); <br/>
request.send(xmlrequest);<br/>
$( '#error-msg1' ).append( '<div class="error"> Method Respone:' + request.responseText + '</div>' );<br/>

}).call(this, jQuery);

6. When I execute this App, I'm getting the SAMLArt in the response but when I execute the second request, I'm always getting "The request sent by the client was syntactically incorrect."

I tried even the same from SOAP UI, there also I'm getting same issue. Could someone please help me to fix this issue?

I referred following links

  1. Invoking Process Suite REST API
  2. Process Suite REST API Reference

Thanks & Regards

Suresh.