Hi,
I need to call a method in service which returns HashMap containing key,value pairs. Though I'm able to transmit the HashMap from service to client but when it reaches the client, the HashMap object doesn't contain any values (it is returned empty) I dont know why it is so ? I have checked the service method which is being called, before returning it is printing on the console what its returning, so I assume problem is not with the server(service). I'm using the folowing code to receive HashMap at the client side :
SOAPMappingRegistry smr = new SOAPMappingRegistry();
BeanSerializer bsr = new BeanSerializer();
QName qn = new QName("urn:serviceName", "java.util.HashMap");
smr.mapTypes(Constants.NS_URI_SOAP_ENC, qn, java.util.HashMap.class, bsr, bsr);
call.setSOAPMappingRegistry(smr);
Response resp = null;
try {
resp = call.invoke(serviceURLInstance, "");
} catch(Exception e)
{ System.out.println("Exception ooccured in SOAPClient : "+e);
}
if ( resp.generatedFault() )
{
Fault fault = resp.getFault();
System.out.println("The call failed: ");
System.out.println("Fault Code = " + fault.getFaultCode());
System.out.println("Fault
String = " + fault.getFaultString());
objReturn = (Object) "Fault";
}
else
{
System.out.println("success : "+ resp.getReturnValue().getValue());
return resp.getReturnValue().getValue();
}
Someone pls. help me. !!!
[ August 16, 2002: Message edited by: Sam Cala ]