axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Lambert <>
Subject HashMap serialization problem with Axis2
Date Thu, 26 Feb 2009 09:00:28 GMT
Dear Axis Users/Developers

I recently try Axis2 and I realised that something is missing comparing
to Axis1.
I have a web service class with a function like :

public String myFunction (HashMap map)

With both version of axis installed under a tomcat, it is generating
without problem a wsdl.
But when I try to implement a client to the web service, I have some
problem with Axis2

Axis1 serialized without problem the HashMap whereas Axis2 doesn't
With Axis1 it was really simple, one just have to write in the service
client something like:

String ret = (String) call.invoke( new Object[] {map} );

with Axis2 I tried (in a RPC client)

QName opExecACommand = new QName("http://...", "execACommand");
 Object[] opExecACommandArgs = new Object[] {args};
 Class[] returnTypes = new Class[] { String.class };
// Invoking the method
  Object[] response = rpcServiceClient.invokeBlocking(opExecACommand,

But obviously, argument received by the web service is empty....

What is the solution to serialize a HashMap correctly with Axis2 ?

Fabian Lambert

View raw message