Using non-exposable methods of service interface

This recipe explains the usage of methods that are not exposed through a web service interface. These methods are private to the web service implementation and cannot be used for integration through the web service mechanism. In the Java code, such methods have private access as well.

How to do it…

In the CreditCardGateway class, , we implement the Void credit card operation which checks whether the credit card data is authorized and if a possibility of fraud exists. If the transaction is accepted, then we forward the request of the backend system.

public TransactionResponse Void(String token, BigDecimal amount) { if ( isAuthorised(token) && isFraud(token) ) { BackEndSystem.getInstance().voidOp(UUID.fromString(token), ...

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.