4 Replies Latest reply on Oct 10, 2008 10:22 AM by johanpersson

    javax.xml.ws.WebServiceException: Unable to create Provider:

    Gopal Maddipatla Newbie

      Hi,
      I've been trying to create a stub for Stock quote web service and am having trouble with that. It says "21:40:54,812 ERROR [[action]] Servlet.service() for servlet action threw exception
      javax.xml.ws.WebServiceException: Unable to create Provider: org.jboss.ws.core.jaxws.spi.ProviderImpl"

      I'm using JBoss App server 4.2 version under eclipse 3.3.1

      I used jwsdp2.0 for "StockQuote" web service. The following is the generated code:


      package net.webservicex;

      import java.net.MalformedURLException;
      import java.net.URL;
      import javax.xml.namespace.QName;
      import javax.xml.ws.Service;
      import javax.xml.ws.WebEndpoint;
      import javax.xml.ws.WebServiceClient;
      import net.webservicex.StockQuote;
      import net.webservicex.StockQuoteSoap;


      /**
      * This class was generated by the JAXWS SI.
      * JAX-WS RI 2.0-b26-ea3
      * Generated source version: 2.0
      *
      */
      @WebServiceClient(name = "StockQuote", targetNamespace = "http://www.webserviceX.NET/", wsdlLocation = "http://www.webservicex.net/stockquote.asmx?WSDL")
      public class StockQuote
      extends Service
      {

      private final static URL WSDL_LOCATION;
      private final static QName STOCKQUOTE = new QName("http://www.webserviceX.NET/", "StockQuote");
      private final static QName STOCKQUOTESOAP = new QName("http://www.webserviceX.NET/", "StockQuoteSoap");

      static {
      URL url = null;
      try {
      url = new URL("http://www.webservicex.net/stockquote.asmx?WSDL");
      } catch (MalformedURLException e) {
      e.printStackTrace();
      }
      WSDL_LOCATION = url;
      }

      public StockQuote(URL wsdlLocation, QName serviceName) {
      super(wsdlLocation, serviceName);
      }

      public StockQuote() {
      super(WSDL_LOCATION, STOCKQUOTE);
      }

      /**
      *
      * @return
      * returns StockQuoteSoap
      */
      @WebEndpoint(name = "StockQuoteSoap")
      public StockQuoteSoap getStockQuoteSoap() {
      return (StockQuoteSoap)super.getPort(STOCKQUOTESOAP, StockQuoteSoap.class);
      }

      }


      I'm calling the service the following way:

      StockQuote service = new StockQuote();
      StockQuoteSoap port = service.getStockQuoteSoap();
      String quote = port.getQuote("STT");

      I'm getting the following error in the first line of the above code itself:

      21:40:54,812 WARN [RequestProcessor] Unhandled Exception thrown: class javax.xml.ws.WebServiceException
      21:40:54,812 ERROR [[action]] Servlet.service() for servlet action threw exception
      javax.xml.ws.WebServiceException: Unable to create Provider: org.jboss.ws.core.jaxws.spi.ProviderImpl
      at javax.xml.ws.spi.Provider.provider(Provider.java:83)
      at javax.xml.ws.Service.(Service.java:58)
      at net.webservicex.StockQuote.(StockQuote.java:44)
      at com.struts.action.FiboGenAction.execute(FiboGenAction.java:81)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)


      I really appreciate any help you could provide in this. Basically, I want framework to get stock quote for any given ticker.

      Can someone please help me? Thanks.