yup, it can work on such a DSL:
{code}
from("direct:start").to("file://foo?fileName=${header.bar}.txt");
{code}
but when involving some XPath with "//", it may not work. I will modify it
using encoder operation.

btw, when needing the symbol "$" in groovy editor, you should using "\$" to
replace since "$" is a keyword to stand for a variable in groovy.


JIRA [email protected] wrote:
> 
> 
>     [
> https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52866#action_52866
> ] 
> 
> Claus Ibsen commented on CAMEL-1839:
> ------------------------------------
> 
> Xueqiang you might want to try with an endpoint URI that is a bit more
> _nasty_ such as a file endpoint that can contain ${ } placeholders. To see
> if it can be renedered correctly, I added a TODO in the source code where
> you may need to use the safe encoder for that.
> 
> For instance try with this and see how it renders in the web console
> {code}
> from("direct:start").to("file://foo?fileName=${header.bar}.txt");
> {code}
> 
>> camel-web can't process the endpoint with "://" schema, like
>> /endpoints/mock://results
>> --------------------------------------------------------------------------------------
>>
>>                 Key: CAMEL-1839
>>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>>             Project: Apache Camel
>>          Issue Type: Bug
>>          Components: camel-web
>>    Affects Versions: 2.0-M2
>>            Reporter: Xueqiang Mi
>>            Assignee: Claus Ibsen
>>            Priority: Minor
>>             Fix For: 2.0.0
>>
>>         Attachments: camel-1839.patch
>>
>>
>> After improving the endpoint URI schema on
>> http://issues.apache.org/activemq/browse/CAMEL-1756, camel-web's endpoint
>> request URL is changed from http://localhost:8080/endpoints/mock:results
>> into http://localhost:8080/endpoints/mock://results while "//" is a
>> separator for URL, so camel-web will use only the "mock:" to get the
>> expected endpoint, which will throw an exception:
>> org.apache.camel.ResolveEndpointFailedException: Failed to resolve
>> endpoint: mock: due to: Expected scheme-specific part at index 5: mock:
>>      at
>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:367)
>>      at
>> org.apache.camel.web.resources.EndpointsResource.getEndpoint(EndpointsResource.java:75)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:585)
>>      at
>> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.invokeSubLocator(SubLocatorRule.java:135)
>>      at
>> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:89)
>>      at
>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
>>      at
>> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:105)
>>      at
>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
>>      at
>> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
>>      at
>> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
>>      at
>> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
>>      at
>> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:654)
>>      at
>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:612)
>>      at
>> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:603)
>>      at
>> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309)
>>      at
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
>>      at
>> com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:737)
>>      at
>> com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:689)
>>      at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>>      at
>> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
>>      at
>> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
>>      at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>>      at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
>>      at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>      at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>      at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>>      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>>      at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>      at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>      at org.mortbay.jetty.Server.handle(Server.java:324)
>>      at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
>>      at
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
>>      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>>      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>>      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>>      at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>>      at
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
>> Caused by: java.net.URISyntaxException: Expected scheme-specific part at
>> index 5: mock:
>>      at java.net.URI$Parser.fail(URI.java:2816)
>>      at java.net.URI$Parser.failExpecting(URI.java:2822)
>>      at java.net.URI$Parser.parse(URI.java:3025)
>>      at java.net.URI.<init>(URI.java:578)
>>      at org.apache.camel.util.URISupport.normalizeUri(URISupport.java:354)
>>      at
>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:365)
>>      ... 39 more
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-jira--Created%3A-%28CAMEL-1839%29-can%27t-process-the-endpoint-with-%22%3A--%22-schema%2C-like--endpoints-mock%3A--results-tp24553792p24554685.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to