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.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883929#3883929

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883929


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to