odt.setAsReference(true);
ResponseFormType responseForm = wps.createResponseForm(doc, null);
exeRequest.setResponseForm(responseForm);
// send the request
ExecuteProcessResponse response = wps.issueRequest(exeRequest);
// response should not be null and no exception should occur.
assertNotNull(response);
// we should get a raw response, no exception, no response document
ExecuteResponseType executeResponse = response.getExecuteResponse();
assertNotNull(executeResponse);
// loop and wait for the process to be complete
while(executeResponse.getStatus().getProcessFailed() == null
&& executeResponse.getStatus().getProcessSucceeded() == null) {
String location = executeResponse.getStatusLocation();
URL url = new URL(location);
response = wps.issueStatusRequest(url);
executeResponse = response.getExecuteResponse();
assertNotNull(executeResponse);
}
// check result correctness
assertEquals(1, executeResponse.getProcessOutputs().getOutput().size());