Defining a one or two way web service

This recipe explains how to define a one or two way web service. You might think that the title is misguided since all methods are by default exposed as two way web services. With that in mind, we will focus more on defining a one way web service.

How to do it…

We will define the OutputTransactions method as a one way operation of a web service. Open the CCGatePortType class in JDeveloper. Put the @OneWay annotation next to the OutputTransaction method:

@WebMethod
@Oneway
public void OutputTransactions() throws RemoteException;

That is it. With this annotation, the web service operation will become a one way operation, meaning the client will not wait for the response.

How it works…

The best way to see how the one ...

Get BPEL and Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.