Input wsdl4jInput = wsdl4jOperation.getInput();
BindingInput wsdl4jBindingInput = wsdl4jBindingOperation
.getBindingInput();
Message wsdl4jInputMessage = wsdl4jInput.getMessage();
AxisMessage axisInputMessage = axisOperation
.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
// ////////////////// adding Policies /////////////////////////
PolicyInclude inputPolicyInclue = axisInputMessage
.getPolicyInclude();
inputPolicyInclue.setPolicyRegistry(operationPolicyInclude.getPolicyRegistry());
List inputMessagePolicies;
// wsdl:PortType -> wsdl:Operation -> wsdl:Input
inputMessagePolicies = getPoliciesAsExtAttributes(wsdl4jInput
.getExtensionAttributes());
addPolicyElements(PolicyInclude.INPUT_POLICY,
inputMessagePolicies, inputPolicyInclue);
// wsdl:Binding -> wsdl:Operation -> wsdl:Input
inputMessagePolicies = getPoliciesAsExtElements(wsdl4jBindingInput
.getExtensibilityElements());
addPolicyElements(PolicyInclude.BINDING_INPUT_POLICY,
inputMessagePolicies, inputPolicyInclue);
// wsdl:Message
inputMessagePolicies = getPoliciesAsExtElements(wsdl4jInputMessage
.getExtensibilityElements());
addPolicyElements(PolicyInclude.MESSAGE_POLICY,
inputMessagePolicies, inputPolicyInclue);
// /////////////////////////////////////////////////////////////
// setting the element qname
QName elementName = generateReferenceQname(
new QName(wsdl4jPortType.getQName().getNamespaceURI(),
wsdl4jOperation.getName()), wsdl4jInputMessage,
findWrapppable(wsdl4jInputMessage),
resolvedRPCWrapperElements);
axisInputMessage.setElementQName(elementName);
// setting wsa:Action
String wsaActionForInput = getWsaAction(wsdl4jInput
.getExtensionAttributes());
if (wsaActionForInput != null
&& wsaActionForInput.length() != 0) {
axisService.mapActionToOperation(wsaActionForInput,
axisOperation);
}
Output wsdl4jOutput = wsdl4jOperation.getOutput();
BindingOutput wsdl4jBindingOutput = wsdl4jBindingOperation
.getBindingOutput();
if (wsdl4jOutput != null) {
AxisMessage axisOutputMessage = axisOperation
.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
Message wsdl4jOutputMessage = wsdl4jOutput.getMessage();
// ///////////// adding Policies ///////////////////////////
PolicyInclude outputPolicyInclude = axisOutputMessage
.getPolicyInclude();
outputPolicyInclude.setPolicyRegistry(operationPolicyInclude.getPolicyRegistry());
List outputPolicies;
// wsdl:Output
outputPolicies = getPoliciesAsExtAttributes(wsdl4jOutput
.getExtensionAttributes());
addPolicyElements(PolicyInclude.OUTPUT_POLICY,
outputPolicies, outputPolicyInclude);
if (wsdl4jBindingOutput != null) {
// BindingOutput
outputPolicies = getPoliciesAsExtElements(wsdl4jBindingOutput
.getExtensibilityElements());
if (outputPolicies != null) {
addPolicyElements(PolicyInclude.BINDING_OUTPUT_POLICY,
outputPolicies, outputPolicyInclude);
}
}
// wsdl:Message
outputPolicies = getPoliciesAsExtElements(wsdl4jOutputMessage
.getExtensibilityElements());
addPolicyElements(PolicyInclude.MESSAGE_POLICY,
outputPolicies, outputPolicyInclude);
// /////////////////////////////////////////////////////////
// setting the element qname
QName outElementName = generateReferenceQname(
new QName(wsdl4jOperation.getName()),
wsdl4jOutputMessage,
findWrapppable(wsdl4jOutputMessage),
resolvedRPCWrapperElements);
axisOutputMessage.setElementQName(outElementName);
// setting the wsa:Action
String wsaActionForOutput = getWsaAction(wsdl4jOutput
.getExtensionAttributes());
if (wsaActionForOutput != null