Bookshelf Home | Contents | Index | PDF |
Transports and Interfaces: Siebel eBusiness Application Integration Volume III > Java Business Service > Example of a Java Business ServiceFollowing is an example of a Java class implementing a business service: import com.siebel.data.SiebelPropertySet; import com.siebel.eai.SiebelBusinessServiceException; public class AddBusinessService extends com.siebel.eai.SiebelBusinessService { public void doInvokeMethod(String methodName, SiebelPropertySet input, SiebelPropertySet output) throws SiebelBusinessServiceException { String X = input.getProperty("X"); String Y = input.getProperty("Y"); if (X == null || X.equals("") || (Y == null) || Y.equals("")) throw(new SiebelBusinessServiceException("NO_PAR", "Missing param"); if (!methodName.equals ("Add")) throw new SiebelBusinessServiceException("NO_SUCH_METHOD, "No such method"); catch (NumberFormatException e) { throw new SiebelBusinessServiceException("NOT_INT", "Non-integer passed"); |
Transports and Interfaces: Siebel eBusiness Application Integration Volume III |