See information about the latest product version
Testing the proxy servlet
Test the proxy servlet with a message broker that receives HTTP requests and passes them to a message flow.
To test the proxy servlet, use an existing web services client application or write your own SSL test client application using Java™.
Universal Resource Locators (URLs) play an important role when you use HTTP or HTTPS protocols.
In WebSphere Message Broker, HTTPInput nodes receive requests that specify a URL (or possibly multiple URLs, when wildcards are used). The servlet container also uses the URLs to identify the servlets that process the HTTP/HTTPS requests received by the listener in the container. The proxy servlet passes the requests from the servlet container to WebSphere Message Broker and from WebSphere Message Broker to the servlet container. URLs are used to locate both servlets and HTTPInput nodes, and this dual function affects the format of the URLs used in WebSphere Message Broker.
URLs have the following format: schema://hostname:port/url_path.
- schema has a value of either http or https.
- hostname is the host name or IP address of the server on which the servlet container and the broker are running.
- port is the port number that the servlet container is listening on.
- url_path consists of a series of tokens separated
by forward slashes ("/"), and is used to indicate the location
of the servlet and of the HTTPInput nodes. Since url_path maps to two different resources, its format changes when the proxy servlet is used. In this case, the format of url_path is context_root/node_url_path.
- context_root is the URL path that the container allocates to the proxy servlet when the servlet is installed and deployed
- node_url_path is the part of the URL path that makes the URL unique to a specific HTTP Input node
The whole url_path must be configured as a property in the HTTPInput node.Note: For some servlet containers, you can configure the proxy servlet to receive all of the HTTP or HTTPS requests that the container receives, by setting the value for context_root to /*. In this case, you do not have to change the existing URLs in the HTTP nodes when the proxy servlet is implemented.
To test the proxy servlet, complete the following steps:
You have now finished testing the proxy servlet.