title: Apache Camel ResolveEndpointFailedException - Failed to resolve endpoint
body: <p>I was trying to access an outside service built in ASP.net using Jboss fuse and Camel. I am new to this integration thing using Fuse. When I try to run the following camel-context.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!--
      JBoss, Home of Professional Open Source
      Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
      contributors by the @authors tag. See the copyright.txt in the
      distribution for a full listing of individual contributors.
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  --&gt;
  &lt;!-- Configures the Camel Context--&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:cxf="http://camel.apache.org/schema/cxf"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd    "&gt;
      &lt;cxf:cxfEndpoint address="/report" id="reportEndpoint" serviceClass="com.mycompany.camel.cxf.code.first.spring.incident.IncidentService"/&gt;
      &lt;cxf:cxfEndpoint
          address="http://www.webservicex.net/CurrencyConvertor.asmx"
          endpointName="c:SOAPOverHTTP" id="wsdlEndpoint"
          serviceName="c:CurrencyConvertor" xmlns:s="http://www.webserviceX.NET"/&gt;
      &lt;bean
          class="com.mycompany.camel.cxf.code.first.spring.incident.ReportIncidentProcessor" id="reportIncidentProcessor"/&gt;
      &lt;bean
          class="com.mycompany.camel.cxf.code.first.spring.incident.StatusIncidentProcessor" id="statusIncidentProcessor"/&gt;
      &lt;camelContext id="camelContext-c1100b64-c8cb-4fa6-b382-5eea0e303c95" xmlns="http://camel.apache.org/schema/spring"&gt;
          &lt;route id="asmx_route1"&gt;
              &lt;from id="_from1" uri="file:src/data/auth?noop=true"/&gt;
              &lt;log id="_log1" message="${body}"/&gt;
              &lt;to id="_to3" uri="cxf:bean:wsdlEndpoint?dataFormat=MESSAGE"/&gt;
              &lt;log id="_log2" message="${body}"/&gt;
          &lt;/route&gt;
          &lt;route id="cxf"&gt;
              &lt;!--  route starts from the cxf webservice in POJO mode --&gt;
              &lt;from id="reportEndpointListener" uri="cxf:bean:reportEndpoint"/&gt;
              &lt;recipientList id="dispatchToCorrectRoute"&gt;
                  &lt;simple&gt;direct:${header.operationName}&lt;/simple&gt;
              &lt;/recipientList&gt;
          &lt;/route&gt;
          &lt;route id="report"&gt;
              &lt;from id="reportIncidentStarter" uri="direct:reportIncident"/&gt;
              &lt;log id="logReportIncident" message="reportIncident Call"/&gt;
              &lt;process id="reportIncidentProcess" ref="reportIncidentProcessor"/&gt;
              &lt;to id="_to1" uri="log:output"/&gt;
          &lt;/route&gt;
          &lt;route id="status"&gt;
              &lt;from id="statusIncidentStarter" uri="direct:statusIncident"/&gt;
              &lt;log id="logStatusIncident" message="statusIncident Call"/&gt;
              &lt;process id="statusIncidentProcess" ref="statusIncidentProcessor"/&gt;
              &lt;to id="_to2" uri="log:output"/&gt;
          &lt;/route&gt;
      &lt;/camelContext&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>I get this error in the fuse log,</p>
  
  <pre><code>org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: direct: due to: Expected scheme-specific part at index 7: direct:
      at org.apache.camel.impl.DefaultCamelContext.normalizeEndpointUri(DefaultCamelContext.java:661)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:543)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.util.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:89)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.RecipientListProcessor.resolveEndpoint(RecipientListProcessor.java:254)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.RecipientListProcessor.createProcessorExchangePairs(RecipientListProcessor.java:193)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:231)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:170)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.RecipientList.process(RecipientList.java:131)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.asyncInvoke(CxfConsumer.java:154)[241:org.apache.camel.camel-cxf:2.17.0.redhat-630187]
      at org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.invoke(CxfConsumer.java:133)[241:org.apache.camel.camel-cxf:2.17.0.redhat-630187]
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)[74:org.apache.cxf.cxf-core:3.1.5.redhat-630187]
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_121]
      at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_121]
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)[74:org.apache.cxf.cxf-core:3.1.5.redhat-630187]
      at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[74:org.apache.cxf.cxf-core:3.1.5.redhat-630187]
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)[74:org.apache.cxf.cxf-core:3.1.5.redhat-630187]
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[74:org.apache.cxf.cxf-core:3.1.5.redhat-630187]
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[74:org.apache.cxf.cxf-core:3.1.5.redhat-630187]
      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:223)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[81:javax.servlet-api:3.1.0]
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)[118:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[94:org.eclipse.jetty.servlet:9.2.19.v20160908]
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[94:org.eclipse.jetty.servlet:9.2.19.v20160908]
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[92:org.eclipse.jetty.security:9.2.19.v20160908]
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[94:org.eclipse.jetty.servlet:9.2.19.v20160908]
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[117:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.server.Server.handle(Server.java:499)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[93:org.eclipse.jetty.server:9.2.19.v20160908]
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[86:org.eclipse.jetty.io:9.2.19.v20160908]
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[96:org.eclipse.jetty.util:9.2.19.v20160908]
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[96:org.eclipse.jetty.util:9.2.19.v20160908]
      at java.lang.Thread.run(Unknown Source)[:1.8.0_121]
  Caused by: java.net.URISyntaxException: Expected scheme-specific part at index 7: direct:
      at java.net.URI$Parser.fail(Unknown Source)[:1.8.0_121]
      at java.net.URI$Parser.failExpecting(Unknown Source)[:1.8.0_121]
      at java.net.URI$Parser.parse(Unknown Source)[:1.8.0_121]
      at java.net.URI.&lt;init&gt;(Unknown Source)[:1.8.0_121]
      at org.apache.camel.util.URISupport.normalizeUri(URISupport.java:534)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      at org.apache.camel.impl.DefaultCamelContext.normalizeEndpointUri(DefaultCamelContext.java:659)[232:org.apache.camel.camel-core:2.17.0.redhat-630187]
      ... 54 more
  </code></pre>
  
  <p>Please ask if you need anymore sources I used so that I can give you a clear understanding. Thanks in advance.</p>