5 Replies Latest reply on Oct 1, 2007 9:29 AM by Montero Oñate

    Provider com.sun.xml.ws.spi.ProviderImpl not found

    Montero Oñate Newbie


      I have a simple client of a web service implemented in java using eclipse with a plugging for JBossWS. In this client I use the library javax.xml.ws.*
      But when I run it the next problem appears:

      javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found

      I put the libraries jaxws-api.jar and jaxb-api.jar in the build path of the project.

      Can you tell me what can I do?

      My client code is the next one:

      import java.net.URL;

      import javax.xml.namespace.QName;
      /*import javax.xml.rpc.Service;
      import javax.xml.rpc.ServiceFactory;*/
      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,

      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() );