Table of Contents

Search

  1. Preface
  2. Web Service Concepts
  3. Understanding the Web Services Provider
  4. Using the Web Services Hub Console
  5. Batch Web Service Operations
  6. Writing Client Applications
  7. Working with Web Service Sources and Targets
  8. Editing Web Service Sources and Targets
  9. Working with Web Service Mappings
  10. Working with Web Service Workflows
  11. Appendix A: Web Service Sample Client Applications
  12. Appendix B: Configure the Web Browser

Web Services Provider Guide

Web Services Provider Guide

Step 4. Send the Request and Handle the Response

Step 4. Send the Request and Handle the Response

After you create the request object, pass it to the port operation. The web service sends back a response. You can handle the response based on your requirements.
In the sample client application, the following code passes the request object to the port and displays the response:
CustomerLookupResponse[] response = port.customerLookup_MULTIPLEROWOperation(requestOperation); System.out.println(); if (response[0].getCustomerID_out() == 0)    {     System.out.println("Customer(s) with the ID as " + CustomerID + " does not exist!!!");    } else    {     System.out.println("***** Customer(s) that matches with the Customer ID is/are ...");     for (int i = 0; i < response.length; i++)        {         System.out.println("***** Customer ID: " + response[i].getCustomerID_out());         System.out.println("***** Customer Name: " + response[i].getCustomerName_out());         System.out.println("***** Customer Age: " + response[i].getCustomerAge_out());         System.out.println("***** Customer Gender: " +                               response[i].getCustomerGender_out());         System.out.println("***** Customer Address: " +                               response[i].getCustomerAddress_out());         if (i < response.length - 1) System.out.println ();        }    }

0 COMMENTS

We’d like to hear from you!