List of usage examples for javax.xml.ws Dispatch invokeAsync
public Response<T> invokeAsync(T msg);
From source file:org.ebayopensource.turmeric.runtime.tests.common.sif.tester.ServicePayloadExecutor.java
@SuppressWarnings({ "rawtypes", "unchecked" })
private void invokeAsyncPull(ExecutionScope scope, Service svc, List<Object> outParams) throws Exception {
Dispatch dispatch = null;
Response response = null;/*from w ww . j a va2s . c o m*/
Object obj = null;
try {
dispatch = svc.createDispatch(operationName);
if (useInParams) {
response = dispatch.invokeAsync(message);
} else {
response = dispatch.invokeAsync(null);
}
while (!response.isDone()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
break;
}
}
obj = response.get();
outParams.add(obj);
assertNotExpectingException();
if (assertPayload != null) {
byte payload[] = (byte[]) response.getContext().get("PAYLOAD");
assertPayload.assertPayload(scope, svc, payload);
}
if (assertResponse != null) {
assertResponse.assertResponse(scope, svc, new ResponseAssertableResponse(response));
}
} finally {
}
}