use of org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint in project carbon-business-process by wso2.
the class ProcessConfigurationImpl method getEndpointConfiguration.
public EndpointConfiguration getEndpointConfiguration(EndpointReference endpointReference) {
/**
* Previously ode used getEndpointProperties method to access endpoint properties.
* With new config mechanism, I changed the way that integration layer access endpoint
* configuration. But BPEL engine is using old method even now.
*/
final Map map = eprContext.getConfigLookup(endpointReference);
final QName service = (QName) map.get("service");
final String port = (String) map.get("port");
EndpointConfiguration endpointConfig = null;
if (bpelPackageConfiguration != null) {
MultiKeyMap endpointConfigs = bpelPackageConfiguration.getEndpoints();
if (endpointConfigs.size() > 0) {
endpointConfig = (EndpointConfiguration) endpointConfigs.get(service.getLocalPart(), service.getNamespaceURI(), port);
if (endpointConfig == null) {
endpointConfig = (EndpointConfiguration) endpointConfigs.get(service.getLocalPart(), service.getNamespaceURI(), null);
}
}
}
if (endpointConfig == null) {
endpointConfig = new EndpointConfiguration();
endpointConfig.setServiceName(service.getLocalPart());
endpointConfig.setServicePort(port);
endpointConfig.setServiceNS(service.getNamespaceURI());
UnifiedEndpoint uep = new UnifiedEndpoint();
uep.setUepId(service.getLocalPart());
uep.setAddressingEnabled(true);
uep.setAddressingVersion(UnifiedEndpointConstants.ADDRESSING_VERSION_FINAL);
bpelPackageConfiguration.addEndpoint(endpointConfig);
}
return endpointConfig;
}
use of org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint 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();
}
}
Aggregations