Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisBindingMessage


                AxisBindingOperation axisBindingOperation =
                        (AxisBindingOperation) msgContext
                                .getProperty(Constants.AXIS_BINDING_OPERATION);
                if (axisBindingOperation != null) {
                    AxisBindingMessage fault = axisBindingOperation
                            .getFault((String) msgContext.getProperty(Constants.FAULT_NAME));
                    if (fault != null) {
                        Integer code = (Integer) fault.getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
                        if (code != null) {
                            res.setStatus(code.intValue());
                        }
                    }
                }
View Full Code Here


    public Policy getEffectivePolicy() {
        if (LoggingControl.debugLoggingAllowed) {
            checkActivateWarning("getEffectivePolicy");
        }
       
        AxisBindingMessage bindingMessage =
          (AxisBindingMessage) getProperty(Constants.AXIS_BINDING_MESSAGE);
       
        // If AxisBindingMessage is not set, try to find the binding message from the AxisService
        if (bindingMessage == null) {
          bindingMessage = findBindingMessage();
        }
       
        if (bindingMessage != null) {
            return bindingMessage.getEffectivePolicy();
        // If we can't find the AxisBindingMessage, then try the AxisMessage  
        } else if (axisMessage != null) {
            return axisMessage.getEffectivePolicy();           
        } else {
            return null;
View Full Code Here

                    if (axisBindingOperation == null) {
                       return null;
                    }

                    String direction = axisMessage.getDirection();
          AxisBindingMessage axisBindingMessage = null;
          if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN
              .equals(direction)
              && WSDLUtil
                  .isInputPresentForMEP(axisOperation
                      .getMessageExchangePattern())) {
View Full Code Here

        Object property = null;
        // Get the correct AxisBindingOperation coresponding to the AxisOperation
        AxisBindingOperation axisBindingOperation =
                (AxisBindingOperation) axisBinding.getChild(qName);

        AxisBindingMessage axisBindingMessageFault = null;
        AxisBindingMessage axisBindingFault = null;
        if (axisBindingOperation != null) {
            axisBindingMessageFault = (AxisBindingMessage) axisBindingOperation.getFault(key);

            if (axisBindingMessageFault != null) {
                property = axisBindingMessageFault.getProperty(name);
            }

            if (property == null) {
                axisBindingFault = axisBinding.getFault(key);
                property = axisBindingFault.getProperty(name);
            }
        }

        if (property == null) {
            property = WSDL20DefaultValueHolder.getDefaultValue(name);
View Full Code Here

        return property;
    }

    protected Policy getBindingPolicyFromMessage(AxisBindingOperation axisBindingOperation,
                                                 String key) {
        AxisBindingMessage axisBindingMessage = null;

        if (axisBindingOperation != null) {

            axisBindingMessage = (AxisBindingMessage) axisBindingOperation.getChild(key);
            if (axisBindingMessage != null) {
                try {
                    return axisBindingMessage.getEffectivePolicy();
                } catch (RuntimeException ex){
                    log.error(ex.getMessage(), ex);
                }
            }
        }
View Full Code Here

        if (axisBinding != null) {
            axisBindingOperation = (AxisBindingOperation) axisBinding.getChild(qName);

        }

        AxisBindingMessage axisBindingMessage = null;
        if (axisBindingOperation != null) {
            axisBindingMessage = (AxisBindingMessage) axisBindingOperation.getChild(key);
            if (axisBindingMessage != null) {
                property = axisBindingMessage.getProperty(name);
            }

            if (property == null) {
                property = axisBindingOperation.getProperty(name);
            }
View Full Code Here

    if (WSDLUtil.isInputPresentForMEP(axisOperation
        .getMessageExchangePattern())) {
      AxisMessage axisInMessage = axisOperation
          .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
      AxisBindingMessage axisBindingInMessage = new AxisBindingMessage();

      axisBindingInMessage.setName(axisInMessage.getName());
      axisBindingInMessage.setDirection(axisInMessage.getDirection());
      axisBindingInMessage.setAxisMessage(axisInMessage);

      axisBindingInMessage.setParent(axisBindingOperation);
      axisBindingOperation.addChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE,
          axisBindingInMessage);
    }

    if (WSDLUtil.isOutputPresentForMEP(axisOperation
        .getMessageExchangePattern())) {
      AxisMessage axisOutMessage = axisOperation
          .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
      AxisBindingMessage axisBindingOutMessage = new AxisBindingMessage();

      axisBindingOutMessage.setName(axisOutMessage.getName());
      axisBindingOutMessage.setDirection(axisOutMessage.getDirection());
      axisBindingOutMessage.setAxisMessage(axisOutMessage);

      axisBindingOutMessage.setParent(axisBindingOperation);
      axisBindingOperation.addChild(
          WSDLConstants.MESSAGE_LABEL_OUT_VALUE,
          axisBindingOutMessage);
    }

    ArrayList faultMessagesList = axisOperation.getFaultMessages();
    for (Iterator iterator2 = faultMessagesList.iterator(); iterator2
        .hasNext();) {
      AxisMessage axisFaultMessage = (AxisMessage) iterator2.next();
      AxisBindingMessage axisBindingFaultMessage = new AxisBindingMessage();
            axisBindingFaultMessage.setName(axisFaultMessage.getName());
            axisBindingFaultMessage.setFault(true);
      axisBindingFaultMessage.setAxisMessage(axisFaultMessage);
      axisBindingFaultMessage.setParent(axisBindingOperation);
      axisBindingOperation.addFault(axisBindingFaultMessage);
            axisBinding.addFault(axisBindingFaultMessage);
        }

    axisBindingOperation.setAxisOperation(axisOperation);
View Full Code Here

          if (key == 2) {
            bindingOperation.getPolicySubject()
                .attachPolicyComponents(policyComponents);
          } else {
            if ("in".equals(identifiers[2])) {
              AxisBindingMessage bindingInMessage = (AxisBindingMessage) bindingOperation
                  .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
              bindingInMessage.getPolicySubject()
                  .attachPolicyComponents(policyComponents);

            } else if ("out".equals(identifiers[2])) {
              AxisBindingMessage bindingOutMessage = (AxisBindingMessage) bindingOperation
                  .getChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
              bindingOutMessage.getPolicySubject()
                  .attachPolicyComponents(policyComponents);
            } else {
              // FIXME faults
            }
          }
View Full Code Here

                        AxisBindingOperation axisBindingOperation =
                                (AxisBindingOperation) msgContext
                                        .getProperty(Constants.AXIS_BINDING_OPERATION);
                        if (axisBindingOperation != null) {
                            AxisBindingMessage axisBindingMessage = axisBindingOperation.getFault(
                                    (String) msgContext.getProperty(Constants.FAULT_NAME));
                            if(axisBindingMessage != null){
                                Integer code = (Integer) axisBindingMessage
                                        .getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
                                if (code != null) {
                                    response.setStatus(code.intValue());
                                }
                            }
View Full Code Here

                AxisBindingOperation axisBindingOperation =
                        (AxisBindingOperation) msgContext
                                .getProperty(Constants.AXIS_BINDING_OPERATION);
                if (axisBindingOperation != null) {
                    AxisBindingMessage fault = axisBindingOperation
                            .getFault((String) msgContext.getProperty(Constants.FAULT_NAME));
                    if (fault != null) {
                        Integer code = (Integer) fault.getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
                        if (code != null) {
                            res.setStatus(code.intValue());
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.AxisBindingMessage

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.