Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization 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
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

OneWay operation WebService (JAX-WS)

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends..

How to implement OneWay operation WebService?..
just use @OneWay and use void method?.. //is it enough?
What case that forced us to develop OneWay operation WebService?..

Thanks in advance..
 
Ranch Hand
Posts: 2198
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Yes, annotating a method with the @OneWay annotation is enough if you do Java-first development.
If you are doing WSDL-first development, then (assuming WSDL 1.1) you must not have <output> element(s) or <fault> elements in the <operation> element in question in the <portType> element. The example below has two operations, only the second is a one-way operation.


Oneway operations are useful, for instance, if a client wants to send a message to a web service but is not interested in waiting for a response, for instance with asynchronous operations that may take a long time to finish. The response may later be delivered using callback or the client may poll for the result.
Best wishes!
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan, thanks for your reply..

Oh i see.. i guessed before that the OneWay operation in WebService doesn't need to have return value..


The response may later be delivered using callback or the client may poll for the result.



do we have to make callback handler (in the client side)?..
how about if we implement only use common asynchronous call (through Polling)?...
doesn't it matter?..

sorry Ivan, i'm still not understand about this mean : "the client may poll for the result"..

Thanks in advance..
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read Dispatch API and Response API.
And also read the PDF created by Ivar, page number 163 for 'Asynchronous Request-Response'.

Regards,
Chetan
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok... Thanks C Shinde for your reply..
it helps me for get more clarification about OneWay operation..
 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic