help in client configuration of ejb server programming
bandini Jun 3, 2005 12:45 PMIm running a simple webservice software using jboss[given as an
example in jboss site].
Im using EJB server program to be deployed in the JBOSS server. This
runs perfectly and the jboss server shows that the server-ejb.jar has
been deployed.
My client is a simple jax-rpc client tryin to connect to the server via jboss,
but i get this error stack:
.IllegalStateException: Cannot obtain client config at org.jboss.webservice.client.ServiceImpl.getEngineConfiguration(ServiceImpl.java:323) at org.jboss.webservice.client.ServiceImpl.getAxisClient(ServiceImpl.java:308) at org.apache.axis.client.Service.<init>(Service.java:178) at org.jboss.webservice.client.ServiceImpl.<init>(ServiceImpl.java:106) at org.jboss.webservice.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:112) at com.tps.test.testWS1.testServletContextExactAccess(testWS1.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:474) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
My client code is as follows:
public void testServletContextExactAccess() throws Exception { log.debug("CLIENT COMPONENT TALKING TO SERVER: 1 "); URL url = new URL("http://localhost:8080/server-ejb/OrganizationServiceEJB?wsdl"); QName qname = new QName("http://localhost:8080/ws4ee", "OrganizationServiceEJB"); try { ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService(url, qname); OrganizationEndpoint endpoint = (OrganizationEndpoint) service.getPort(OrganizationEndpo int.class); log.debug("CLIENT COMPONENT TALKING TO SERVER: 2 "); String info = endpoint.getContactInfo("TPS"); log.debug("The boss is currently out of office, please call again." + info); log.debug("CLIENT COMPONENT TALKING TO SERVER: 3 "); } catch (Exception e) { log.error("Oops", e); } }
I have all my class path and directories checked and in proper place.
I just want somebody to help me correct me the error and start my
first webservice program. [im using the example given in "EJB server
programming"--JBOSWS, in jboss.org].
Any help is appreciated.
Thanx
ABhi