@SuppressWarnings("unchecked") public T get() throws InterruptedException, ExecutionException { return (T)callback.get()[0]; } @SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return (T)callback.get(timeout, unit)[0]; } public boolean isCancelled() {
@SuppressWarnings("unchecked") public T get() throws InterruptedException, ExecutionException { return (T)callback.get()[0]; } @SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return (T)callback.get(timeout, unit)[0]; } public boolean isCancelled() {
Object[] result = callback.get(asyncTimeout, TimeUnit.SECONDS); Map<String, Object> output = new HashMap<String, Object>();
Object[] result = callback.get(asyncTimeout, TimeUnit.SECONDS); Map<String, Object> output = new HashMap<String, Object>();
@Test public void testInvocation() throws Exception { JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); URL wsdlURL = new URL("http://localhost:" + PORT + "/NoBodyParts/NoBodyPartsService?wsdl"); Client client = dcf.createClient(wsdlURL); byte[] bucketOfBytes = IOUtils.readBytesFromStream(getClass().getResourceAsStream("/wsdl/no_body_parts.wsdl")); Operation1 parameters = new Operation1(); parameters.setOptionString("opt-ion"); parameters.setTargetType("tar-get"); Object[] rparts = client.invoke("operation1", parameters, bucketOfBytes); Operation1Response r = (Operation1Response)rparts[0]; assertEquals(md5(bucketOfBytes), r.getStatus()); ClientCallback callback = new ClientCallback(); client.invoke(callback, "operation1", parameters, bucketOfBytes); rparts = callback.get(); r = (Operation1Response)rparts[0]; assertEquals(md5(bucketOfBytes), r.getStatus()); }