Search in sources :

Example 11 with EndpointConfiguration

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;
}
Also used : QName(javax.xml.namespace.QName) EndpointConfiguration(org.wso2.carbon.bpel.common.config.EndpointConfiguration)

Aggregations

EndpointConfiguration (org.wso2.carbon.bpel.common.config.EndpointConfiguration)11 QName (javax.xml.namespace.QName)5 OMElement (org.apache.axiom.om.OMElement)3 WSDL11Endpoint (org.apache.ode.bpel.epr.WSDL11Endpoint)3 ProcessConfigurationImpl (org.wso2.carbon.bpel.core.ode.integration.store.ProcessConfigurationImpl)3 UnifiedEndpoint (org.wso2.carbon.unifiedendpoint.core.UnifiedEndpoint)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 AxisFault (org.apache.axis2.AxisFault)2 MultiKeyMap (org.apache.commons.collections.map.MultiKeyMap)2 TPublish (org.wso2.carbon.humantask.core.deployment.config.TPublish)2 File (java.io.File)1 ArrayList (java.util.ArrayList)1 XMLStreamException (javax.xml.stream.XMLStreamException)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 TDeployment (org.apache.ode.bpel.dd.TDeployment)1 TInvoke (org.apache.ode.bpel.dd.TInvoke)1