[ 
https://issues.apache.org/jira/browse/CAMEL-9497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187174#comment-15187174
 ] 

Luca Burgazzoli edited comment on CAMEL-9497 at 3/9/16 2:43 PM:
----------------------------------------------------------------

[~davsclaus] I'm a little confused by 
org.apache.camel.component.spring.ws.type.EndpointMappingKey which should be an 
UriParam:

{code:java}
@UriParam(label = "consumer")
private EndpointMappingKey endpointMappingKey;

public EndpointMappingKey getEndpointMappingKey() {
    return endpointMappingKey;
}

public void setEndpointMappingKey(EndpointMappingKey endpointMappingKey) {
    this.endpointMappingKey = endpointMappingKey;
}
{code}

But then it appears that it is instantiated by 
SpringWebserviceComponent#addConsumerConfiguration where any value you may have 
set will be overridden:

{code:java}


    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));
        }
    }
{code}

Am I wrong ? 






was (Author: lb):
[~davsclaus] I'm a little confused by 
org.apache.camel.component.spring.ws.type.EndpointMappingKey which should be an 
UriParam:

{code:java}
@UriParam(label = "consumer")
private EndpointMappingKey endpointMappingKey;

public EndpointMappingKey getEndpointMappingKey() {
    return endpointMappingKey;
}

public void setEndpointMappingKey(EndpointMappingKey endpointMappingKey) {
    this.endpointMappingKey = endpointMappingKey;
}
{code}

But then it appears that it is instantiated by 
SpringWebserviceComponent#addConsumerConfiguration where any value you may have 
set will be overridden, am I wrong ? 





> camel-spring-ws - Component docs does not match actual code
> -----------------------------------------------------------
>
>                 Key: CAMEL-9497
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9497
>             Project: Camel
>          Issue Type: Task
>            Reporter: Claus Ibsen
>            Assignee: Luca Burgazzoli
>             Fix For: 2.17.0
>
>
> There is some options that do not match the @UriParam and @UriPath configured 
> on this endpoint.
> There was some time ago some contributions to this component, that didn't 
> include wiki doc updates as well. So we are a bit out of sync.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to