use of com.sun.xml.ws.wsdl.writer.document.PortType in project metro-jax-ws by eclipse-ee4j.
the class WSDLGenerator method generatePortType.
/**
* Generates the WSDL portType
*/
protected void generatePortType() {
PortType portType = portDefinitions.portType().name(model.getPortTypeName().getLocalPart());
extension.addPortTypeExtension(portType);
for (JavaMethodImpl method : model.getJavaMethods()) {
Operation operation = portType.operation().name(method.getOperationName());
generateParameterOrder(operation, method);
extension.addOperationExtension(operation, method);
switch(method.getMEP()) {
case REQUEST_RESPONSE:
// input message
generateInputMessage(operation, method);
// output message
generateOutputMessage(operation, method);
break;
case ONE_WAY:
generateInputMessage(operation, method);
break;
default:
break;
}
// faults
for (CheckedExceptionImpl exception : method.getCheckedExceptions()) {
QName messageName = new QName(model.getTargetNamespace(), exception.getMessageName());
FaultType paramType = operation.fault().message(messageName).name(exception.getMessageName());
extension.addOperationFaultExtension(paramType, method, exception);
}
}
}
Aggregations