You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by chan <kc...@hknet.com> on 2001/03/20 00:03:42 UTC
serializer for an object with internal array
how can a complex object with an internal array be serialized?
public class Invoice
{
String name;
int amount;
int array[];
i tried the following but the array was ignored by the system.
SOAPMappingRegistry registry = new SOAPMappingRegistry();
QName qname = new QName( "urn:my_encoding", "Invoice" );
BeanSerializer serializer = new BeanSerializer();
registry.mapTypes( Constants.NS_URI_SOAP_ENC, qname, arrayt.Invoice.class, serializer, serializer );
Invoice inv=new Invoice( "MyInvoice", 42, new int[]{30,40,50 } );
params.addElement( new Parameter( "invoice", arrayt.Invoice.class, inv, null ) );
call.setParams( params );
can anybody help me please? thanks.
kenny