def.addPortType(portType);
// Create Abstract operations
for (Iterator itr = service.getServiceInfo().getOperations().iterator(); itr.hasNext();)
{
OperationInfo op = (OperationInfo) itr.next();
// Create input message
Message req = createInputMessage(op);
def.addMessage(req);
// Create output message if we have an out MEP
Message res = null;
if (op.getMEP().equals(SoapConstants.MEP_ROBUST_IN_OUT))
{
res = createOutputMessage(op);
def.addMessage(res);
}
// Create the fault messages
List faultMessages = new ArrayList();
for (Iterator faultItr = op.getFaults().iterator(); faultItr.hasNext();)
{
FaultInfo fault = (FaultInfo) faultItr.next();
Fault faultMsg = createFault(op, fault);
if( fault.getDocumentation()!= null ){
faultMsg.setDocumentationElement(createElement(fault.getDocumentation()));
}
faultMessages.add(faultMsg);
}
javax.wsdl.Operation wsdlOp = createOperation(op, req, res, faultMessages);
wsdlOp.setUndefined(false);
portType.addOperation(wsdlOp);
String opDoc = op.getDocumenation();
if( opDoc != null ){
wsdlOp.setDocumentationElement(createElement(opDoc));
}
wsdlOps.put(op.getName(), wsdlOp);
}
return portType;
}