how to make a call with a complex type array?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

how to make a call with a complex type array?

Please can someone point out what's wrong with my client?  My service
and wsdl are fine - if I generate a soap message from the wsdl and enter
the parameters I get the right response from the service.  But when I
use the client below I get an exception about finding character data
inside the array (?).  I know the QName bits are OK because I've used
them successfully when I send single objects of this type.

I'm using a wrapped/literal service. First I create an array ( called
entries) of user-defined types.  Then I say inside a try..catch block:

String endpoint = "http://......";
Service  service = new Service();
String method = "storeMultiple";
QName qn = new QName("urn:DictServiceImpl", "DictEntry");
Call call = (Call) service.createCall();
call.registerTypeMapping(DictEntry.class, qn, new  
BeanSerializerFactory(DictEntry.class, qn), new
BeanDeserializerFactory(DictEntry.class, qn));
call.setTargetEndpointAddress( new );
call.setOperationName(new QName("dct", method));
call.addParameter("entries", qn, ParameterMode.IN);
String ret = (String) call.invoke( new Object[] { entries } );

Any help much appreciated.  Thanks in advance.