axisBindingOperation
.addChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE, axisBindingOutMessage);
}
}
BindingOutput wsdl4jBindingOutput = wsdl4jBindingOperation.getBindingOutput();
if (isServerSide) {
if (wsdl4jBindingOutput != null &&
WSDLUtil.isOutputPresentForMEP(axisOperation.getMessageExchangePattern())) {
AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();
axisBindingOutMessage.setParent(axisBindingOperation);
addDocumentation(axisBindingOutMessage, wsdl4jBindingOutput.getDocumentationElement());
AxisMessage axisOutMessage =
axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
copyExtensibleElements(wsdl4jBindingOutput.getExtensibilityElements(),
wsdl4jDefinition,
axisBindingOutMessage, BINDING_OPERATION_OUTPUT);
//This is a hack to get AXIS2-2771 working , I had to copy soap headers
// from binding message to AxisMessage
List soapHeaders =
(List) axisBindingOutMessage.getProperty(WSDL2Constants.ATTR_WSOAP_HEADER);
if (soapHeaders != null) {
for (int i = 0; i < soapHeaders.size(); i++) {
SOAPHeaderMessage headerMessage = (SOAPHeaderMessage) soapHeaders.get(i);
axisOutMessage.addSoapHeader(headerMessage);
}
}
if (isSetMessageQNames) {
BindingOperationEntry boe = find(wrappableBOEs, wsdl4jBindingOperation);
boolean isWrapped = (boe == null) ? false : boe.isWrappedOutput();
axisOutMessage.setWrapped(isWrapped);
addQNameReference(axisOutMessage, wsdl4jOperation,
wsdl4jBindingOutput,
isWrapped);
}
axisBindingOutMessage.setAxisMessage(axisOutMessage);
axisBindingOutMessage.setName(axisOutMessage.getName());
axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
axisBindingOperation
.addChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE, axisBindingOutMessage);
}
} else {
if (wsdl4jBindingOutput != null &&
WSDLUtil.isInputPresentForMEP(axisOperation.getMessageExchangePattern())) {
AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();
axisBindingInMessage.setParent(axisBindingOperation);
addDocumentation(axisBindingInMessage, wsdl4jBindingOutput.getDocumentationElement());
AxisMessage axisInMessage =
axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
copyExtensibleElements(wsdl4jBindingOutput.getExtensibilityElements(),
wsdl4jDefinition,
axisBindingInMessage, BINDING_OPERATION_INPUT);
//This is a hack to get AXIS2-2771 working , I had to copy soap headers
// from binding message to AxisMessage