I'm using IBM's Rational Software Architect (essentially Eclipse I suppose). I have a JAR file that contains Proxy classes to access a Web Service (JAX-RPC). I've created a Dynamic Web Project with a simple JSP page in which I'm trying to consume the Web Service using a Proxy class from this library. Code from the JSP page:
<jsp:useBean id="queryProxy" scope="session" class="location.DataSearchProxy" />
<% queryProxy.setEndpoint("http://localhost:9080/CIDataService/services/DataSearch"); %>
<%=queryProxy.query("SELECT street, city, prov, postcode FROM v_location WHERE c1 = '48704'") %>
At this point I have added the External JAR file to the Libraries section of the Build Path, however when running the JSP page on WebSphere in-browser; I get the "DataSearchProxy cannot be resolved to a type" error.
I have also tried using:
<%@ page import="location.DataSearchProxy" %>
<% DataSearchProxy queryProxy = new DataSearchProxy(); %>
<% queryProxy.setEndpoint("http://localhost:9080/CIDataService/services/DataSearch"); %>
<%=queryProxy.query("SELECT street, city, prov, postcode FROM v_location WHERE c1 = '48704'") %>
But I get the same error. I have a feeling for this type of Web-Project I may need to reference it in some other way so it can be resolved from JSP pages or other Beans in the project. I may be going about this in the wrong way and I hope someone can point me in the right direction for consuming a Web Service from JSP.