List<Class> inputTypes=new ArrayList<Class>();
boolean wrapped = false;
if (operation.getInput() != null && operation.getInput().getMessage()!=null && !operation.getInput().getMessage().getParts().isEmpty()) {
QName qname=((Part)operation.getInput().getMessage().getParts().values().iterator().next()).getElementName();
if (qname!=null) {
Property property = xsdHelper.getGlobalProperty(qname.getNamespaceURI(), qname.getLocalPart(), true);
commonj.sdo.Type type = property.getType();
if (property.getName().equals(operation.getName())) {
String localName = xsdHelper.getLocalName(type);
if (localName.indexOf("_._")!=-1) {
for (Property param : (List<Property>)type.getProperties()) {
Class inputType = param.getType().getInstanceClass();
if (inputType == null)
inputType = Object.class;
inputTypes.add(inputType);
}
wrapped=true;
}
}
// Bare doc style
if (!wrapped) {
Class inputType = type.getInstanceClass();
if (inputType == null)
inputType = Object.class;
inputTypes.add(inputType);
}
} else {
// FIXME only support elements for now
}
}
// Derive the return type from the output message part (also support doc-wrapped and doc-bare here)
Class outputType=Void.class;
if (operation.getOutput() != null && operation.getOutput().getMessage()!=null && !operation.getOutput().getMessage().getParts().isEmpty()) {
QName qname=((Part)operation.getOutput().getMessage().getParts().values().iterator().next()).getElementName();
if (qname!=null) {
Property property = xsdHelper.getGlobalProperty(qname.getNamespaceURI(), qname.getLocalPart(), true);
commonj.sdo.Type type = property.getType();
if (wrapped) {
if (!type.getProperties().isEmpty()) {
outputType=((Property)type.getProperties().get(0)).getType().getInstanceClass();
if (outputType==null)
outputType=Object.class;