I am trying to run a standalone java client which will invoke a webservice. My webservice is a session bean implementation and is running and tested with SOAP UI. My client code looks like the following :
1 URL url = new URL ("wsdlURL");
2 QName qname = ("ServiceURI", "ServiceName")
3 ServiceFactory factory = Service.Factory.newInstance();
4 Service service = factory.createService(url, qname);
5 BeanName bean = (BeanName) remote.getPort(BeanName.class);
6 System.out.println( bean.method( String input));
On running this I am getting the following error on line no.6
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException at bean.method(Unknown Source) .....................................
Caused by: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage ........................
After reading some postings on this issue i added the following jars to endorsed dir
activation.jar
jaxb-api.jar
stax-api.jar
in addition to serializer, xalan and xerces, this did not help.
I am using jdk 1.6, JBOSS AS 4.3, Eclipse 3.4.2.
This issue has been discussed in many places in web, but i could not figure out what will actually make it work. Any help will be appreciated.