Step-by-step guide for testing rib-injector-service war on Tomcat
-
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-22.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.
-
Deploy the rib-injector-services-light-web-22.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-21.1.000.war <tomcat>/webapps/rib-injector-services-web.war
-
Start the application if not already started.
-
Copy injector-sample-impl-22.0.000.jar inside <tomcat-apache>\webapps\rib-injector-services-web\WEB-INF\lib
-
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
-
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><WHDesc xmlns="http://www.oracle.com/retail/integration/base/bo/WHDesc/v1"<wh>10</wh><wh_name>g</wh_name></WHDesc></payloadXml></ApplicationMessage>
-
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