1 Reply Latest reply on Oct 5, 2007 6:09 AM by Alessio Soldano

    error runtime modeler error: Wrapper class ... is not found

    Montero Oñate Newbie


      I'm developing a Client of a WebService and when a I run it I've the next error:

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

      My environment is:

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

      My WSDL:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name='Contar' targetNamespace='urn:service' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='urn:service.types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='urn:service' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
       <schema targetNamespace='urn:service.types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='urn:service.types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
       <complexType name='DatePalabra'>
       <element name='longitud' nillable='true' type='string'/>
       <element name='palabra' nillable='true' type='string'/>
       <message name='IContar_darCuenta'>
       <part name='String_1' type='xsd:string'/>
       <message name='IContar_darCuentaResponse'>
       <part name='result' type='ns1:DatePalabra'/>
       <portType name='IContar'>
       <operation name='darCuenta' parameterOrder='String_1'>
       <input message='tns:IContar_darCuenta'/>
       <output message='tns:IContar_darCuentaResponse'/>
       <binding name='IContarBinding' type='tns:IContar'>
       <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
       <operation name='darCuenta'>
       <soap:operation soapAction=''/>
       <soap:body namespace='urn:service' use='literal'/>
       <soap:body namespace='urn:service' use='literal'/>
       <service name='Contar'>
       <port binding='tns:IContarBinding' name='IContarPort'>
       <soap:address location='REPLACE_WITH_ACTUAL_URL'/>

      My code of client:


      package main;
      import java.net.URL;
      import javax.xml.namespace.QName;
      import javax.xml.ws.Service;
      import service.DatePalabra;
      import service.IContar;
      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,
       Service service = Service.create(url, qname);
       System.out.println( "After create service" );
       IContar age = ( IContar) service.getPort( IContar.class );
       System.out.println( "After getPort" );
       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() );

      Interface of the service:

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

      Can you help me??