4 Replies Latest reply on Aug 13, 2007 8:52 PM by jemodurn

    Accessing jaxws web service gives error complaining about no

    rickcr

      This is driving me nuts. I have installed jbossws on jboss (both on 4.0.5 and 4.2). I deploy my ear and the webservice is created and I can access the wsdl. I then use wsconsume to create some stubs. For now, I'm just trying to test this from a client running on the same server, so I thought I'd only need the generated Service stub.

      I call it from my client as:

      SpecProcessorService specService = new SpecProcessorService();
      SpecProcessor specProcessor = specService.getSpecProcessorPort();
      //...
      


      It errors out on trying to get the Port...

      00:27:39,375 ERROR [SpecProcessClient] Error in SpecProcessClient client:
      org.jboss.ws.WSException: Cannot load java type: net.learntechnology.sample.ejb.slsb.jaxws.ProcessSpec
      at org.jboss.ws.metadata.umdm.ParameterMetaData.getJavaType(ParameterMetaData.java:275)
      ...
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: net.learntechnology.sample.ejb.slsb.jaxws.ProcessSpec
      

      ...
      What I don't even get is why it's complaining about not being able to find:
      net.learntechnology.sample.ejb.slsb.jaxws.ProcessSpec

      I don't even have a package by that name. I have packages that start with net.learntechnology.sample.ejb.slsb but nothing with jaxws.ProcessSpec

      I'm really stumped here. Any idea what I'm doing wrong?

        • 1. Re: Accessing jaxws web service gives error complaining abou
          rickcr

          I figured out the problem even though the errors being thrown didn't really help. For some reason, if I start the process of calling my webserivce from a bean annotated as JMX component, the webservice call does not work. If I start the call from say a Servlet everything is fine. Not sure why I can't use a JMX component though.

          • 2. Re: Accessing jaxws web service gives error complaining abou

             

            "rickcr" wrote:
            For now, I'm just trying to test this from a client running on the same server, so I thought I'd only need the generated Service stub.
            ...
            What I don't even get is why it's complaining about not being able to find:
            net.learntechnology.sample.ejb.slsb.jaxws.ProcessSpec

            I don't even have a package by that name. I have packages that start with net.learntechnology.sample.ejb.slsb but nothing with jaxws.ProcessSpec

            I'm really stumped here. Any idea what I'm doing wrong?


            Are you keeping the generated Service stub only, without the other generated classes? I think you should keep all generated client classes, which I suspect include something having the jaxws.ProcessSpec package.
            Bye
            Alessio Soldano
            http://www.javalinux.it

            • 3. Re: Accessing jaxws web service gives error complaining abou
              rickcr

              It didn't seem to matter how I tried to access the webservice - whether using the generated stubs, creating the service manually, or I even tried axis2 client stubs - I just had no luck when I tried to use the bean from the jmx console. Yet, if I used this client code from a servlet there wasn't a problem.

              • 4. Re: Accessing jaxws web service gives error complaining abou
                jemodurn

                I wrote a simple mbean that tries to call a WS. I hit the same issue.

                However, if call the same WS from a standalone java client. It works, and subsequent call using the mbean also works. I think the class somehow got loaded by the Universal Class Loader.

                Something is really strange here about the class loading.

                Does JbossWS support access from within an mbean?