Skip Navigation

Sample Code for SDS Service

The following code sample shows how to send and receive a response from using SDS.

    String command = "1LASLAX";
    String applicationId = "ABA1TRAN";
    String subsetId = "AV01";

    ISRWCommunication com = getServiceReference(ISRWCommunication.class);
    SDSServiceClient client = new SDSServiceClient(com);
    SDSCommand sdsCommand = new SDSCommand(applicationId, subsetId, command);

    ClientResponse <SDSResponse> rsp = client.send(sdsCommand));
    if (rsp.isSuccess())
    {
        showMessage(rsp.getPayload().getText());
    } else {
        for(IError error: rsp.getErrors()) {
           // process errors
        }
    }