Examples of UnifiedEndpoint


Examples of org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint

                    */
                    EndpointConfiguration endpointConf =
                            ((ProcessConfigurationImpl) processConfiguration).getEndpointConfiguration(
                                    new WSDL11Endpoint(this.serviceName, portName));

                    UnifiedEndpoint partnerEndpoint = buildUnifiedEndpoint(endpointConf);

                    SOAPUtils.createSOAPRequest(partnerInvocationContext, partnerRoleMessageExchange);


                    String mexEndpointUrl =
                            ((MutableEndpoint) partnerRoleMessageExchange.getEndpointReference())
                                    .getUrl();
                    if (!endpointUrl.equals(mexEndpointUrl)) {
                        partnerEndpoint.setAddress(mexEndpointUrl);
                    }


                    OperationClient opClient = getOperationClient(isTwoWay, mctx);
                    mctx.getOptions().setParent(opClient.getOptions());

                    /*
                     Else we assume that the epr is not changed by the process.
                     In this case there's a limitation we cannot invoke the epr in the wsdl
                     (by assingning that epr by partnerlink assign) if there is a endpoint
                     configuration available for that particular service
                    */
                    opClient.addMessageContext(mctx);
                    Options operationOptions = opClient.getOptions();

                    if (partnerEndpoint.isAddressingEnabled()) {
                        //Currently we set the action manually, but this should be handled by
                        // addressing module it-self?
                        String action = getAction(partnerRoleMessageExchange.getOperationName());
                        if (log.isDebugEnabled()) {
                            log.debug("Soap action: " + action + " found");
View Full Code Here

Examples of org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint

    }

    private UnifiedEndpoint buildUnifiedEndpoint(EndpointConfiguration endpointConfiguration) throws AxisFault {
        UnifiedEndpointFactory uepFactory = new UnifiedEndpointFactory();
        UnifiedEndpoint partnerEndpoint;
        if (endpointConfiguration != null && (endpointConfiguration.getUnifiedEndPoint() != null ||
                endpointConfiguration.getUnifiedEndPointReference() != null)) {
            if (endpointConfiguration.getUnifiedEndPoint() != null) {
                partnerEndpoint = uepFactory.createEndpoint(endpointConfiguration.getUnifiedEndPoint());
            } else {
                String uepConfPath = endpointConfiguration.getUnifiedEndPointReference();
                if (!uepConfPath.startsWith(UnifiedEndpointConstants.VIRTUAL_GOV_REG) ||
                        !uepConfPath.startsWith(UnifiedEndpointConstants.VIRTUAL_CONF_REG) ||
                        !uepConfPath.startsWith(UnifiedEndpointConstants.VIRTUAL_REG)) {
                    if (uepConfPath.startsWith(UnifiedEndpointConstants.VIRTUAL_FILE)) {
                        uepConfPath = uepConfPath.substring(UnifiedEndpointConstants.VIRTUAL_FILE.
                                length());
                    }
                    if (isAbsoutePath(uepConfPath)) {
                        uepConfPath = UnifiedEndpointConstants.VIRTUAL_FILE + uepConfPath;
                    } else {
                        uepConfPath = getAbsolutePath(endpointConfiguration.getBasePath(), uepConfPath);
                    }
                }
                partnerEndpoint = uepFactory.createVirtualEndpoint(uepConfPath);
            }
        } else {
            partnerEndpoint = new UnifiedEndpoint();
            partnerEndpoint.setUepId(this.serviceName.getLocalPart());
            partnerEndpoint.setAddressingEnabled(true);
            partnerEndpoint.setAddressingVersion(UnifiedEndpointConstants.
                    ADDRESSING_VERSION_FINAL);
        }

        if (partnerEndpoint.getAddress() == null) {
            partnerEndpoint.setAddress(endpointUrl);
        }

        if (partnerEndpoint.isSecurityEnabled()) {
            String secPolicyKey = partnerEndpoint.getWsSecPolicyKey();
            if (secPolicyKey.startsWith(UnifiedEndpointConstants.VIRTUAL_FILE)) {
                String secPolicyLocation = secPolicyKey.substring(
                        UnifiedEndpointConstants.VIRTUAL_FILE.length());
                if (!isAbsoutePath(secPolicyLocation)) {
                    secPolicyKey = getAbsolutePath(endpointConfiguration.getBasePath(),
                            secPolicyLocation);
                } else {
                    secPolicyKey = UnifiedEndpointConstants.VIRTUAL_FILE + secPolicyLocation;
                }
                partnerEndpoint.setWsSecPolicyKey(secPolicyKey);
            }
        }

        return partnerEndpoint;
    }
View Full Code Here

Examples of org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint

    }

    public UnifiedEndpoint getEndpoint(String uepId) {

        UnifiedEndpoint unifiedEndpoint = null;
        String[] uepArray = null;
        try {
            /*ToDo : Fix this... Need a new service method here*/
            uepArray = stub.getDynamicEndpoints(10, 10);
            for (String uepStr : uepArray) {
                if (uepStr != null) {
                    UnifiedEndpoint uep = new UnifiedEndpointFactory().createEndpoint(uepStr);
                    if (uep != null && uep.getUepId().equals(uepId)) {
                        unifiedEndpoint = uep;
                    }
                }
            }

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.