0 Replies Latest reply on May 17, 2007 3:15 PM by Rick Reumann

    Problem trying to use a jmx component to call my webservice

    Rick Reumann Newbie

      I'm a bit confused what is going wrong here. I have a simple class that can call my webservice by creating a javax.xml.ws.Service and getting a handle to my endpoint interface. This works fine if I call this class from a servlet.

      I know annotated this class so that it would show up as a JMX component and I'm trying to call the test method (echo) through the JMX console. When I try this, however, I'll get an error back...

      org.jboss.ws.WSException: Cannot load java type: com.foobar.edsf.example.ejb.webservices.jaxws.TestEchoExample

      I'm not sure why I'm getting such an error. Apparently JBoss is trying to make this class in the package jaxws? (since I don't have that package named anywhere in my examples).

      Here is the class I'm trying to use as a JMX component...

      package com.foobar.edsf.example.client;
      import java.net.URL;
      import javax.xml.namespace.QName;
      import javax.xml.ws.Service;
      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;
      import org.jboss.annotation.ejb.Management;
      import com.foobar.edsf.example.ejb.webservices.Echo;
      public class TestEchoExample implements ITestEcho {
       private static Log log = LogFactory.getLog(TestEchoExample.class);
       public String echo(String s) {
       String retVal = "Failed";
       try {
       Service service = Service.create(
       new URL("http://localhost:8080/edsf-1-edsf-examples-ejb/EchoBean?wsdl"),
       new QName("http://webservices.ejb.example.edsf.foobar.com/", "EchoBeanService") );
       Echo echo = service.getPort(Echo.class);
       retVal = echo.testEchoExample(s);
       log.info("In TestEcho client. Echo response with call to echo: "+ retVal);
       } catch (Exception e) {
       retVal = e.toString();
       return retVal;