Package org.apache.axis2.description

Examples of org.apache.axis2.description.PolicyInclude$Wrapper


                //add header ops for input
                addHeaderOperations(soapHeaderInputParameterList, axisBindingOperation, true);
                //add header ops for output
                addHeaderOperations(soapHeaderOutputParameterList, axisBindingOperation, false);

                PolicyInclude policyInclude = axisOperation.getPolicyInclude();
                Policy policy = policyInclude.getPolicy();
                if (policy != null) {
                    try {
                        addAttribute(doc, "policy", PolicyUtil.policyComponentToString(policy),
                                     methodElement);
                    } catch (Exception ex) {
View Full Code Here


                            out.write(outStr.getBytes());
                        }

                    } else {

                        PolicyInclude policyInclude = ((AxisService) serviceObj).getPolicyInclude();
                        Policy effecPolicy = policyInclude.getEffectivePolicy();

                        if (effecPolicy != null) {
                            XMLStreamWriter writer;

                            try {
View Full Code Here

                            out.write(outStr.getBytes());
                        }

                    } else {

                        PolicyInclude policyInclude = ((AxisService) serviceObj).getPolicyInclude();
                        Policy effecPolicy = policyInclude.getEffectivePolicy();

                        if (effecPolicy != null) {
                            XMLStreamWriter writer;

                            try {
View Full Code Here

    return baos.toString();
  }

  public static String generateId(AxisDescription description) {
    PolicyInclude policyInclude = description.getPolicyInclude();
    String identifier = "-policy-1";

    if (description instanceof AxisMessage) {
      identifier = "msg-" + ((AxisMessage) description).getName()
          + identifier;
      description = description.getParent();
    }

    if (description instanceof AxisOperation) {
      identifier = "op-" + ((AxisOperation) description).getName()
          + identifier;
      description = description.getParent();
    }

    if (description instanceof AxisService) {
      identifier = "service-" + ((AxisService) description).getName()
          + identifier;
    }

    /*
     * Int 49 is the value of the Character '1'. Here we want to change '1'
     * to '2' or '2' to '3' .. etc. to construct a unique identifier.
     */
    for (int index = 49; policyInclude.getPolicy(identifier) != null; index++) {
      identifier = identifier.replace((char) index, (char) (index + 1));
    }

    return identifier;
  }
View Full Code Here

    if (axisServiceGroup != null) {
      axisConfiguration = (AxisConfiguration) axisServiceGroup
          .getParent();
    }

    PolicyInclude servicePolicyInclude = axisService.getPolicyInclude();

    List policyList;

    // Policies defined in Axis2.xml
    if (axisConfiguration != null) {
      policyList = axisConfiguration.getPolicyInclude()
          .getPolicyElements(PolicyInclude.AXIS_POLICY);
      addPolicyAsExtElements(description, policyList, wsdlService,
          servicePolicyInclude);
    }

    // Policies defined in wsdl:Service
    policyList = servicePolicyInclude
        .getPolicyElements(PolicyInclude.SERVICE_POLICY);
    addPolicyAsExtElements(description, policyList, wsdlService,
        servicePolicyInclude);

    Iterator wsdlEndpoints = wsdlService.getEndpoints().values().iterator();
View Full Code Here

    populatePolicy(description, wsdlEndpoint, axisService);
  }

  private static void populatePolicy(WSDLDescription description,
      WSDLEndpoint wsdlEndpoint, AxisService axisService) {
    PolicyInclude policyInclude = axisService.getPolicyInclude();
    List policyList = policyInclude
        .getPolicyElements(PolicyInclude.PORT_POLICY);
    addPolicyAsExtElements(description, policyList, wsdlEndpoint,
        policyInclude);

    WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
View Full Code Here

  }

  private static void populatePolicy(WSDLDescription description,
      WSDLInterface wsdlInterface, AxisService axisService) {
    PolicyInclude policyInclude = axisService.getPolicyInclude();
    List policyList = policyInclude
        .getPolicyElements(PolicyInclude.PORT_TYPE_POLICY);
    // addPolicyAsExtAttributes(description, policyList, wsdlInterface,
    // policyInclude);

    Iterator wsdlOperations = wsdlInterface.getOperations().values()
View Full Code Here

  }

  private static void populatePolicy(WSDLDescription description,
      WSDLOperation wsdlOperation, AxisOperation axisOperation) {

    PolicyInclude policyInclude = axisOperation.getPolicyInclude();

    // wsdl:PortType -> wsdl:Operation
    List policyList = policyInclude
        .getPolicyElements(PolicyInclude.OPERATION_POLICY);
    addPolicyAsExtElements(description, policyList, wsdlOperation,
        policyInclude);

    if (WSDLConstants.MEP_URI_IN_ONLY.equals(axisOperation
        .getMessageExchangePattern())) {
      AxisMessage input = axisOperation
          .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
      PolicyInclude policyInclude2 = input.getPolicyInclude();

      // wsdl:PortType -> wsdl:Operation -> wsdl:Input
      List policyList2 = policyInclude2
          .getPolicyElements(PolicyInclude.INPUT_POLICY);
      addPolicyAsExtAttributes(description, policyList2, wsdlOperation
          .getInputMessage(), 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:PortType -> wsdl:Operation -> wsdl:Input
      policyList2 = policyInclude2
          .getPolicyElements(PolicyInclude.INPUT_POLICY);
      addPolicyAsExtAttributes(description, policyList2, wsdlOperation
          .getInputMessage(), policyInclude2);

      AxisMessage output = axisOperation
          .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
      policyInclude2 = output.getPolicyInclude();

      // wsdl:PortType -> wsdl:Operation -> wsdl:Output
      policyList2 = policyInclude2
          .getPolicyElements(PolicyInclude.OUTPUT_POLICY);
      addPolicyAsExtAttributes(description, policyList2, wsdlOperation
          .getOutputMessage(), policyInclude2);
    }
  }
View Full Code Here

    }
  }

  private static void populatePolicy(WSDLDescription description,
      WSDLBinding wsdlBinding, AxisService axisService) {
    PolicyInclude policyInclude = axisService.getPolicyInclude();

    List policyList = policyInclude
        .getPolicyElements(PolicyInclude.AXIS_SERVICE_POLICY);
    addPolicyAsExtElements(description, policyList, wsdlBinding,
        policyInclude);

    policyList = policyInclude
        .getPolicyElements(PolicyInclude.BINDING_POLICY);
    addPolicyAsExtElements(description, policyList, wsdlBinding,
        policyInclude);

    Iterator wsdlOperations = wsdlBinding.getBindingOperations().values()
View Full Code Here

  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);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.PolicyInclude$Wrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.