2 Replies Latest reply on Feb 3, 2008 6:52 PM by asoldano

    Cannot obtain wsdl service - Help

    vaswin

      Hi All,

      http://www.regdeveloper.co.uk/2007/01/23/ejb_web_services/

      When i tried the above example with my JBoss 4.2.2 with Jboss Eclipse, the below error is appeared. help me.

      Starting Test Client
      Creating a service Using:
      http://127.0.0.1:8080/EchoService/EchoBean?wsdl
      and {http://webservice.regdeveloper.co.uk/jaws}EchoService
      Exception in thread "main" java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://webservice.regdeveloper.co.uk/jaws}EchoService
      at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:172)
      at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:134)
      at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:86)
      at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:111)
      at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
      at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
      at uk.co.regdeveloper.client.EchoClient.main(EchoClient.java:19)


       System.out.println("Starting Test Client");
       URL url = new URL("http://127.0.0.1:8080/EchoService/EchoBean?wsdl");
       QName qname = new QName( "http://webservice.regdeveloper.co.uk/jaws", "EchoService");
       System.out.println("Creating a service Using: \n\t" + url + " \n\tand " + qname);
       ServiceFactory factory = ServiceFactory.newInstance();
       Service remote = factory.createService(url, qname);
       System.out.println("Obtaining reference to a proxy object");
       Echo proxy = (Echo) remote.getPort(Echo.class);
       System.out.println("Accessed local proxy: " + proxy);
       String string = "John";
       System.out.println("Sending: " + string);
       System.out.println("Receiving: " + proxy.echo("John")); }


      thx,
      Srinivas


        • 1. Re: Cannot obtain wsdl service - Help
          vaswin

          In addition to the above problem, i ve tried with wsrunclient to run the client program. but it also failed.


          C:\Projects\eclipseLambozworkspace\EchoService\build\classes>wsrunclient uk.co.r
          egdeveloper.client.EchoClient
          Starting Test Client
          Creating a service Using:
          http://127.0.0.1:8080/EchoService/EchoBean?wsdl
          and {http://webservice.regdeveloper.co.uk/jaws}EchoService
          Exception in thread "main" javax.xml.rpc.ServiceException: Failed to create fact
          ory: org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl
          at javax.xml.rpc.ServiceFactory.newInstance(ServiceFactory.java:110)
          at uk.co.regdeveloper.client.EchoClient.main(EchoClient.java:15)
          Caused by: java.lang.NoClassDefFoundError: org/jboss/util/NotImplementedExceptio
          n
          at java.lang.Class.getDeclaredConstructors0(Native Method)
          at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
          at java.lang.Class.getConstructor0(Class.java:2671)
          at java.lang.Class.newInstance0(Class.java:321)
          at java.lang.Class.newInstance(Class.java:303)
          at javax.xml.rpc.ServiceFactory.newInstance(ServiceFactory.java:85)
          ... 1 more

          Pls help and explain.

          Srinivas

          • 2. Re: Cannot obtain wsdl service - Help
            asoldano

            Please double check the namespace/name of your Service in your wsdl contract. Also consider running wsconsume against your wsdl to automatically generate your client artifacts.