use of org.wso2.carbon.bpel.common.config.EndpointConfiguration in project carbon-business-process by wso2.
the class EndpointConfigBuilder method buildEndpointConfiguration.
public static EndpointConfiguration buildEndpointConfiguration(OMElement ele, String basePath) {
EndpointConfiguration endPointConfig = new EndpointConfiguration();
endPointConfig.setBasePath(basePath);
String endpointRef = ele.getAttributeValue(new QName(null, BusinessProcessConstants.ENDPOINTREF));
if (StringUtils.isNotEmpty(endpointRef)) {
endPointConfig.setUnifiedEndPointReference(endpointRef);
log.info("Endpoint reference file:" + endpointRef);
}
if (ele.getFirstChildWithName(new QName(UnifiedEndpointConstants.WSA_NS, UnifiedEndpointConstants.UNIFIED_EPR)) != null) {
log.info("Found in-line unified endpoint. This will take precedence over the reference");
endPointConfig.setUepOM(ele.getFirstChildWithName(new QName(UnifiedEndpointConstants.WSA_NS, UnifiedEndpointConstants.UNIFIED_EPR)));
}
String serviceDescLocation = ele.getAttributeValue(new QName(null, BusinessProcessConstants.SERVICE_DESC_LOCATION));
if (StringUtils.isNotEmpty(serviceDescLocation)) {
endPointConfig.setServiceDescriptionAvailable(true);
endPointConfig.setServiceDescriptionLocation(serviceDescLocation.trim());
log.info("Service descriptor reference file:" + serviceDescLocation);
}
String mexTimeout = getElementAttributeValue(BPELConstants.MEX_TIMEOUT, BPELConstants.VALUE, ele);
if (mexTimeout != null) {
endPointConfig.setMexTimeout(mexTimeout);
}
return endPointConfig;
}
Aggregations