xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Patil <deepak_pa...@centegy.com>
Subject Array of object serialization....
Date Wed, 09 Aug 2000 03:02:52 GMT
Hi,

Have anyone used the ArraySerializer to serialize an Object Array....
My Code is as below....
               ArraySerializer aSer = new ArraySerializer();
                Object[] data = new String[2];
                data[0] = new String("Deepak");
                data[1] = new String("Patil");

		smr.mapTypes(Constants.NS_URI_SOAP_ENC,
				   new QName("urn:ibm-soap-test-demo",
"Array"),
				   Object[].class, aSer, aSer);

		Vector params = new Vector();
		params.addElement(new Parameter("rootElement",
Object[].class, (Object[]) data, Constants.NS_URI_SOAP_ENC));

		// Build the call.
		Call call = new Call();

		call.setSOAPMappingRegistry(smr);
		call.setTargetObjectURI("urn:myDecoderNew");
		call.setMethodName("decodeMessage");
		call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

		call.setParams(params);

		// Invoke the call.
		Response resp;
		try
		{
		  resp = call.invoke(url, "");
		}

But getting an exception :
[SOAPException: faultCode=SOAP-ENV:Server; msg=Argument is not an array;
targetException=java.lang.I
llegalArgumentException: Argument is not an array]

Any help !!!

Thanks
Deepak

Mime
View raw message