ExtensionConstants.SCHEMA);
wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
schemaExtensibilityElement.setElement(documentElement);
womDescription.setTypes(wsdlTypes);
WSDLInterface portType = womDescription.createInterface();
portType.setName(new QName(axisService.getName() + "Port"));
Iterator operations = axisService.getOperations().values().iterator();
while (operations.hasNext()) {
AxisOperation axisOperation = (AxisOperation) operations.next();
if (axisOperation.isControlOperation()) {
//we do not need to expose control operation in the WSDL
continue;
}
WSDLOperation wsdlOperation = womDescription.createOperation();
wsdlOperation.setName(axisOperation.getName());
AxisMessage inaxisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
if (inaxisMessage != null) {
MessageReference messageRefinput = wsdlComponentFactory.createMessageReference();
messageRefinput.setElementQName(inaxisMessage.getElementQName());
messageRefinput.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
wsdlOperation.setInputMessage(messageRefinput);
}
try {
AxisMessage outaxisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
if (outaxisMessage != null && outaxisMessage.getElementQName() != null) {
MessageReference messageRefout = wsdlComponentFactory.createMessageReference();
messageRefout.setElementQName(outaxisMessage.getElementQName());
messageRefout.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
wsdlOperation.setOutputMessage(messageRefout);
}
} catch (UnsupportedOperationException e) {
// operation does not have an out message so , no need to do anything here
}
portType.setOperation(wsdlOperation);
}
return portType;
}