esb.servicemix.servlet.WelcomeServlet
WelcomeServlet
/hello/*
As a first step, if you haven't done it before, edit examples.PROPERTIES (provided
along with the code download for this chapter), and change the paths there to match
your development environment.
Now to build the web component, change the directory to ch03\Servlet and
execute ant script.
cd ch03\Servlet
ant
Here, we assume that you have installed the latest version of Apache Ant build tool
and the bin folder of that is in your path environment variable. This will generate the
web archive (EsbServlet.war) and place it in the dist folder inside ch03\Servlet
which can be deployed in the webapps folder of Tomcat (or any other relevant web
server) and restart the server.
The HTTP service would have been exposed by now and the same can be accessed
using your favorite browser with the following URL:
http://localhost:8080/EsbServlet/hello/
We can now write Client code similar to what is shown in the following code to test
the HTTP service:
public class HttpInOutClient
{
private static String url = "http://localhost:8080/
EsbServlet/hello/";
private static String fileUrl = "HttpSoapRequest.
Pages:
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125