Examples of SubmissionAddressing


Examples of org.apache.axis2.jaxws.addressing.SubmissionAddressing

     * @see org.apache.axis2.jaxws.feature.ServerConfigurator#configure(org.apache.axis2.jaxws.description.EndpointDescription)
     */
    public void configure(EndpointDescription endpointDescription) {
      Addressing addressing =
        (Addressing) ((EndpointDescriptionJava) endpointDescription).getAnnoFeature(AddressingFeature.ID);
      SubmissionAddressing submissionAddressing =
        (SubmissionAddressing) ((EndpointDescriptionJava) endpointDescription).getAnnoFeature(SubmissionAddressingFeature.ID);
      Parameter namespace = new Parameter(AddressingConstants.WS_ADDRESSING_VERSION, null);
      Parameter disabled = new Parameter(AddressingConstants.DISABLE_ADDRESSING_FOR_IN_MESSAGES, "false");
      Parameter required = new Parameter(AddressingConstants.ADDRESSING_REQUIREMENT_PARAMETER, AddressingConstants.ADDRESSING_UNSPECIFIED);
     
      if (addressing != null && submissionAddressing != null) {
            //Both annotations must have been specified.
            boolean w3cAddressingEnabled = addressing.enabled();
            boolean submissionAddressingEnabled = submissionAddressing.enabled();
           
            if (w3cAddressingEnabled && submissionAddressingEnabled) {
              namespace.setValue(null);

                boolean w3cAddressingRequired = addressing.required();
                boolean submissionAddressingRequired = submissionAddressing.required();

                if (w3cAddressingRequired || submissionAddressingRequired)
                  required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else if (w3cAddressingEnabled) {
              namespace.setValue(AddressingConstants.Final.WSA_NAMESPACE);
             
              if (addressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else if (submissionAddressingEnabled) {
              namespace.setValue(AddressingConstants.Submission.WSA_NAMESPACE);
             
              if (submissionAddressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else {
              disabled.setValue("true");
            }
      }
      else if (addressing != null) {
            //The Addressing annotation must have been specified.
            boolean w3cAddressingEnabled = addressing.enabled();

            if (w3cAddressingEnabled) {
              namespace.setValue(AddressingConstants.Final.WSA_NAMESPACE);
             
              if (addressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else {
              namespace.setValue(AddressingConstants.Submission.WSA_NAMESPACE);
            }
      }
      else if (submissionAddressing != null) {
            //The SubmissionAddressing annotation must have been specified.
            boolean submissionAddressingEnabled = submissionAddressing.enabled();

            if (submissionAddressingEnabled) {
              namespace.setValue(AddressingConstants.Submission.WSA_NAMESPACE);
             
              if (submissionAddressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else {
              namespace.setValue(AddressingConstants.Final.WSA_NAMESPACE);
            }                   
View Full Code Here

Examples of org.apache.axis2.jaxws.addressing.SubmissionAddressing

        if (log.isDebugEnabled()) {
            log.debug("Start configure");
        }
      Addressing addressing =
        (Addressing) ((EndpointDescriptionJava) endpointDescription).getAnnoFeature(AddressingFeature.ID);
      SubmissionAddressing submissionAddressing =
        (SubmissionAddressing) ((EndpointDescriptionJava) endpointDescription).getAnnoFeature(SubmissionAddressingFeature.ID);
      Parameter namespace = new Parameter(AddressingConstants.WS_ADDRESSING_VERSION, null);
      Parameter disabled = new Parameter(AddressingConstants.DISABLE_ADDRESSING_FOR_IN_MESSAGES, "false");
      Parameter required = new Parameter(AddressingConstants.ADDRESSING_REQUIREMENT_PARAMETER, AddressingConstants.ADDRESSING_UNSPECIFIED);
      Parameter responses = null;
     
      if (addressing != null && submissionAddressing != null) {
          if (log.isDebugEnabled()) {
                log.debug("Both Addressing and SubmissionAddressing are specified");
            }
            //Both annotations must have been specified.
            boolean w3cAddressingEnabled = addressing.enabled();
            boolean submissionAddressingEnabled = submissionAddressing.enabled();
           
            if (w3cAddressingEnabled && submissionAddressingEnabled) {
              namespace.setValue(null);

                boolean w3cAddressingRequired = addressing.required();
                boolean submissionAddressingRequired = submissionAddressing.required();

                if (w3cAddressingRequired || submissionAddressingRequired)
                  required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else if (w3cAddressingEnabled) {
              namespace.setValue(AddressingConstants.Final.WSA_NAMESPACE);
             
              if (addressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else if (submissionAddressingEnabled) {
              namespace.setValue(AddressingConstants.Submission.WSA_NAMESPACE);
             
              if (submissionAddressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else {
              disabled.setValue("true");
            }
      }
      else if (addressing != null) {
          if (log.isDebugEnabled()) {
                log.debug("Only Addressing is specified.  SubmissionAddressing is not specified");
            }
            //The Addressing annotation must have been specified.
            boolean w3cAddressingEnabled = addressing.enabled();

            if (w3cAddressingEnabled) {
              namespace.setValue(AddressingConstants.Final.WSA_NAMESPACE);
             
              if (addressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else {
              namespace.setValue(AddressingConstants.Submission.WSA_NAMESPACE);
            }
      }
      else if (submissionAddressing != null) {
          if (log.isDebugEnabled()) {
                log.debug("Only SubmssionAddressing is specified.  Addressing is not specified");
            }
            //The SubmissionAddressing annotation must have been specified.
            boolean submissionAddressingEnabled = submissionAddressing.enabled();

            if (submissionAddressingEnabled) {
              namespace.setValue(AddressingConstants.Submission.WSA_NAMESPACE);
             
              if (submissionAddressing.required())
                required.setValue(AddressingConstants.ADDRESSING_REQUIRED);
            }
            else {
              namespace.setValue(AddressingConstants.Final.WSA_NAMESPACE);
            }                   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.