Search in sources :

Example 1 with WSDL11Endpoint

use of org.apache.ode.bpel.epr.WSDL11Endpoint in project carbon-business-process by wso2.

the class PeopleActivity method getUnifiedEndpoint.

public UnifiedEndpoint getUnifiedEndpoint() throws FaultException {
    int tenantId = B4PServiceComponent.getBPELServer().getMultiTenantProcessStore().getTenantId(processId);
    ProcessConfigurationImpl processConf = (ProcessConfigurationImpl) B4PServiceComponent.getBPELServer().getMultiTenantProcessStore().getTenantsProcessStore(tenantId).getProcessConfiguration(processId);
    EndpointConfiguration epConf = processConf.getEndpointConfiguration(new WSDL11Endpoint(serviceName, servicePort));
    try {
        return epConf.getUnifiedEndpoint();
    } catch (AxisFault axisFault) {
        throw new FaultException(BPEL4PeopleConstants.B4P_FAULT, "Error occurred while reading UnifiedEndpoint for service " + serviceName, axisFault);
    }
}
Also used : WSDL11Endpoint(org.apache.ode.bpel.epr.WSDL11Endpoint) AxisFault(org.apache.axis2.AxisFault) FaultException(org.apache.ode.bpel.common.FaultException) ProcessConfigurationImpl(org.wso2.carbon.bpel.core.ode.integration.store.ProcessConfigurationImpl) EndpointConfiguration(org.wso2.carbon.bpel.common.config.EndpointConfiguration) WSDL11Endpoint(org.apache.ode.bpel.epr.WSDL11Endpoint) UnifiedEndpoint(org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint)

Example 2 with WSDL11Endpoint

use of org.apache.ode.bpel.epr.WSDL11Endpoint in project carbon-business-process by wso2.

the class BPELBindingContextImpl method publishAxisService.

private BPELProcessProxy publishAxisService(ProcessConf processConfiguration, QName serviceName, String portName) throws AxisFault {
    // TODO: Need to fix this to suite multi-tenant environment
    // TODO: There is a problem in this, in this manner we can't have two axis services with
    // same QName
    BPELProcessProxy processProxy = new BPELProcessProxy(processConfiguration, bpelServer, serviceName, portName);
    ConfigurationContext tenantConfigCtx = getConfigurationContextFromProcessConfiguration(processConfiguration);
    AxisService axisService;
    try {
        axisService = AxisServiceUtils.createAxisService(tenantConfigCtx.getAxisConfiguration(), processProxy);
        EndpointConfiguration endpointConfig = ((ProcessConfigurationImpl) processConfiguration).getEndpointConfiguration(new WSDL11Endpoint(serviceName, portName));
        ServiceConfigurationUtil.configureService(axisService, endpointConfig, tenantConfigCtx);
    } catch (AxisFault e) {
        log.error("Error occurred creating the axis service " + serviceName.toString());
        throw new DeploymentException("BPEL Package deployment failed.", e);
    }
    processProxy.setAxisService(axisService);
    removeBPELProcessProxyAndAxisService(processConfiguration.getDeployer(), serviceName, portName);
    services.put(processConfiguration.getDeployer(), serviceName, portName, processProxy);
    ArrayList<AxisService> serviceList = new ArrayList<AxisService>();
    serviceList.add(axisService);
    DeploymentEngine.addServiceGroup(createServiceGroupForService(axisService), serviceList, null, null, tenantConfigCtx.getAxisConfiguration());
    // 
    if (log.isDebugEnabled()) {
        log.debug("BPELProcessProxy created for process " + processConfiguration.getProcessId());
        log.debug("AxisService " + serviceName + " created for BPEL process " + processConfiguration.getProcessId());
    }
    return processProxy;
}
Also used : WSDL11Endpoint(org.apache.ode.bpel.epr.WSDL11Endpoint) AxisFault(org.apache.axis2.AxisFault) ConfigurationContext(org.apache.axis2.context.ConfigurationContext) AxisService(org.apache.axis2.description.AxisService) ArrayList(java.util.ArrayList) DeploymentException(org.apache.axis2.deployment.DeploymentException) EndpointConfiguration(org.wso2.carbon.bpel.common.config.EndpointConfiguration) ProcessConfigurationImpl(org.wso2.carbon.bpel.core.ode.integration.store.ProcessConfigurationImpl)

Example 3 with WSDL11Endpoint

use of org.apache.ode.bpel.epr.WSDL11Endpoint in project carbon-business-process by wso2.

the class PartnerService method initUEP.

private void initUEP() throws AxisFault {
    EndpointConfiguration endpointConf = ((ProcessConfigurationImpl) processConfiguration).getEndpointConfiguration(new WSDL11Endpoint(this.serviceName, portName));
    if (endpointConf == null) {
        uep = new UnifiedEndpoint();
        uep.setUepId(this.serviceName.getLocalPart());
        uep.setAddressingEnabled(true);
        uep.setAddressingVersion(UnifiedEndpointConstants.ADDRESSING_VERSION_FINAL);
    } else {
        uep = endpointConf.getUnifiedEndpoint();
    }
}
Also used : WSDL11Endpoint(org.apache.ode.bpel.epr.WSDL11Endpoint) UnifiedEndpoint(org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint) EndpointConfiguration(org.wso2.carbon.bpel.common.config.EndpointConfiguration) ProcessConfigurationImpl(org.wso2.carbon.bpel.core.ode.integration.store.ProcessConfigurationImpl)

Aggregations

WSDL11Endpoint (org.apache.ode.bpel.epr.WSDL11Endpoint)3 EndpointConfiguration (org.wso2.carbon.bpel.common.config.EndpointConfiguration)3 ProcessConfigurationImpl (org.wso2.carbon.bpel.core.ode.integration.store.ProcessConfigurationImpl)3 AxisFault (org.apache.axis2.AxisFault)2 UnifiedEndpoint (org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint)2 ArrayList (java.util.ArrayList)1 ConfigurationContext (org.apache.axis2.context.ConfigurationContext)1 DeploymentException (org.apache.axis2.deployment.DeploymentException)1 AxisService (org.apache.axis2.description.AxisService)1 FaultException (org.apache.ode.bpel.common.FaultException)1