Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error while creating web service  RSS feed

 
sarita singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /sampleHelloProxy/Result.jsp at line 10

7: <BODY>
8: <H1>Result</H1>
9:
10: <jsp:useBean id="sampleHelloProxyid" scope="session" class="com.HelloProxy" />
11: <%
12: if (request.getParameter("endpoint") != null && request.getParameter("endpoint").length() > 0)
13: sampleHelloProxyid.setEndpoint(request.getParameter("endpoint"));


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


root cause

javax.servlet.ServletException: java.lang.Error: Unresolved compilation problem:
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:912)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
org.apache.jsp.sampleHelloProxy.Result_jsp._jspService(Result_jsp.java:209)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


root cause

java.lang.Error: Unresolved compilation problem:
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

com.HelloSoapBindingStub.<init>(HelloSoapBindingStub.java:78)
com.HelloServiceLocator.getHello(HelloServiceLocator.java:55)
com.HelloServiceLocator.getHello(HelloServiceLocator.java:50)
com.HelloProxy._initHelloProxy(HelloProxy.java:18)
com.HelloProxy.<init>(HelloProxy.java:8)
org.apache.jsp.sampleHelloProxy.Result_jsp._jspService(Result_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

 
Dave Tolls
Ranch Hand
Posts: 2504
27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using a JSP in a SOAP web service.

Never mind that JSPs really shouldn't have any Java code in them in the first place.
 
sarita singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Tolls wrote:Why are you using a JSP in a SOAP web service.

Never mind that JSPs really shouldn't have any Java code in them in the first place.




I didn't use JSP in SOAP web service by myself, while creating web service this jsp file is automatically created.


Result.jsp

<%@page contentType="text/html;charset=UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
<HTML>
<HEAD>
<TITLE>Result</TITLE>
</HEAD>
<BODY>
<H1>Result</H1>

<jsp:useBean id="sampleHelloProxyid" scope="session" class="com.HelloProxy" />
<%
if (request.getParameter("endpoint") != null && request.getParameter("endpoint").length() > 0)
sampleHelloProxyid.setEndpoint(request.getParameter("endpoint"));
%>

<%
String method = request.getParameter("method");
int methodID = 0;
if (method == null) methodID = -1;

if(methodID != -1) methodID = Integer.parseInt(method);
boolean gotMethod = false;

try {
switch (methodID){
case 2:
        gotMethod = true;
        java.lang.String getEndpoint2mtemp = sampleHelloProxyid.getEndpoint();
if(getEndpoint2mtemp == null){
%>
<%=getEndpoint2mtemp %>
<%
}else{
        String tempResultreturnp3 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getEndpoint2mtemp));
        %>
        <%= tempResultreturnp3 %>
        <%
}
break;
case 5:
        gotMethod = true;
        String endpoint_0id=  request.getParameter("endpoint8");
            java.lang.String endpoint_0idTemp = null;
        if(!endpoint_0id.equals("")){
         endpoint_0idTemp  = endpoint_0id;
        }
        sampleHelloProxyid.setEndpoint(endpoint_0idTemp);
break;
case 10:
        gotMethod = true;
        com.Hello getHello10mtemp = sampleHelloProxyid.getHello();
if(getHello10mtemp == null){
%>
<%=getHello10mtemp %>
<%
}else{
        if(getHello10mtemp!= null){
        String tempreturnp11 = getHello10mtemp.toString();
        %>
        <%=tempreturnp11%>
        <%
        }}
break;
case 13:
        gotMethod = true;
        String s_1id=  request.getParameter("s16");
            java.lang.String s_1idTemp = null;
        if(!s_1id.equals("")){
         s_1idTemp  = s_1id;
        }
        java.lang.String dispaly13mtemp = sampleHelloProxyid.dispaly(s_1idTemp);
if(dispaly13mtemp == null){
%>
<%=dispaly13mtemp %>
<%
}else{
        String tempResultreturnp14 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(dispaly13mtemp));
        %>
        <%= tempResultreturnp14 %>
        <%
}
break;
}
} catch (Exception e) {
%>
Exception: <%= org.eclipse.jst.ws.util.JspUtils.markup(e.toString()) %>
Message: <%= org.eclipse.jst.ws.util.JspUtils.markup(e.getMessage()) %>
<%
return;
}
if(!gotMethod){
%>
result: N/A
<%
}
%>
</BODY>
</HTML>
 
Dave Tolls
Ranch Hand
Posts: 2504
27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Automatically created by what?
 
sarita singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I have created web services using this link

http://crunchify.com/create-and-deploy-simple-web-service-and-web-service-client-in-eclipse/
 
Dave Tolls
Ranch Hand
Posts: 2504
27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any JSPs on that page, but I might well have missed them.
But that JSP just looks wrong.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!