On 16 Apr 2008, at 17:57, Smallwood, Rob wrote:
Without being unkind (and I really mean that), I think a java tutorial
explaining the fundamentals would fill in the missing gaps..

Rob,

Without being unkind, I think you should read Mehdi's post more carefully before referring him to a Java tutorial...

His code contains the following instructions:

Class[] returnTypes = new Class[] { Set.class };
Object[] response = serviceClient.invokeBlocking(opFindEntry, opFindEntryArgs, returnTypes);

The point is actually not that his WS returns a Set (this information obviously gets lost when serializing to XML), but that on the client side he explicitly specifies the expected Java type as Set and that RPCServiceClient#invokeBlocking returns an ArrayList instead. I'm neither an expert of RPC nor of ADB, but I'm a bit surprised to see this.

The code in Axis2 that causes this behavior can be found in org.apache.axis2.databinding.utils.BeanUtil#processObject:

if (SimpleTypeMapper.isCollection(classType)) {
    return SimpleTypeMapper.getArrayList(omElement);
}

The logic behind this is indeed a bit questionable, and I think Mehdi's question is perfectly relevant.

Regards,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to