Examples of AxisBindingOperation


Examples of org.apache.axis2.description.AxisBindingOperation

     * @return AxisBindingOperation having default SOAP 1.1 values
     */
    private AxisBindingOperation createDefaultSOAP11BindingOperation(AxisOperation axisOp,
                                                                     String httpLocation,
                                                                     String inputAction) {
        AxisBindingOperation soap11BindingOperation = new AxisBindingOperation();
        soap11BindingOperation.setAxisOperation(axisOp);
        soap11BindingOperation.setName(axisOp.getName());
        soap11BindingOperation.setParent(soap11Binding);
        soap11BindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocation);
        soap11Binding.addChild(soap11BindingOperation.getName(), soap11BindingOperation);
        soap11BindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, inputAction);
        return soap11BindingOperation;
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

            String outAction = "urn:" + operationName + Java2WSDLConstants.RESPONSE;
            axisOperation.setSoapAction(inputAction);
            axisOperation.setOutputAction(outAction);

            // Create a default SOAP 1.1 Binding operation
            AxisBindingOperation soap11BindingOperation =
                    createDefaultSOAP11BindingOperation(axisOperation, httpLocation, inputAction);

            // Create a default SOAP 1.2 Binding operation
            AxisBindingOperation soap12BindingOperation =
                    createDefaultSOAP12BindingOperation(axisOperation, httpLocation, inputAction);

            // Create a default HTTP Binding operation
            AxisBindingOperation httpBindingOperation =
                    createDefaultHTTPBindingOperation(axisOperation, httpLocation, httpMethod,
                            annotationParser.isIgnoreUncited());

            /*
            We need to extract a constant value from the httpLocation so that the
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

                                     MessageContext messageContext)
            throws AxisFault {

        MultipleEntryHashMap parameterMap = new MultipleEntryHashMap();
        SOAPFactory soapFactory;
        AxisBindingOperation axisBindingOperation =
                (AxisBindingOperation) messageContext.getProperty(
                        Constants.AXIS_BINDING_OPERATION);
        String queryParameterSeparator = null;
        String templatedPath = null;
        if (axisBindingOperation != null) {
            queryParameterSeparator = (String) axisBindingOperation
                    .getProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR);
            templatedPath =
                    (String) axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION);
        }
        if (queryParameterSeparator == null) {
            queryParameterSeparator =
                    WSDL20DefaultValueHolder.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT;
        }
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

      if (axisService.getEndpointName() != null) {
        AxisEndpoint axisEndpoint = axisService
            .getEndpoint(axisService.getEndpointName());
        if (axisEndpoint != null) {
          AxisBinding axisBinding = axisEndpoint.getBinding();
                    AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisBinding
              .getChild(axisOperation.getName());

                    //If Binding Operation is not found, just return null
                    if (axisBindingOperation == null) {
                       return null;
                    }

                    String direction = axisMessage.getDirection();
          AxisBindingMessage axisBindingMessage = null;
          if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN
              .equals(direction)
              && WSDLUtil
                  .isInputPresentForMEP(axisOperation
                      .getMessageExchangePattern())) {
            axisBindingMessage = (AxisBindingMessage) axisBindingOperation
                .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            return axisBindingMessage;

          } else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT
              .equals(direction)
              && WSDLUtil
                  .isOutputPresentForMEP(axisOperation
                      .getMessageExchangePattern())) {
            axisBindingMessage = (AxisBindingMessage) axisBindingOperation
                .getChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            return axisBindingMessage;
          }
        }
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

                        + axisBinding.getName().getLocalPart());

        // Add binding operations
        Iterator operations = axisBinding.getChildren();
        while (operations.hasNext()) {
            AxisBindingOperation bo = (AxisBindingOperation) operations.next();
            writeAxisDescription(bo, bo.getName().getLocalPart(),
                    PersistenceUtils.getBindingOperationPath(serviceResourcePath, bo));
        }
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

                    loadPolicies(currentAxisBinding, getPropertyValues(bindingPath,
                            RegistryResources.ServiceProperties.POLICY_UUID),
                            serviceResourcePath);
                    Iterator operationsItr = currentAxisBinding.getChildren();
                    while (operationsItr.hasNext()) {
                        AxisBindingOperation bindingOp = (AxisBindingOperation) operationsItr.next();

                        // Fetch and attach binding operation policies
                        String bindingOpPath = PersistenceUtils
                                .getBindingOperationPath(serviceResourcePath, bindingOp);
                        if (configRegistry.resourceExists(bindingOpPath)) {
                            loadPolicies(bindingOp, getPropertyValues(bindingOpPath,
                                    RegistryResources.ServiceProperties.POLICY_UUID),
                                    serviceResourcePath);
                            // Fetch and attach MessageIn policies for this operation
                            loadPolicies(bindingOp.getChild(
                                    WSDLConstants.MESSAGE_LABEL_IN_VALUE), getPropertyValues(
                                    bindingOpPath, RegistryResources.ServiceProperties
                                            .MESSAGE_IN_POLICY_UUID), serviceResourcePath);
                            // Fetch and attach MessageOut policies for this operation
                            loadPolicies(bindingOp.getChild(
                                    WSDLConstants.MESSAGE_LABEL_OUT_VALUE), getPropertyValues(
                                    bindingOpPath, RegistryResources.ServiceProperties
                                            .MESSAGE_OUT_POLICY_UUID), serviceResourcePath);
                        } else {
                            writeAxisDescription(bindingOp, bindingOp.getName().getLocalPart(),
                                    PersistenceUtils.getBindingOperationPath(
                                            serviceResourcePath, bindingOp));
                        }
                    }
                } else {
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

            }

            // Get Binding Operation Policies
            Iterator operations = currentAxisBinding.getChildren();
            while (operations.hasNext()) {
                AxisBindingOperation currentOperation = (AxisBindingOperation) operations.next();
                String opPath = PersistenceUtils
                        .getBindingOperationPath(serviceResourcePath, currentOperation);
                if (!configRegistry.resourceExists(opPath)) {
                    continue;
                }
                Resource bindingOperationResource = configRegistry.get(opPath);

                // Get current binding operation policy
                List<PolicyComponent> boPolicyList = new ArrayList<PolicyComponent>(
                        currentOperation.getPolicySubject().getAttachedPolicyComponents());
                Policy boPolicy = PolicyUtil.getMergedPolicy(boPolicyList, currentOperation);

                if (boPolicy != null) {
                    // Add this policy as a resource to the list
                    addPolicyResource(policyResources,
                            boPolicy, PolicyInclude.BINDING_OPERATION_POLICY);
                    // Refer this policy from the binding operation
                    bindingOperationResource.setProperty(RegistryResources
                            .ServiceProperties.POLICY_UUID, boPolicy.getId());
                }

                // Get Binding Operation Message Policies
                AxisDescription boMessageIn = currentOperation
                        .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (boMessageIn != null) {
                    List<PolicyComponent> boMessageInPolicyList = new ArrayList<PolicyComponent>(
                            boMessageIn.getPolicySubject().getAttachedPolicyComponents());
                    Policy boMessageInPolicy = PolicyUtil
                            .getMergedPolicy(boMessageInPolicyList, boMessageIn);

                    if (boMessageInPolicy != null) {
                        // Add this policy as a resource to the list
                        addPolicyResource(policyResources,
                                boMessageInPolicy, PolicyInclude.BINDING_INPUT_POLICY);
                        // Refer this policy from the binding operation
                        bindingOperationResource.setProperty(RegistryResources.ServiceProperties
                                .MESSAGE_IN_POLICY_UUID, boMessageInPolicy.getId());
                    }
                }

                // Get binding operaion out policy
                AxisDescription boMessageOut = currentOperation
                        .getChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                if (boMessageOut != null) {
                    List<PolicyComponent> boMessageOutPolicyList = new ArrayList<PolicyComponent>(
                            boMessageOut.getPolicySubject().getAttachedPolicyComponents());
                    Policy boMessageOutPolicy = PolicyUtil
View Full Code Here

Examples of org.apache.axis2.description.AxisBindingOperation

                    if (AddressingHelper.isFaultRedirected(msgContext)) {
                        response.setStatus(HttpServletResponse.SC_ACCEPTED);
                    } else {
                        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

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

Examples of org.apache.axis2.description.AxisBindingOperation

                    res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                } else {
                    res.setStatus(Integer.parseInt(status));
                }

                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

Examples of org.apache.axis2.description.AxisBindingOperation

        String portTypeName = makeCClassName(axisService.getName());

        Iterator bindingOperations = this.axisBinding.getChildren();
        boolean opsFound = false;
        AxisOperation axisOperation = null;
        AxisBindingOperation axisBindingOperation = null;

        while (bindingOperations.hasNext()) {

            axisBindingOperation = (AxisBindingOperation) bindingOperations.next();
            axisOperation = axisBindingOperation.getAxisOperation();

            // populate info holder with mep information. This will used in determining which
            // message receiver to use, etc.,

            String messageExchangePattern = axisOperation.getMessageExchangePattern();
            if (infoHolder.get(messageExchangePattern) == null) {
                infoHolder.put(messageExchangePattern, Boolean.TRUE);
            }

            if (mep == null) {

                opsFound = true;

                List soapHeaderInputParameterList = new ArrayList();
                List soapHeaderOutputParameterList = new ArrayList();

                methodElement = doc.createElement("method");

                String localPart = axisOperation.getName().getLocalPart();
                String opCName = makeCClassName(localPart);
                String opNS = axisOperation.getName().getNamespaceURI();

                addAttribute(doc, "name", opCName, methodElement);
                addAttribute(doc, "localpart", localPart, methodElement);
                addAttribute(doc, "qname", localPart + "|" + opNS, methodElement);

                addAttribute(doc, "namespace", opNS, methodElement);
                String style = axisOperation.getStyle();
                addAttribute(doc, "style", style, methodElement);
                addAttribute(doc, "dbsupportname",
                             portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
                             methodElement);


                addAttribute(doc, "mep", Utils.getAxisSpecifMEPConstant(
                        axisOperation.getMessageExchangePattern()) + "", methodElement);
                addAttribute(doc, "mepURI", axisOperation.getMessageExchangePattern(),
                             methodElement);


                addSOAPAction(doc, methodElement, axisBindingOperation.getName());
                //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) {
                        throw new RuntimeException("can't serialize the policy to a String ", ex);
                    }
                }

                methodElement.appendChild(
                        getInputElement(doc, axisBindingOperation, soapHeaderInputParameterList));
                methodElement.appendChild(
                        getOutputElement(doc, axisBindingOperation, soapHeaderOutputParameterList));
                methodElement.appendChild(getFaultElement(doc, axisOperation));

                rootElement.appendChild(methodElement);
            } else {
                //mep is present - we move ahead only if the given mep matches the mep of this operation

                if (mep.equals(axisOperation.getMessageExchangePattern())) {
                    //at this point we know it's true
                    opsFound = true;
                    List soapHeaderInputParameterList = new ArrayList();
                    List soapHeaderOutputParameterList = new ArrayList();
                    List soapHeaderFaultParameterList = new ArrayList();
                    methodElement = doc.createElement("method");
                    String localPart = axisOperation.getName().getLocalPart();
                    String opCName = makeCClassName(localPart);
                    String opNS = axisOperation.getName().getNamespaceURI();

                    addAttribute(doc, "name", opCName, methodElement);
                    addAttribute(doc, "localpart", localPart, methodElement);
                    addAttribute(doc, "qname", localPart + "|" + opNS, methodElement);

                    addAttribute(doc, "namespace", axisOperation.getName().getNamespaceURI(),
                                 methodElement);
                    addAttribute(doc, "style", axisOperation.getStyle(), methodElement);
                    addAttribute(doc, "dbsupportname",
                                 portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
                                 methodElement);

                    addAttribute(doc, "mep", Utils.getAxisSpecifMEPConstant(
                            axisOperation.getMessageExchangePattern()) + "", methodElement);
                    addAttribute(doc, "mepURI", axisOperation.getMessageExchangePattern(),
                                 methodElement);


                    addSOAPAction(doc, methodElement, axisBindingOperation.getName());
                    addHeaderOperations(soapHeaderInputParameterList, axisBindingOperation, true);
                    addHeaderOperations(soapHeaderOutputParameterList, axisBindingOperation, false);

                    /*
                     * Setting the policy of the operation
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.