This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes One-way invocation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "One-way invocation" Watch "One-way invocation" New topic
Author

One-way invocation

S Kapoor
Greenhorn

Joined: Mar 31, 2006
Posts: 20
In a whizlabs question:
Which of the fol. is true about one-way invocation?

1: The client waits until an HTTP response is received or an error occurs.
2: The client call is not waiting for a response and returns immediatly.

Shouldnt the right answer be 2? The whizlab answer is stated as 1.


SCJP, SCJWS, SCWCD
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
An HTTP code still has to come back. The whizlab answer is correct.

This link says

"Say you send a SOAP message one-way over HTTP: the client's business logic triggers the SOAP layer to invoke the remote service. This causes an HTTP request to be sent to the server. When the request is received by the server, it should immediately return an HTTP response without servicing the request. The server-side business logic should run after the response has been returned. The response should not contain a SOAP message. An HTTP 200 or 202 status code response does not mean that the service completed successfully. A failure code, on the other hand, should guarantee that the service invocation failed. The SOAP layer on the client side blocks until it receives the response or times out."

You can also look at Mikalai Zaikin's guide regarding this.
S Kapoor
Greenhorn

Joined: Mar 31, 2006
Posts: 20
That makes sense.
Thanks for the prompt answer!!
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
The API documentation for the method javax.xml.rpc.Call.invokeOneWay also makes this pretty clear:


Invokes a remote method using the one-way interaction mode. The client thread does not normally block waiting for the completion of the server processing for this remote method invocation. When the protocol in use is SOAP/HTTP, this method should block until an HTTP response code has been received or an error occurs. This method must not throw any remote exceptions. This method may throw a JAXRPCException during the processing of the one-way remote call.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: One-way invocation
 
Similar Threads
Question about Invoking a Web Service Asynchronously
Asynchronous web service
One-Way RPC mode vs. Non-blocking RPC invocation??
one-way invocations
Whizlabs Question doubt