What is a Web Service One Way invocation?
Most of the message-exchange-patterns are request-response ones; however in some scenarios
oneway invocations are preferred, as the client does not expect any actual data in the response from
the server.
In such cases, the server is instructed that no SOAP response message has to be sent
back to the client, whose low-level invocation is immediately acknowledged (for instance with a
HTTP 202 response code if the HTTP transport is in use). Moreover the endpoint processing can be
(and usually is) performed in a separate thread, freeing resources that can be used to promptly
serve other requests.
Oneway operations in WSDL documents simply have no {http://schemas.xmlsoap.org/wsdl/}output
elements. On Java code, the @javax.jws.Oneway annotation is used as follows:
@WebService
public class MyServiceEndpoint {
@Oneway
public void ping() {
//
}
}
This Web service expose the method ping as web service and returns the thread of execution before executing the method.
Recommended Articles
Mastering Handler Chains for Enterprise Java and Cloud-Native Applications
Enhance your web services with Handler Chains: a flexible way to customize message processing without altering core logic.
10 Web Services Performance Tuning Tips - Mastertheboss
Optimize SOAP Web Services performance on WildFly 41 and Jakarta EE 11. Discover JAX-WS tuning, Apache CXF configuration, JAXB optimizations, and network payload reduction tips.
Disable JAX-WS SOAP Web Services on WildFly Application Server - Comprehensive Guide
Learn how to disable JAX-WS SOAP Web Services at both application and subsystem levels in WildFly. #WildFly #Java #Middleware
JAX-WS Asynchronous Web Services Made Simple - WildFly 41 & Jakarta EE 11
Learn how to implement JAX-WS asynchronous web service invocations (polling and callback) using Jakarta EE 11 and WildFly 41.0.1.Final with Apache CXF. Improve application performance and responsiveness.