本文整理了Java中javax.xml.ws.Dispatch.invokeAsync()
方法的一些代码示例,展示了Dispatch.invokeAsync()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dispatch.invokeAsync()
方法的具体详情如下:
包路径:javax.xml.ws.Dispatch
类名称:Dispatch
方法名:invokeAsync
[英]Invoke a service operation asynchronously. The method returns without waiting for the response to the operation invocation, the results of the operation are obtained by polling the returned Response.
The client is responsible for ensuring that the msg object when marshalled is formed according to the requirements of the protocol binding in use.
[中]异步调用服务操作。方法返回而不等待对操作调用的响应,操作的结果通过轮询返回的响应获得。
客户机负责确保编组时的msg对象是根据使用的协议绑定的要求形成的。
代码示例来源:origin: org.picketlink/picketlink-trust-jbossws
@SuppressWarnings("unchecked")
public Response<Source> invokeAsync(Source msg)
{
return parent.invokeAsync(msg);
}
代码示例来源:origin: org.picketlink/picketlink-trust-jbossws
@SuppressWarnings("unchecked")
public Future<?> invokeAsync(Source msg, AsyncHandler<Source> handler)
{
return parent.invokeAsync(msg, handler);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
@SuppressWarnings("unchecked")
public Response<Source> invokeAsync(Source msg) {
return parent.invokeAsync(msg);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
@SuppressWarnings("unchecked")
public Future<?> invokeAsync(Source msg, AsyncHandler<Source> handler) {
return parent.invokeAsync(msg, handler);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
@SuppressWarnings("unchecked")
public Response<Source> invokeAsync(Source msg) {
return parent.invokeAsync(msg);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
@SuppressWarnings("unchecked")
public Future<?> invokeAsync(Source msg, AsyncHandler<Source> handler) {
return parent.invokeAsync(msg, handler);
}
代码示例来源:origin: org.fabric3/fabric3-binding-ws-metro
dispatch.invokeAsync(source, null);
return NULL_RESPONSE;
} else {
代码示例来源:origin: org.apache.cxf.services.ws-discovery/cxf-services-ws-discovery-api
disp.invokeAsync(new ObjectFactory().createProbe(params), handler);
return response;
代码示例来源:origin: apache/cxf
disp.invokeAsync(new ObjectFactory().createProbe(params), handler);
return response;
代码示例来源:origin: org.apache.cxf.services.ws-discovery/cxf-services-ws-discovery-api
disp.invokeAsync(new ObjectFactory().createResolve(rt), handler);
return response.value == null ? null : response.value.getResolveMatch();
代码示例来源:origin: apache/cxf
disp.invokeAsync(new ObjectFactory().createResolve(rt), handler);
return response.value == null ? null : response.value.getResolveMatch();
代码示例来源:origin: apache/cxf
assertNotNull(saxSourceReq2);
Response<SAXSource> response = disp.invokeAsync(saxSourceReq2);
SAXSource saxSourceResp2 = response.get();
assertNotNull(saxSourceResp2);
assertNotNull(saxSourceReq3);
TestSAXSourceHandler tssh = new TestSAXSourceHandler();
Future<?> fd = disp.invokeAsync(saxSourceReq3, tssh);
assertNotNull(fd);
waitForFuture(fd);
代码示例来源:origin: apache/cxf
StreamSource streamSourceReq2 = new StreamSource(is2);
assertNotNull(streamSourceReq2);
Response<StreamSource> response = disp.invokeAsync(streamSourceReq2);
StreamSource streamSourceResp2 = response.get();
assertNotNull(streamSourceResp2);
assertNotNull(streamSourceReq3);
TestStreamSourceHandler tssh = new TestStreamSourceHandler();
Future<?> fd = disp.invokeAsync(streamSourceReq3, tssh);
assertNotNull(fd);
waitForFuture(fd);
代码示例来源:origin: apache/cxf
StreamSource streamSourceReq2 = new StreamSource(is2);
assertNotNull(streamSourceReq2);
Response<StreamSource> response = disp.invokeAsync(streamSourceReq2);
StreamSource streamSourceResp2 = response.get();
assertNotNull(streamSourceResp2);
Future<?> fd = disp.invokeAsync(streamSourceReq3, tssh);
assertNotNull(fd);
waitForFuture(fd);
代码示例来源:origin: apache/cxf
@Test
public void testSOAPMessageWithMalformedResponse() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
SOAPService service = new SOAPService(wsdl, SERVICE_NAME);
assertNotNull(service);
Dispatch<SOAPMessage> disp = service
.createDispatch(PORT_NAME, SOAPMessage.class, Service.Mode.MESSAGE);
disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:"
+ greeterPort
+ "/SOAPDispatchService/SoapDispatchPort");
// Test async callback
InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq3.xml");
SOAPMessage soapReqMsg3 = MessageFactory.newInstance().createMessage(null, is3);
assertNotNull(soapReqMsg3);
TestSOAPMessageHandler tsmh = new TestSOAPMessageHandler();
Future<?> f = disp.invokeAsync(soapReqMsg3, tsmh);
assertNotNull(f);
waitForFuture(f);
assertEquals("AsyncHandler shouldn't get invoked more than once", asyncHandlerInvokedCount, 1);
}
代码示例来源:origin: apache/cxf
SOAPMessage soapReqMsg3 = MessageFactory.newInstance().createMessage(null, is3);
assertNotNull(soapReqMsg3);
Response<SOAPMessage> response = disp.invokeAsync(soapReqMsg3);
try {
response.get(300, TimeUnit.SECONDS);
代码示例来源:origin: apache/cxf
disp.invokeAsync(soapReqMsg1, callback);
callback.wait();
代码示例来源:origin: apache/cxf
SOAPMessage soapReqMsg3 = MessageFactory.newInstance().createMessage(null, is3);
assertNotNull(soapReqMsg3);
Response<SOAPMessage> response = disp.invokeAsync(soapReqMsg3);
try {
response.get(300, TimeUnit.SECONDS);
代码示例来源:origin: apache/cxf
SOAPMessage soapReqMsg3 = MessageFactory.newInstance().createMessage(null, is3);
assertNotNull(soapReqMsg3);
Response<SOAPMessage> response = disp.invokeAsync(soapReqMsg3);
try {
response.get(300, TimeUnit.SECONDS);
代码示例来源:origin: apache/cxf
assertNotNull(domReqMsg2);
Response<DOMSource> response = disp.invokeAsync(domReqMsg2);
DOMSource domRespMsg2 = response.get();
assertNotNull(domRespMsg2);
Future<?> fd = disp.invokeAsync(domReqMsg3, tdsh);
assertNotNull(fd);
waitForFuture(fd);
内容来源于网络,如有侵权,请联系作者删除!