I'm developing a WebService SOAP in Java 1.6 version (constraint of infrastruct of customer) and I need to develop an operation method that take as input an plain object with a String and an array of String, and return an output (after some elaboration). The input object it's made of a String codiceFiscale and the array of String is that field named classificazioni that you see in the code example:
I've this situation on WSDL:
<complexType name="VerificaClassiPFInputDTO">
<sequence>
<element name="codiceFiscale" nillable="true" type="xsd:string" />
<element name="classificazioni" type="xsd:string" nillable="true"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
and this is my INPUT DTO (java side):
public class VerificaClassiPFInputDTO implements Serializable {
private static final long serialVersionUID = -3933923831884051815L;
/**
* Codice Fiscale della PF
*/
private String codiceFiscale = "";
/**
* Array di classificazioni da processare sul codice fiscale passato
*/
private String[] classificazioni = null;
/**
* Costruttore default
*/
public VerificaClassiPFInputDTO() {
super();
}
public String getCodiceFiscale() {
return codiceFiscale;
}
public void setCodiceFiscale(String codiceFiscale) {
this.codiceFiscale = codiceFiscale;
}
public String[] getClassificazioni() {
return classificazioni;
}
public void setClassificazioni(String[] classificazioni) {
this.classificazioni = classificazioni;
}
that String[] it's my array. When I deploy the WS, in a SOAPUI client, the situation for this method is this
and for me is correct. I want "0 on more" String as input in that array, for that field. In this case are three String in the array, and the other string codiceFiscale.
Even in IBM RAD Web Service Explorer tool the situation is this:
so, for me it's ok. But, when I pass more string (in the array) only the last one been processed.
In the code, when I process input, I obtain always an 1 length array of String, with the last one.
So, what's wrong? How can I maps that type of input in WSDL, in the DTO etc? Why does this happen?
If I switct in the DTO the type
from String[] to List<String> classificazioni
don't work that operation, says mismatch type in the format when run, and I try to call method.
Please someone can help me? If I have to change the map in the WSDL, and the DTO accordingly, that's not a problem but how?
What should I put in the WSDL as complextype and consequently in the DTO, in order to have that kind of input?
Please help me....I am going crazy :(



