4 Replies Latest reply on Jan 6, 2009 2:46 PM by Sara Rodríguez Dorrego

    Problem calling a ws in a servlet

    Alessandro Pieropan Newbie

      Hi,
      i am developing an application using jboss 4.2.2,ejb 3.0 and netbeans.
      Following one of the tutorials online i created a web service inside the ejb container, then i created a web service inside my web container. After that i created a servlet. In the servlet i used the "command call web service operation" to auto generate the needed code to call the ws.
      The result is the injection

      @WebServiceRef(wsdlLocation = "http://localhost:8080/prova/NewWebService?wsdl")
      

      That is not supported in jboss 4.2 causing a null pointer exception when i try to access the requested resource.

      I tried the "walkaruond" found on this forum using this code in stand of the previous injection:
      private NewWebServiceService service;
      service = new NewWebServiceService();
      


      and i got the following exception:
      java.lang.ClassCastException: org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl cannot be cast to javax.xml.ws.spi.ServiceDelegate21
      


      Can someone help me solving this trouble, is there any working "walkaround" to call a ws inside a servlet using Jboss 4.2 and Netbeans?