}
if (targetNamespace != null && !"".equals(targetNamespace)) {
axisService.setTargetNamespace(targetNamespace);
}
JMethod[] method = schemaGenerator.getMethods();
PhasesInfo pinfo = axisConfiguration.getPhasesInfo();
for (int i = 0; i < method.length; i++) {
JMethod jmethod = method[i];
AxisOperation operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
String mep = operation.getMessageExchangePattern();
MessageReceiver mr;
if (messageReceiverClassMap != null) {
if (messageReceiverClassMap.get(mep) != null) {
Object obj = messageReceiverClassMap.get(mep);
if (obj instanceof MessageReceiver) {
mr = (MessageReceiver) obj;
operation.setMessageReceiver(mr);
} else {
log.error(
"Object is not an instance of MessageReceiver, thus, default MessageReceiver has been set");
mr = axisConfiguration
.getMessageReceiver(operation.getMessageExchangePattern());
operation.setMessageReceiver(mr);
}
} else {
log.error(
"Required MessageReceiver couldn't be found, thus, default MessageReceiver has been used");
mr = axisConfiguration
.getMessageReceiver(operation.getMessageExchangePattern());
operation.setMessageReceiver(mr);
}
} else {
log.error(
"MessageRecevierClassMap couldn't be found, thus, default MessageReceiver has been used");
mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
operation.setMessageReceiver(mr);
}
pinfo.setOperationPhases(operation);
axisService.addOperation(operation);
}
return axisService;
}