Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

One-way invocation

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That makes sense.
Thanks for the prompt answer!!
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic