[jboss-user] [JBossWS] - calling a web service from the standlone client

mandarkul do-not-reply at jboss.com
Thu May 10 05:27:51 EDT 2007


I am trying to access a web service deployed on JBoss thtough a statndalone client.
The web service is deployed sucessfully as I can see the web service in JBoss's web service console(jbossws).
But when i execute the following code :


  | public static void main(String[] args) {
  | 		try {
  | 		String nameSpaceURL = "http://webservice.test.com/";
  | 		String webServiceURL = "http://127.0.0.1:4040/MySessionBeanService/MySessionBean?wsdl";
  | 		URL wsdlLocation = new URL(webServiceURL);			
  | 		QName serviceQ = new QName(nameSpaceURL,"testService");		
  | 		Service service = Service.create(wsdlLocation,serviceQ);		
  | 		MySession mysession = service.getPort(MySession.class);					
  | 		mysession.sayHello();		
  | 		} catch (MalformedURLException e) {
  | 			e.printStackTrace();
  | 		}
  | }
  | 
  | 
I get a very strange exception with the stack trace as follows :

Exception in thread "main" java.lang.NoSuchMethodError: javassist.ClassPool.<init>(Z)V
  | 	at org.jboss.ws.core.jaxws.DynamicWrapperGenerator.init(DynamicWrapperGenerator.java:71)
  | 	at org.jboss.ws.core.jaxws.DynamicWrapperGenerator.<init>(DynamicWrapperGenerator.java:66)
  | 	at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.initWrapperGenerator(JAXWSMetaDataBuilder.java:856)
  | 	at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.resetMetaDataBuilder(JAXWSMetaDataBuilder.java:862)
  | 	at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:258)
  | 	at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:274)
  | 	at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:263)
  | 	at javax.xml.ws.Service.getPort(Service.java:185)
  | 	at org.jboss.ws.core.jaxws.client.ServiceExt.getPort(ServiceExt.java:123)
  | 	at sample.WebServiceClient.main(WebServiceClient.java:23)	

I also get a Log4j warning as,

log4j:WARN No appenders could be found for logger (org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder).
  | log4j:WARN Please initialize the log4j system properly.
But I don't think that this warning can lead to such a weird error.

I have following jars from jboss.home/client/lib on classpath :

	jaxb-xjc.jar
	stax-api-1.0.jar
	sjsxp.jar
	jaxb-api.jar
	jaxb-impl.jar
	activation.jar
	jboss-jaxws.jar
	jboss-saaj.jar
	jbossws-client.jar
	jboss-xml-bindig.jar
	stax-api.jar
	xercesImpl.jar
	mail.jar

Can anyone help me to solve the problem?

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

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



More information about the jboss-user mailing list