private static void populatePolicy(WSDLDescription description,
WSDLBindingOperation wsdlBindingOperation,
AxisOperation axisOperation) {
PolicyInclude policyInclude = axisOperation.getPolicyInclude();
List policyList = policyInclude
.getPolicyElements(PolicyInclude.BINDING_OPERATION_POLICY);
addPolicyAsExtElements(description, policyList, wsdlBindingOperation,
policyInclude);
//
policyList = policyInclude
.getPolicyElements(PolicyInclude.AXIS_OPERATION_POLICY);
addPolicyAsExtElements(description, policyList, wsdlBindingOperation,
policyInclude);
if (WSDLConstants.MEP_URI_IN_ONLY.equals(axisOperation
.getMessageExchangePattern())) {
AxisMessage input = axisOperation
.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
PolicyInclude policyInclude2 = input.getPolicyInclude();
// wsdl:Binding -> wsdl:Operation -> wsdl:Input
List policyList2 = policyInclude2
.getPolicyElements(PolicyInclude.INPUT_POLICY);
addPolicyAsExtElements(description, policyList2,
wsdlBindingOperation.getInput(), policyInclude2);
//
policyList2 = policyInclude2
.getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
addPolicyAsExtElements(description, policyList2,
wsdlBindingOperation.getInput(), policyInclude2);
} else if (WSDLConstants.MEP_URI_IN_OUT.equals(axisOperation
.getMessageExchangePattern())) {
PolicyInclude policyInclude2;
List policyList2;
AxisMessage input = axisOperation
.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
policyInclude2 = input.getPolicyInclude();
// wsdl:Binding -> wsdl:Operation -> wsdl:Input
policyList2 = policyInclude2
.getPolicyElements(PolicyInclude.INPUT_POLICY);
addPolicyAsExtElements(description, policyList2,
wsdlBindingOperation.getInput(), policyInclude2);
//
policyList2 = policyInclude2
.getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
addPolicyAsExtElements(description, policyList2,
wsdlBindingOperation.getInput(), policyInclude2);
AxisMessage output = axisOperation
.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
policyInclude2 = output.getPolicyInclude();
// wsdl:Binding -> wsdl:Operation -> wsdl:Output
policyList2 = policyInclude2
.getPolicyElements(PolicyInclude.OUTPUT_POLICY);
addPolicyAsExtElements(description, policyList2,
wsdlBindingOperation.getOutput(), policyInclude2);
//
policyList2 = policyInclude2
.getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
addPolicyAsExtElements(description, policyList2,
wsdlBindingOperation.getInput(), policyInclude2);
}
}