Automation Point

  • 1.  Tuesday Tip - How to Deploy, Configure, and Use AP Web Services

    Broadcom Employee
    Posted Sep 30, 2014 02:50 PM

    AP Web Services provide a means of accessing AP resources from external computers inside or outside of your company network using web HTTP methods and XML formatted requests and responses. The simplest way of deploying, configuring, and using AP Web Services is by using the handy command-line tool. Using this tool, there is no need to bother with coding a custom Java application to deploy AP Web Services.

    In this Tuesday Tip, I will show you how to deploy and configure the AP Web Services command-line tool to send a message to a defined AP 3270 session.


    STEPS ON SERVER

    Open the Configuration Manager GUI application Expert Interface -> Infrastructure -> Web Services and enable notification and/or automation. You should also enable the audit logs for your web services so that you have a record of activity. Please leave the port number as the default value as this is the port web services will use to communicate with the local Tomcat server – this does not need to be accessible from the outside network. Automation Point provides sufficient default values for the rest of the options, so no need to change these.


    WebServicesConfig.PNG

      Next you want to enable remote viewing on the server and possibly remote user login security. In this example, we are not enabling any security for web services/remote viewing.

    RemoteViewing.PNG

     

    STEPS ON CLIENT

    The first thing you need to do is install a Java (JRE) on the remote client computer before using the RequestService command-line tool.

    To deploy the RequestService client to your remote client computer:

    1. Copy the following file from the CA Automation Point server to your remote client computer.

    %AP_HOME%\Sample\websvc\RequestServiceClientDist.zip

    1. Unzip the file into a directory of your choice.

    Suppose you unzip RequestService into the root of your C:\ drive on the client machine (your laptop perhaps)….

    In folder C:\RequestService\sample\websvc\scripts  we modified member initSamples.bat as follows:                 

     

    Set uriRoot=http://<DNS HOST NAME OR IP ADDRESS OF YOUR SERVER> :8080/apwebsvc  

    1. e.g. Set uriRoot=http://APPSRVR: 8080/apwebsvc                                

     

    In folder scripts we modified member sessionCredentials.txt as follows:     

     

    user=<userid>

    password=<password>


    These correspond to the User Account and password specified in the Configuration Manager -> Expert Interface –> Automation -> Remote Viewing.


    The user and password above are credentials of a domain account on the AP Server.


    From a CMD prompt I issue a Change Directory (CD) command to start in path    


    C:\RequestService\ sample\websvc\scripts and I issue:      

     

    SendMsgToSession


    When prompted I input CA11 for the session name                          


    When prompted I input “TEST this message is not encrypted” for the message to send 


    The following XML response appears indicating success:

     

    You can confirm that this message was sent to the console by looking at the host log or viewing the audit log on the server:

     

    auditlogmessage.PNG

     

    HostLogMessage.PNG

     

    Message was edited by: Stephen W. Slaughter



  • 2.  RE: Tuesday Tip - How to Deploy, Configure, and Use AP Web Services

    Posted Mar 13, 2023 05:47 PM

    How is this done in 11.7 since the JAVA webservice was removed and replaced with Node.JS ?

    Thanks,

    Ben 




  • 3.  RE: Tuesday Tip - How to Deploy, Configure, and Use AP Web Services

    Broadcom Employee
    Posted Mar 14, 2023 06:20 AM

    Hi Ben,

    The configuration of the feature is still the same, only the sample shell scripts currently delivered with AP rel 11.7 are not correct.. 
    They still contain the RequestService calls and they need to be replaced by Curl calls.. 
    We are working on changing them and they will be included in one of the upcoming changes.. 

    Best regards
    Hennie Hermans



    ------------------------------
    Principal Support Engineer
    Broadcom Software
    ------------------------------