throw new CompilationException(__cmsgs.errUndeclaredCorrelationSet(csetName));
}
@SuppressWarnings("unchecked")
public OMessageVarType resolveMessageType(QName messageType) {
OMessageVarType msgType = _oprocess.messageTypes.get(messageType);
if (msgType == null) {
Message msg = _wsdlRegistry.getMessage(messageType);
if (msg == null) {
throw new CompilationException(__cmsgs.errUndeclaredMessage(messageType.getLocalPart(), messageType
.getNamespaceURI()));
}
List<OMessageVarType.Part> parts = new ArrayList<OMessageVarType.Part>();
CollectionsX.transform(parts, ((Map<String, Part>) msg.getParts()).values(),
new UnaryFunction<Part, OMessageVarType.Part>() {
public OMessageVarType.Part apply(Part part) {
OVarType partType;
if (part.getElementName() != null) {
partType = resolveElementType(part.getElementName());
} else {
partType = resolveXsdType(part.getTypeName());
}
OMessageVarType.Part opart = new OMessageVarType.Part(_oprocess, part.getName(), partType);
opart.debugInfo = createDebugInfo(_processDef, "Message Variable Part: " + part.getName());
return opart;
}
});
msgType = new OMessageVarType(_oprocess, msg.getQName(), parts);
msgType.debugInfo = createDebugInfo(_processDef, "Message Type: " + msg.getQName());
_oprocess.messageTypes.put(msg.getQName(), msgType);
}
return msgType;
}