Open GoogleCodeExporter opened 8 years ago
the same for Boolean, Integer[] and Object[]:
...
} else if (value instanceof Boolean) {
return this.typedElement(elementNs, name, ((Boolean) value).toString(), xsd.getPrefix() + ":boolean");
} else if (value instanceof Integer[]) {
/*
* Integer Array is represented by a list of items <item
* SOAP-ENC:arrayType="xsd:int[length]"
* xsi:type="SOAP-ENC:Array"> <item
* xsi:type="xsd:int">123</item> <!-- more items if array
* contains more entries --> </item>
*/
Integer[] intArray = (Integer[]) value;
OMElement arrayArg = fac.createOMElement(name, elementNs);
arrayArg.addAttribute("arrayType", xsd.getPrefix() + ":int[" + intArray.length + "]", soapEnc);
arrayArg.addAttribute("type", soapEnc.getPrefix() + ":Array", xsi);
for (Integer item : intArray) {
arrayArg.addChild(typedElement(elementNs, "item", item));
}
return arrayArg;
} else if (value instanceof Object[]) {
Object[] objArray = (Object[]) value;
OMElement arrayArg = fac.createOMElement(name, elementNs);
arrayArg.addAttribute("arrayType", xsd.getPrefix() + ":ur-type[" + objArray.length + "]", soapEnc);
arrayArg.addAttribute("type", soapEnc.getPrefix() + ":Array", xsi);
for (Object item : objArray) {
arrayArg.addChild(typedElement(elementNs, "item", item));
}
return arrayArg;
} else if...
Original comment by reich...@googlemail.com
on 24 Jan 2011 at 9:44
Original issue reported on code.google.com by
reich...@googlemail.com
on 14 Jan 2011 at 3:11