1 Reply Latest reply on Dec 8, 2006 10:09 AM by Andreas Mavrides

    Exception when invoking a WebService within an ActionHandler

    Andreas Mavrides Newbie

      Hi all,

      I have searched everywhere to find an answer to this question.

      I try to invoke a very simple webservice from within an ActionHandler but I get an exception.

      Code:

      public void execute(ExecutionContext context) throws Exception {
       try {
       String endPoint =
       "http://localhost:8080/axis/CruiseServiceImpl.jws";
       // Set up the remote method call
       Service service = new Service();}
       call.setTargetEndpointAddress( new java.net.URL(endPoint));
       call.setOperationName( new QName("CruiseServiceImpl", "cruiseDestinations") );
       // Perform the remote call
       String[] ret = (String[])call.invoke(new Object[0]);
       System.out.println("Destinations:");
       for (int i = 0; i < ret.length; i++) {
       String s = ret;
       System.out.println(s);
       }
       } catch (Exception e) {
       e.printStackTrace();
       }
       context.getContextInstance().setVariable("message", message);
      
       }
      


      And here is the exception:
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: Error calling action method of component with id taskform:transitionButton
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
       org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
       org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
       org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      
      root cause
      
      javax.faces.FacesException: Error calling action method of component with id taskform:transitionButton
       org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
       javax.faces.component.UICommand.broadcast(UICommand.java:106)
       javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
       javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
       org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
       org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
       org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
       org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
       org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      
      note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
      


      Please note:
      1) Everything runs great when I test this with JUnit. The exception occurs when I try to run the process from within jbpm, after pressing "Save and Close Task".
      2) I have no idea where to find the tomcat logs since it is embedded within jbpm 3.1.2 in my case, that is why I haven't looked at them.

      Any help as in why this happens or where to find the logs would be greatly appreciated.

      Thank you!