Search in sources :

Example 1 with EndpointMappingType

use of org.apache.camel.component.spring.ws.type.EndpointMappingType in project camel by apache.

the class SpringWebserviceComponent method addConsumerConfiguration.

private void addConsumerConfiguration(String remaining, Map<String, Object> parameters, SpringWebserviceConfiguration configuration) {
    EndpointMappingType type = EndpointMappingType.getTypeFromUriPrefix(remaining);
    if (type != null) {
        LOG.debug("Building Spring Web Services consumer of type " + type);
        String lookupKey = getLookupKey(remaining, type);
        if (EndpointMappingType.BEANNAME.equals(type)) {
            addEndpointDispatcherToConfiguration(configuration, lookupKey);
        } else {
            addEndpointMappingToConfiguration(parameters, configuration);
        }
        XPathExpression xPathExpression = null;
        if (type.equals(EndpointMappingType.XPATHRESULT)) {
            String expression = getAndRemoveParameter(parameters, "expression", String.class);
            configuration.setExpression(expression);
            xPathExpression = createXPathExpression(expression);
        }
        configuration.setEndpointMappingKey(new EndpointMappingKey(type, lookupKey, xPathExpression));
    }
}
Also used : XPathExpression(org.springframework.xml.xpath.XPathExpression) EndpointMappingKey(org.apache.camel.component.spring.ws.type.EndpointMappingKey) EndpointMappingType(org.apache.camel.component.spring.ws.type.EndpointMappingType)

Aggregations

EndpointMappingKey (org.apache.camel.component.spring.ws.type.EndpointMappingKey)1 EndpointMappingType (org.apache.camel.component.spring.ws.type.EndpointMappingType)1 XPathExpression (org.springframework.xml.xpath.XPathExpression)1