Starting the BookQueryBE Service

Start the BookQueryBE service from the asg-engine command prompt.

Procedure

  1. Go to ASG_HOME/bin.
  2. Enter the following command:

    asg-engine - u default -c {filepath to BookQueryCDD.cdd file} {path to the BookQuery.ear file}

    where the file path to the BookQueryCDD.cdd file is $TIBCO_HOME/asg/2.1/examples/BookQueryBE/BookQuery

    and the path to the BookQuery.ear file is $TIBCO_HOME/asg/2.1/examples/BookQueryBE

    This starts the BookQueryBE service on port 7909.

    The Localhost URLs for the services for operations are:

    • GET: http://localhost:7909/Books/BookOperations/{Title}/{Title_Name}. 
(Title can be replaced by Author, Publisher or ISBN).
    • POST: http:localhost:7909/Books/BookOperations
Body Example: {“Title”: “ASG”, “Author”: “Neel”, “ISBN”: “123-6578-29329”, “Date”: “1997”, “Publisher”: “Tata-Mc-Grawhill”}
    • DELETE: http://localhost:7909/Books/BookOperations/Title/{Title_Name}
Here, the book with title name should be deleted.
    • PUT: http://localhost:7909/Books/BookOperations/{Title}/{Title_Name}
Body Example: {“Title”: “ASG”, “Author”: “Neel”, “ISBN”: “123-6578-29329”, “Date”: “1997”, “Publisher”: “Tata-Mc-Grawhill”}

      Here, the book with the title name will be replaced with the book supplied in the body of the PUT request.

    • For GET, getbooksbyauthor, the URL is http://$host:$port/Books/BookOperations/Author/Vivek Ranadive
    • If the request comes via the API Exchange Gateway, the URL should be http://$hostofasg:$portofasg/Channels/Books/BookOperations/Author/Vivek Ranadive