I'm trying to run a webservice client as described by the jbossws-userguide.pdf that goes with jbossws-1.0.4GA. I'm using jboss-4.0.5GA
The client should connect to a JSR181 webservice. I use a J2EE application jar that should allow me to use JNDI to access the webapplication from my simple client.
I get the following exception:
[java] 02:46:33,062 ERROR [ServiceObjectFactory] Cannot create service
[java] javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
[java] at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:126)
[java] at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
[java] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
[java] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
[java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
[java] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
[java] at $Proxy0.lookup(Unknown Source)
[java] at javax.naming.InitialContext.lookup(Unknown Source)
[java] at Main.main(Unknown Source)
The source code of the client:
InitialContext iniCtx0 = new InitialContext();
Hashtable env = iniCtx0.getEnvironment();
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
env.put("j2ee.clientName", "jbossws-client");
System.out.println(env);
InitialContext iniCtx = new InitialContext(env);
MyFirstService service = (MyFirstService) iniCtx
.lookup("java:comp/env/service/MyFirstService");
HelloIF port = service.getHelloIFPort();
System.out.println(port.sayHello());
I don't know what I'm doing wrong.
Everything runs from ant scripts which are executed by Eclipse.
Any help would be much apreciated