0 Replies Latest reply: Mar 9, 2010 10:28 AM by 807573 RSS

    Exception in the web service client

    807573
      Hi!

      My code is:
      try{
                     
                     ServiceFactory serviceFactory = ServiceFactory.newInstance();
                     String wsdlURLString = "http://localhost:82/PFC_WebService/services/GroupManager?wsdl";
                     URL wsdlURL = new URL(wsdlURLString);
                     String serviceName = "GroupManagerService";
                     String nameSpaceURI = "http://groups.home";
                     
                     Service service = serviceFactory.createService(wsdlURL, new QName(nameSpaceURI, serviceName));
                     String portName = "GroupManager";  
                     // create the service proxy  
                     GroupManagerService serviceProxy = (GroupManagerService) service.getPort(new QName(nameSpaceURI, portName),es.tid.walqa.feelathome.groups.GroupManagerService.class);
      
                     } catch (ServiceException e) {  
                       // TODO Auto-generated catch block  
                            e.printStackTrace();  
                         } catch (MalformedURLException e) {  
                             // TODO Auto-generated catch block  
                                  e.printStackTrace();  
                        }  
      When I execute I get the exception: Only interfaces which extend java.rmi.Remote may be used for the proxy class argument, any idea???

      Moreover, with this code I should now do:
      serviceProxy.methodWanted
      However, serviceProxy cannot access to methodWanted :(. I think the problem must be related to the exception I got but I am quite newbie.

      Thanks in advance