Skip to main content

complexType definition in SOAP client request

1 reply [Last post]
Joined: 2005-11-15

Hi All,

I am newbie to SOAP and am trying to figure out a way to write a simple SOAP request for one of the webservices deployed on our server.

The service inputs a DTO of the form:-
public class PaymentArrayDTO extends implements {
private PaymentIODTO[] paymentIODTO;
private UserProfileInfoDTO userDTO;

I specify this structur in my SOAP body as:-
Name newList = envelope.createName("gov.ed.fsa.payment.dto.PaymentArrayDTO");
SOAPElement newListElement = bodyElement.addChildElement(newList);

Name paymentIODTO = envelope.createName("paymentIODTO");
SOAPElement paymentIODTOValueElement = newListElement.addChildElement(paymentIODTO);
paymentIODTOValueElement.addAttribute(envelope.createName("xsi:type"), "soapenc:Array");
paymentIODTOValueElement.addAttribute(envelope.createName("soapenc:arrayType"), "gov.ed.fsa.payment.dto.PaymentIODTO[1]");
paymentIODTOValueElement.addAttribute(envelope.createName("xmlns:soapenc"), "");

Name paymentObj = envelope.createName("gov.ed.fsa.payment.dto.PaymentIODTO");
SOAPElement paymentObjElement = paymentIODTOValueElement.addChildElement(paymentObj);
paymentIODTOValueElement.addAttribute(envelope.createName("xmlns:ns1"), "");

But I get an error, javax.xml.soap.SOAPException: org.xml.sax.SAXException: WSWS3136E: Error: No deserializer defined for array type gov.ed.fsa.payment.dto.PaymentIODTO.

I am sure I am specifying it wrong, can someone please give me a sample code to specify an array of DTO's into another DTO??


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-16

If you would like your question to reach a wider audience,
you should post it to the mailing list. This forum is used for discussing JAXB and JAX-WS related issues and from what I can tell you are not using either. The above mailing list maybe more helpful.