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.
Optimize SOAP Web Services Performance with Coarse Grained APIs and Primitive Types
Enhance SOAP web services performance by using coarse grained APIs and primitive types. Learn best practices for better design and efficiency.
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
Enhance Your Enterprise Java Applications with HTTP Basic Authentication and Apache CXF Interceptors
Learn how to implement HTTP Basic Authentication for JAX-WS Web services and explore alternative authentication mechanisms using Apache CXF Interceptors. #Java #Middleware #CloudNative