Step-by-step guide for testing rib-injector-service war on Tomcat

  1. Copy jersey jars into <tomcat>/lib folder. App server used here is tomcat which is a web container and doesn't have Jersey libraries packaged inside. In case of full stack Java EE app server such as weblogic this step is not required.

    cp <ribExtConnectorPak>/Rest-Injector/rib-injector-services-web/jersey-jars <tomcat>/lib

    Note:

    Jersey jars are packaged inside zip.

    Note:

    Jars packaged here are for reference purpose. You may use different versions of Jersey jars that may be compatible with external application.

    Note:

    application-messages-bo-23.0.000.jar is added with jersey zip in order to make this available inside <tomcat>/lib. This jar contains request/response business object and is needed for injector service to work.

  2. Deploy the rib-injector-services-light-web-23.0.000.war into tomcat by using the following command.

    Note:

    Change the name to remove the version number and the word light.

    cp rib-injector-services-light-web-23.0.000.war <tomcat>/webapps/rib-injector-services-web.war
  3. Start the application if not already started.

  4. Copy injector-sample-impl-23.0.000.jar inside <tomcat-apache>\webapps\rib-injector-services-web\WEB-INF\lib

  5. Test ping. Ping should return response as "Got hello from server.".

      curl -ivl4 --user tomcat:tomcat1 http://localhost:8080/rib-injector-services-web/resources/injector/ping
  6. Test inject call using a sample payload data. Create a file called app-message.data with the con-tent as follows.

    <ApplicationMessage xmlns="http://www.oracle.com/retail/integration/rib/ApplicationMessages/v1"><family>WH</family><type>WHCRE</type><payloadXml>&lt;WHDesc xmlns=&quot;http://www.oracle.com/retail/integration/base/bo/WHDesc/v1&quot;&lt;wh&gt;10&lt;/wh&gt;&lt;wh_name&gt;g&lt;/wh_name&gt;&lt;/WHDesc&gt;</payloadXml></ApplicationMessage>
  7. Call inject with the above (app-message.data) data. For a successful inject call, response should be "Inject successful." With the implementation jar provided here, message will get written to log.

    curl -ivl4 --user tomcat:tomcat1 -H 'Content-Type: application/xml' -d @app-message.data http://localhost:8080/rib-injector-services-web/resources/injector/inject