org.apache.cxf.frontend.ClientProxyFactoryBean throws exception!
aupres May 23, 2013 7:47 AMI try to implement JBoss JAAS BASIC login-config with JBoss Web Service. My reference site is http://middlewaremagic.com/jboss/?p=976.
My JSP code throws Exception. This is my JSP code.
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ page import="com.aaa.ws.ISecureTestPort" %>
<%@ page import="org.apache.cxf.jaxws.JaxWsProxyFactoryBean" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>JBoss JAAS와 JBoss Web Service</title>
</head>
<body>
<%
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ISecureTestPort.class); // This line throws Exception
factory.setAddress("http://localhost:8080/SecurityTestWS/SecureTestBean"); // This line throws Exception
factory.setUsername("joseph"); // This line throws Exception
factory.setPassword("joseph123"); // This line throws Exception
SecureTestBeanService service = (SecureTestBeanService)factory.create();
ISecureTestPort port = service.getSecureTestBeanPort();
out.println("Output : " + port.searchSecureData("test"));
%>
</body>
</html>
The Exception is
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 15 in the jsp file: /index.jsp
The type org.apache.cxf.frontend.ClientProxyFactoryBean cannot be resolved. It is indirectly referenced from required .class files
12: <body>
13: <%
14: JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
15: factory.setServiceClass(ISecureTestPort.class);
16: factory.setAddress("http://localhost:8080/SecurityTestWS/SecureTestBean");
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
An error occurred at line: 15 in the jsp file: /index.jsp
The method setServiceClass(Class<ISecureTestPort>) is undefined for the type JaxWsProxyFactoryBean
12: <body>
13: <%
14: JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
15: factory.setServiceClass(ISecureTestPort.class);
16: factory.setAddress("http://localhost:8080/SecurityTestWS/SecureTestBean");
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
An error occurred at line: 16 in the jsp file: /index.jsp
The method setAddress(String) is undefined for the type JaxWsProxyFactoryBean
13: <%
14: JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
15: factory.setServiceClass(ISecureTestPort.class);
16: factory.setAddress("http://localhost:8080/SecurityTestWS/SecureTestBean");
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
19:
An error occurred at line: 17 in the jsp file: /index.jsp
The method setUsername(String) is undefined for the type JaxWsProxyFactoryBean
14: JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
15: factory.setServiceClass(ISecureTestPort.class);
16: factory.setAddress("http://localhost:8080/SecurityTestWS/SecureTestBean");
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
19:
20: SecureTestBeanService service = (SecureTestBeanService)factory.create();
An error occurred at line: 18 in the jsp file: /index.jsp
The method setPassword(String) is undefined for the type JaxWsProxyFactoryBean
15: factory.setServiceClass(ISecureTestPort.class);
16: factory.setAddress("http://localhost:8080/SecurityTestWS/SecureTestBean");
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
19:
20: SecureTestBeanService service = (SecureTestBeanService)factory.create();
21: ISecureTestPort port = service.getSecureTestBeanPort();
An error occurred at line: 20 in the jsp file: /index.jsp
SecureTestBeanService cannot be resolved to a type
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
19:
20: SecureTestBeanService service = (SecureTestBeanService)factory.create();
21: ISecureTestPort port = service.getSecureTestBeanPort();
22: out.println("Output : " + port.searchSecureData("test"));
23: %>
An error occurred at line: 20 in the jsp file: /index.jsp
SecureTestBeanService cannot be resolved to a type
17: factory.setUsername("joseph");
18: factory.setPassword("joseph123");
19:
20: SecureTestBeanService service = (SecureTestBeanService)factory.create();
21: ISecureTestPort port = service.getSecureTestBeanPort();
22: out.println("Output : " + port.searchSecureData("test"));
23: %>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:446)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
Any advice? Kindly inform me. Thanks in advanced!