*/
@SuppressWarnings("unchecked")
private JAXBElement<?> createBodyContentFromObject(final Object inputObject, String soapAction) {
Object graph;
if (inputObject instanceof BeanInvocation) {
BeanInvocation bi = (BeanInvocation) inputObject;
if (bi.getArgs().length > 1) {
throw new RuntimeCamelException(
"SoapDataFormat does not work with Beaninvocations that contain more than 1 parameter");
}
graph = (bi.getArgs().length == 1) ? bi.getArgs()[0] : null;
} else {
graph = inputObject;
}
QName name = elementNameStrategy.findQNameForSoapActionOrType(soapAction, graph.getClass());
return new JAXBElement(name, graph.getClass(), graph);