1 Reply Latest reply on Jul 12, 2005 3:36 AM by Thomas Diesler

    Cannot obtain client config erro from java client

    venkat kondarapu Newbie

      hi All,

      I am calling a webservice from a standalone client.Here is my client code:

      URL wsdlURL = new URL("http://localhost:8080/ConfWeb/DocumentFactory?wsdl");
      URL jaxrpcURL = new File("jaxrpc-mapping.xml").toURL();
      QName qname = new QName("http://com.interfaces/","IDocumentFactoryService");
      ServiceFactoryImpl serviceFactory = (ServiceFactoryImpl)ServiceFactory .newInstance();
      Service service = serviceFactory.createService(wsdlURL,jaxrpcURL,null,qname,null);
      IDocumentFactory documentFactory = (IDocumentFactory )service.getPort(IDocumentFactory.class);
      MemDocumentImpl doc = documentFactory.getDocumentById(1);
      System.out.println(doc.getTrackingId() );
      } catch (Exception e) {
      e.printStackTrace();
      fail();
      }

      but I get the follwoing error .

      java.lang.IllegalStateException: Cannot obtain client config
      at org.jboss.webservice.client.ServiceImpl.getEngineConfiguration(ServiceImpl.java:340)
      at org.jboss.webservice.client.ServiceImpl.getAxisClient(ServiceImpl.java:325)
      at org.jboss.axis.client.Service.(Service.java:180)
      at org.jboss.webservice.client.ServiceImpl.(ServiceImpl.java:110)
      at org.jboss.webservice.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:146)
      at com.smart.confirm.testcases.ConfTest.testTracId(ConfTest.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


      Please help me in finding the solution for this problem.