5 Replies Latest reply on Oct 5, 2007 7:16 AM by fantagir

    error RuntimeModelerException: runtime modeler error: Wrappe

    fantagir

      Hi!

      I've develop a Web Service and its client. I run the WebService and when I run the client appears the next error:

      com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class webservice.jaxws.DarCuenta is not found. Have you run APT to generate them?

      It's necessary to run APT? When I have to run it? There isn't any way of implements and run the WebService and the client without use the APT?

      The code of my WebService:

      package service;
      
      import java.rmi.Remote;
      import java.rmi.RemoteException;
      
      import javax.jws.WebMethod;
      import javax.jws.WebResult;
      import javax.jws.WebService;
      import javax.jws.WebParam;
      
      import util.DatePalabra;
      
      @WebService(
       name="IContar", // wsdl:portType
       targetNamespace="urn:service" //wsdl:targetNamespace
       )
      public interface IContar extends Remote {
      
       @WebMethod
       @WebResult(name="IContar_darCuentaResponse")
       public DatePalabra darCuenta(@WebParam(name = "name") String name) throws RemoteException;
      }
      


      package service;
      
      import java.rmi.RemoteException;
      
      import javax.jws.WebMethod;
      import javax.jws.WebResult;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      
      import util.DatePalabra;
      
      @WebService(
       serviceName="Contar", // wsdl:service
       portName= "IContarPort", //wsdl:port name=... binding=...
       endpointInterface = "service.IContar", //nombre de la interficie del WebService
       targetNamespace="urn:service", //wsdl:targetNamespace
       wsdlLocation = "WEB-INF/wsdl/Contar.wsdl" //nombre y ubicación en el proyecto del fichero .wsdl
       )
      @SOAPBinding(
       style=SOAPBinding.Style.RPC,
       use=SOAPBinding.Use.LITERAL
       )
      public class Contar implements IContar{
      
       public DatePalabra darCuenta(String name) throws RemoteException {
       DatePalabra dp = new DatePalabra();
       dp.setLongitud(Integer.toString(name.length()));
       dp.setPalabra(name);
       return dp;
       }
      
      }
      



      Thanks for all.



        • 1. Re: error RuntimeModelerException: runtime modeler error: Wr

          Hi,
          how did you develop the client and what is the jbossws version you're using? I would take a look at least the quick start documentation http://jbws.dyndns.org/mediawiki/index.php?title=Quick_Start
          Anyway, you shoudn't need APT if you use the native jbossws stack.
          Bye
          Alessio Soldano

          • 2. Re: error RuntimeModelerException: runtime modeler error: Wr
            fantagir

            Thanks for replay so quickly.

            My environment is:

            Eclipse and JbossIDE for Eclipse
            Jboss 4.0.5 GA
            JDK 1.5
            JWSDP 2.0


            And the code of my client is this:

            package webservice;
            
            import java.net.URL;
            
            import javax.xml.namespace.QName;
            import javax.xml.ws.Service;
            
            import util.DatePalabra;
            
            import com.lasalle.util.resources.CollectionProperties;
            
            
            public class MainDevPalabra {
            
             public static void main( String[] args ) throws Exception {
             if( args.length < 1 )
             {
             System.out.println( "Usage: Palabra name" );
             System.exit( 0 );
             }
            
             String argument = args[ 0 ];
            
             DatePalabra dp = new DatePalabra();
            
             //CollectionProperties propietats = new CollectionProperties();
             String urlstr = CollectionProperties.getPropiedad("serviceD.url");
             String nameServiceStr = CollectionProperties.getPropiedad("serviceD.name");
             String namespaceServiceStr = CollectionProperties.getPropiedad("serviceD.namespace");
            
             System.out.println( "Contacting webservice at " + urlstr );
            
             URL url = new URL(urlstr);
            
             //se indican el namespace en el que se encuentra el servicio y su nombre
             //(esto se puede ver en el WSDL)
             QName qname = new QName(namespaceServiceStr,
             nameServiceStr);
            
             Service service = Service.create(url, qname);
            
            
             IContar age = ( IContar) service.getPort( IContar.class );
            
             System.out.println( "age.age(" + argument + ")" );
             dp = (DatePalabra) age.darCuenta(argument);
             System.out.println( "output longitud:" + dp.getLongitud() );
             System.out.println( "output palabra:" + dp.getPalabra() );
             }
            
            
            }


            Well, I use the interface that I write in the before.

            I'll take a look at the page you tell me.

            Thanks

            • 3. Re: error RuntimeModelerException: runtime modeler error: Wr
              fantagir

              Hi!

              I'll try to do what explain in this page
              http://jbws.dyndns.org/mediawiki/index.php?title=Quick_Start

              but don't work. The error is still the same.

              What can I do?

              • 4. Re: error RuntimeModelerException: runtime modeler error: Wr
                asoldano

                 

                "Fantagir" wrote:
                Hi!

                I'll try to do what explain in this page
                http://jbws.dyndns.org/mediawiki/index.php?title=Quick_Start

                but don't work. The error is still the same.

                What can I do?


                Do you really used the jbossws wsconsume to generate the *client*? I guess you're using jwsdp and that's the reason why you're asked for the APT run... You're missing some client artifacts (in other words, your custom data types).
                This http://jbws.dyndns.org/mediawiki/index.php?title=Quick_Start#Consuming_web_services
                is the solution of your problems.

                • 5. Re: error RuntimeModelerException: runtime modeler error: Wr
                  fantagir

                  Hi!

                  I use the options of eclipse to generated client artifacts and this don't generate all the classes that say in the page.

                  I'll use wsconsume in the command line, I put the classes in the correct place of my project in eclipse and.... it WORKS!!

                  THANKS THANKS THANKS

                  But, if any of us know how can I do this in eclipse, tell me please!