Skip to main content

complexType definition in SOAP client request

1 reply [Last post]
prashanth29
Offline
Joined: 2005-11-15
Points: 0

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 java.io.Serializable {
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"), "http://schemas.xmlsoap.org/soap/encoding/");

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

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??

Regds,
Prashanth

Reply viewing options

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

Prashanth,
If you would like your question to reach a wider audience,
you should post it to the users@jax-rpc.dev.java.net 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.