use of org.apache.cxf.no_body_parts.types.Operation1Response in project cxf by apache.
the class JaxWsDynamicClientTest method testInvocation.
@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());
}
Aggregations