本文整理了Java中javax.xml.ws.Dispatch.invokeOneWay()
方法的一些代码示例,展示了Dispatch.invokeOneWay()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dispatch.invokeOneWay()
方法的具体详情如下:
包路径:javax.xml.ws.Dispatch
类名称:Dispatch
方法名:invokeOneWay
[英]Invokes a service operation using the one-way interaction mode. The operation invocation is logically non-blocking, subject to the capabilities of the underlying protocol, no results are returned. When the protocol in use is SOAP/HTTP, this method MUST block until an HTTP response code has been received or an error occurs.
The client is responsible for ensuring that the msg object when marshalled is formed according to the requirements of the protocol binding in use.
[中]使用单向交互模式调用服务操作。操作调用在逻辑上是非阻塞的,根据底层协议的功能,不会返回任何结果。当使用的协议是SOAP/HTTP时,此方法必须阻塞,直到收到HTTP响应代码或发生错误。
客户机负责确保编组时的msg对象是根据使用的协议绑定的要求形成的。
代码示例来源:origin: org.picketlink/picketlink-trust-jbossws
@SuppressWarnings("unchecked")
public void invokeOneWay(Source msg)
{
parent.invokeOneWay(msg);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5
@SuppressWarnings("unchecked")
public void invokeOneWay(Source msg) {
parent.invokeOneWay(msg);
}
代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7
@SuppressWarnings("unchecked")
public void invokeOneWay(Source msg) {
parent.invokeOneWay(msg);
}
代码示例来源:origin: org.apache.cxf.services.ws-discovery/cxf-services-ws-discovery-api
public void unregister(ByeType bye) {
getDispatchInternal(true, version.getByeAction()).invokeOneWay(factory.createBye(bye));
}
public void unregister(HelloType hello) {
代码示例来源:origin: apache/cxf
public void unregister(ByeType bye) {
getDispatchInternal(true, version.getByeAction()).invokeOneWay(factory.createBye(bye));
}
public void unregister(HelloType hello) {
代码示例来源:origin: apache/cxf
/**
* Sends the "Hello" to broadcast the availability of a service
* @param hello
* @return the hello
*/
public HelloType register(HelloType hello) {
if (hello.getEndpointReference() == null) {
hello.setEndpointReference(generateW3CEndpointReference());
}
getDispatchInternal(true, version.getHelloAction()).invokeOneWay(factory.createHello(hello));
return hello;
}
代码示例来源:origin: org.apache.cxf.services.ws-discovery/cxf-services-ws-discovery-api
/**
* Sends the "Hello" to broadcast the availability of a service
* @param hello
* @return the hello
*/
public HelloType register(HelloType hello) {
if (hello.getEndpointReference() == null) {
hello.setEndpointReference(generateW3CEndpointReference());
}
getDispatchInternal(true, version.getHelloAction()).invokeOneWay(factory.createHello(hello));
return hello;
}
代码示例来源:origin: org.switchyard.components/switchyard-component-soap
_dispatcher.invokeOneWay(soapMessage);
代码示例来源:origin: jboss-switchyard/components
_dispatcher.invokeOneWay(soapMessage);
代码示例来源:origin: apache/cxf
SAXSource saxSourceReq1 = new SAXSource(inputSource1);
assertNotNull(saxSourceReq1);
disp.invokeOneWay(saxSourceReq1);
代码示例来源:origin: apache/cxf
SAXSource saxSourceReq1 = new SAXSource(inputSource1);
assertNotNull(saxSourceReq1);
disp.invokeOneWay(saxSourceReq1);
代码示例来源:origin: apache/cxf
StreamSource streamSourceReq1 = new StreamSource(is1);
assertNotNull(streamSourceReq1);
disp.invokeOneWay(streamSourceReq1);
代码示例来源:origin: apache/cxf
StreamSource streamSourceReq1 = new StreamSource(is1);
assertNotNull(streamSourceReq1);
disp.invokeOneWay(streamSourceReq1);
代码示例来源:origin: apache/cxf
DOMSource domReqMsg1 = new DOMSource(soapReqMsg1.getSOAPPart());
assertNotNull(domReqMsg1);
disp.invokeOneWay(domReqMsg1);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
invocationDispatch.invokeOneWay(soapMessage);
return null;
代码示例来源:origin: apache/cxf
assertNotNull(domReqMsg1);
disp.invokeOneWay(domReqMsg1);
代码示例来源:origin: apache/cxf
SOAPMessage soapReqMsg1 = MessageFactory.newInstance().createMessage(null, is1);
assertNotNull(soapReqMsg1);
disp.invokeOneWay(soapReqMsg1);
代码示例来源:origin: apache/cxf
disp.invokeOneWay(greetMe);
代码示例来源:origin: apache/cxf
@Test
public void testAddHandlerThroughHandlerResolverClientSide() throws Exception {
TestHandler<LogicalMessageContext> handler1 = new TestHandler<>(false);
TestHandler<LogicalMessageContext> handler2 = new TestHandler<>(false);
MyHandlerResolver myHandlerResolver = new MyHandlerResolver(handler1, handler2);
service.setHandlerResolver(myHandlerResolver);
HandlerTest handlerTestNew = service.getPort(portName, HandlerTest.class);
setAddress(handlerTestNew, "http://localhost:" + port + "/HandlerTest/SoapPort");
handlerTestNew.pingOneWay();
String bindingID = myHandlerResolver.bindingID;
assertEquals("http://schemas.xmlsoap.org/wsdl/soap/http", bindingID);
assertEquals(1, handler1.getHandleMessageInvoked());
assertEquals(1, handler2.getHandleMessageInvoked());
//CXF-3956 - check to make sure a Dispatch can also get the handlers
JAXBContext context = JAXBContext.newInstance(org.apache.handler_test.types.ObjectFactory.class);
Dispatch<Object> disp = service.createDispatch(portName, context, Service.Mode.PAYLOAD);
setAddress(disp, "http://localhost:" + port + "/HandlerTest/SoapPort");
disp.invokeOneWay(new org.apache.handler_test.types.PingOneWay());
assertEquals(2, handler1.getHandleMessageInvoked());
assertEquals(2, handler2.getHandleMessageInvoked());
}
内容来源于网络,如有侵权,请联系作者删除!