Java Reference
In-Depth Information
CatalogServiceSN service = new CatalogServiceSN();
CatalogService port = service.getCatalogPort();
String id = "98765";
String result = port.getTitle(id);
out.println("Result for ID 98765= "+result);
} catch (Exception ex) {
//...
}
%>
</body>
</html>
Notice that you import the service stub and the port you'll use to invoke the operation using
the page directive. The result in the browser is shown in Figure 6-2 .
Figure6-2.Catalog web service invoked from JSP
There is no need to use a JNDI lookup or add anything to the deployment descriptor.
Search WWH ::




Custom Search