if (axisService.getEndpointName() != null) {
AxisEndpoint axisEndpoint = axisService
.getEndpoint(axisService.getEndpointName());
if (axisEndpoint != null) {
AxisBinding axisBinding = axisEndpoint.getBinding();
AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisBinding
.getChild(axisOperation.getName());
//If Binding Operation is not found, just return null
if (axisBindingOperation == null) {
return null;
}
String direction;
if (axisMessage != null) {
direction = axisMessage.getDirection();
} else {
if ((FLOW == IN_FLOW) || (FLOW == IN_FAULT_FLOW)) {
direction = WSDLConstants.WSDL_MESSAGE_DIRECTION_IN;
} else {
direction = WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT;
}
}
AxisBindingMessage axisBindingMessage;
if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN
.equals(direction)
&& WSDLUtil
.isInputPresentForMEP(axisOperation
.getMessageExchangePattern())) {
axisBindingMessage = (AxisBindingMessage) axisBindingOperation
.getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
return axisBindingMessage;
} else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT
.equals(direction)
&& WSDLUtil
.isOutputPresentForMEP(axisOperation
.getMessageExchangePattern())) {
axisBindingMessage = (AxisBindingMessage) axisBindingOperation
.getChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
return axisBindingMessage;
}
}