String inputMessageName = methodName + GFacSchemaConstants.SERVICE_REQ_MSG_SUFFIX + "_" + UUID.randomUUID();
inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
inputMessage.setUndefined(false);
PartImpl inPart = (PartImpl) def.createPart();
inPart.setName(PART_NAME);
String inputElementName = methodName + GFacSchemaConstants.SERVICE_IN_PARAMS_SUFFIX;
inPart.setElementName(new QName(typens, inputElementName));
inputMessage.addPart(inPart);
def.addMessage(inputMessage);
InputImpl ip = (InputImpl) def.createInput();
ip.setName(inputMessageName);
ip.setMessage(inputMessage);
operation.setInput(ip);
if (outputParameterTypes.length > 0) {
MessageImpl outputMessage = (MessageImpl) def.createMessage();
String outputMessageName = methodName + GFacSchemaConstants.SERVICE_RESP_MSG_SUFFIX + "_"
+ UUID.randomUUID();
outputMessage.setQName(new QName(def.getTargetNamespace(), outputMessageName));
outputMessage.setUndefined(false);
PartImpl part = (PartImpl) def.createPart();
part.setName(PART_NAME);
String outputElementName = methodName + GFacSchemaConstants.SERVICE_OUT_PARAMS_SUFFIX;
part.setElementName(new QName(typens, outputElementName));
outputMessage.addPart(part);
def.addMessage(outputMessage);
OutputImpl op = (OutputImpl) def.createOutput();
op.setName(outputMessageName);