}
protected void serialize(OMOutputImpl omOutput, boolean cache)
throws XMLStreamException {
XMLStreamWriter writer = omOutput.getXmlStreamWriter();
SerializationContext context = new SerializationContext(writer);
// Write wrapper element
if (ns == null) {
writer.writeStartElement(localName);
} else {
writer.writeStartElement(localName, ns.getName(), ns.getPrefix());
}
Iterator inParams = method.getInParams();
while (inParams.hasNext()) {
RPCParameter parameter = (RPCParameter) inParams.next();
Object value = values.getValue(parameter.getQName());
try {
parameter.serialize(context, value);
} catch (Exception e) {
throw new XMLStreamException("Couldn't serialize RPCParameter",
e);
}
}
writer.writeEndElement();
try {
context.finish();
} catch (Exception e) {
throw new XMLStreamException(e);
}
}