throw new IOException(Messages.getMessage("can not serialize!"));
}
MessageContext msgContext = context.getMessageContext();
SchemaVersion schema = SchemaVersion.SCHEMA_2001;
SOAPConstants soap = SOAPConstants.SOAP11_CONSTANTS;
if(msgContext != null) {
schema = msgContext.getSchemaVersion();
soap = msgContext.getSOAPConstants();
}
try {
int typeIdx = attributes.getIndex (schema.getXsiURI(), "type");
if (typeIdx >= 0) {
String prefixForSoapEnc
= context.getPrefixForURI(soap.getEncodingURI());
if (logger.isDebugEnabled ()) {
logger.debug
("Type is \"" + attributes.getValue(typeIdx) + "\""
+ " (\""+prefixForSoapEnc+":Array\" denotes array)");
}
if (attributes.getValue(typeIdx)
.equals(prefixForSoapEnc + ":Array")
&& attributes.getIndex(soap.getEncodingURI(),
soap.getAttrItemType()) == -1) {
AttributesImpl attrs = new AttributesImpl (attributes);
attrs.addAttribute
(soap.getEncodingURI(), soap.getAttrItemType(),
prefixForSoapEnc + ":arrayType", "CDATA",
determineArrayType ((SAXEventBuffer)value, context));
attributes = attrs;
}
}