Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisBinding


            throws DeploymentException {
        Parameter serverCtxParam =
                cfgCtx.getAxisConfiguration().getParameter(
                        SynapseConstants.SYNAPSE_SERVER_CTX_INFO);
        if (serverCtxParam == null) {
            throw new DeploymentException("ServerContextInformation not found. " +
                    "Are you sure that you are running Synapse?");
        }
        return (ServerContextInformation) serverCtxParam.getValue();
    }
View Full Code Here


    private SOAPFactory getSOAPFactory(MessageContext messageContext) throws AxisFault {
        SOAPFactory soapFactory;
        AxisEndpoint axisEndpoint = (AxisEndpoint) messageContext
                .getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
        if (axisEndpoint != null) {
            AxisBinding axisBinding = axisEndpoint.getBinding();
            String soapVersion =
                    (String) axisBinding.getProperty(WSDL2Constants.ATTR_WSOAP_VERSION);
            soapFactory = getSOAPFactory(soapVersion);
        } else {
            soapFactory = getSOAPFactory(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
        }
        return soapFactory;
View Full Code Here

     * @param servicePath - service resource path
     * @param abo         - AxisBindingOperation instance
     * @return - registry resource path
     */
    public static String getBindingOperationPath(String servicePath, AxisBindingOperation abo) {
        AxisBinding binding = abo.getAxisBinding();
        return servicePath + RegistryResources.ServiceProperties.BINDINGS
                + binding.getName().getLocalPart() + RegistryResources.ServiceProperties.OPERATIONS
                + abo.getName().getLocalPart();
    }
View Full Code Here

            for (Object o : endPointMap.entrySet()) {
                scenario = null;

                Map.Entry entry = (Map.Entry) o;
                AxisEndpoint point = (AxisEndpoint) entry.getValue();
                AxisBinding binding = point.getBinding();
                java.util.Collection policies = binding.getPolicySubject()
                        .getAttachedPolicyComponents();
                Iterator policyComponents = policies.iterator();
                String policyId = "";
                while (policyComponents.hasNext()) {
                    PolicyComponent currentPolicyComponent = (PolicyComponent) policyComponents
                            .next();
                    if (currentPolicyComponent instanceof Policy) {
                        policyId = ((Policy) currentPolicyComponent).getId();
                    } else if (currentPolicyComponent instanceof PolicyReference) {
                        policyId = ((PolicyReference) currentPolicyComponent).getURI().substring(1);
                    }

                    // Check whether this is a security scenario
                    scenario = SecurityScenarioDatabase.getByWsuId(policyId);
                }

                // If a scenario is NOT applied to at least one non HTTP
                // binding,
                // we consider the service unsecured.
                if ((scenario == null)
                        && (!binding.getName().getLocalPart().contains("HttpBinding"))) {
                    break;
                }
            }

            // If the binding level policies are not present, check whether there is a policy attached
View Full Code Here

                throw new AxisFault("AxisEndpoint cannot be null.");
            }
        }

        portName = axisEndpoint.getName();
        AxisBinding axisBinding = axisEndpoint.getBinding();
        bindingQName = axisBinding.getName();

        /** In this implementation, we assume that AxisBinding's QName is equal to WSDL bindings QName. */
        wsdlBinding = wsdlDef.getBinding(bindingQName);
        if (wsdlBinding == null) {
            throw new AxisFault("WSDL Binding null for incoming message.");
View Full Code Here

        // at axis2
        Map endPointMap = axisService.getEndpoints();
        for (Object o : endPointMap.entrySet()) {
            Map.Entry entry = (Map.Entry) o;
            AxisEndpoint point = (AxisEndpoint) entry.getValue();
            AxisBinding binding = point.getBinding();
            binding.applyPolicy(policy);
        }

        // handle each module required
        try {
            boolean transactionStarted = Transaction.isStarted();
View Full Code Here

            // at axis2
            Map endPointMap = service.getEndpoints();
            for (Object o : endPointMap.entrySet()) {
                Map.Entry entry = (Map.Entry) o;
                AxisEndpoint point = (AxisEndpoint) entry.getValue();
                AxisBinding binding = point.getBinding();
                Policy policy = binding.getEffectivePolicy();
                removeAssertionsByNamespace(policy, namesapce);
            }

            // handle module removals
            disengageUnusedModuleFromAxisService(serviceName, removedModuleAssociations);
View Full Code Here

            // at axis2
            Map endPointMap = service.getEndpoints();
            for (Object o : endPointMap.entrySet()) {
                Map.Entry entry = (Map.Entry) o;
                AxisEndpoint point = (AxisEndpoint) entry.getValue();
                AxisBinding binding = point.getBinding();
                PolicySubject subject = binding.getPolicySubject();
                subject.detachPolicyComponent(policyKey);
            }


        } catch (Exception e) {
View Full Code Here

        if (axisService == null) {
            throw new AxisFault("invalid service name");
        }

        AxisBinding axisBinding = null;

        // at axis2
        Map endPointMap = axisService.getEndpoints();
        for (Object o : endPointMap.entrySet()) {
            Map.Entry entry = (Map.Entry) o;
            AxisEndpoint point = (AxisEndpoint) entry.getValue();
            if (point.getBinding().getName().getLocalPart().equals(bindingName)) {
                axisBinding = point.getBinding();
                break;
            }
        }

        if (axisBinding == null) {
            throw new AxisFault("invalid binding name");
        }

        PolicySubject bindingPolicy = axisBinding.getPolicySubject();
        List<PolicyComponent> policyList =
                new ArrayList<PolicyComponent>(bindingPolicy.getAttachedPolicyComponents());
        Policy servicePolicy = org.apache.axis2.util.PolicyUtil.getMergedPolicy(policyList,
                                                                                axisService);
View Full Code Here

        if (axisService == null) {
            throw new AxisFault("invalid service name");
        }

        AxisBinding axisBinding = null;

        // at axis2
        Map endPointMap = axisService.getEndpoints();
        for (Object o : endPointMap.entrySet()) {
            Map.Entry entry = (Map.Entry) o;
            AxisEndpoint point = (AxisEndpoint) entry.getValue();
            if (point.getBinding().getName().getLocalPart().equals(bindingName)) {
                axisBinding = point.getBinding();
                break;
            }
        }

        if (axisBinding == null) {
            throw new AxisFault("invalid binding name");
        }

        Policy bindingOperationPolicy = null;
        Iterator operations = axisBinding.getChildren();
        while (operations.hasNext()) {
            AxisBindingOperation currentOperation = (AxisBindingOperation) operations.next();
            if (currentOperation.getName().toString().equals(operationName)) {
                PolicySubject bindingOperationPolicySubject = currentOperation.getPolicySubject();
                List<PolicyComponent> policyList =
View Full Code Here

TOP

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

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.