Note that there are some explanatory texts on larger screens.

plurals
  1. POcamel http component 500
    primarykey
    data
    text
    <p>i was creating cxf/camel webservice and i've created for test code like this:</p> <pre><code>@GET @Path("/user") @ProduceMime({ "application/json" }) public String user(@FormParam("token") String token) throws Exception { CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure(){ from("direct:start").to("http://google.com"); } }); context.start(); return token; } } </code></pre> <p>Then i've compiled it and copied do FUSE ESB deploy folder. My webservice was installed, but when i opened URL with my webservice i got <strong>500</strong> response:</p> <pre><code> org.apache.cxf.interceptor.Fault: Failed to create route route17 at: &gt;&gt;&gt; To[http://google.com] &lt;&lt;&lt; in route: Route[[From[direct:start]] -&gt; [To[http://google.com]]] because of Failed to resolve endpoint: http://google.com due to: No component found with scheme: http Caused by: java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: Failed to create route route17 at: &gt;&gt;&gt; To[http://google.com] &lt;&lt;&lt; in route: Route[[From[direct:start]] -&gt; [To[http://google.com]]] because of Failed to resolve endpoint: http://google.com due to: No component found with scheme: http at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:108) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:323) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:152) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:575) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:480) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937) at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:346) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:438) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:905) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:561) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:43) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:538) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:43) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) at java.lang.Thread.run(Thread.java:680) </code></pre> <p>additionally i have imported:</p> <pre><code>import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.component.http.*; import org.apache.camel.component.http.helper.*; </code></pre> <p>on ESB i have turned on <strong>camel-http</strong></p> <p>what is wrong?</p> <pre><code>-------------- </code></pre> <p>So i this what i wrote is wrong, is this code below should works right? </p> <pre><code> &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.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;import resource="classpath:META-INF/cxf/cxf.xml" /&gt; &lt;import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" /&gt; &lt;bean id="cxfSSO" class="com.esb.cxf.SSO" /&gt; &lt;jaxrs:server id="sso" address="/ssocamel2"&gt; &lt;jaxrs:serviceBeans&gt; &lt;ref bean="cxfSSO" /&gt; &lt;/jaxrs:serviceBeans&gt; &lt;/jaxrs:server&gt; &lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt; &lt;endpoint id="endpointURL" uri="http://localhost:8080/SSO/?token=test"/&gt; &lt;route&gt; &lt;from uri="direct:start"/&gt; &lt;to uri="callRealWebService"/&gt; &lt;/route&gt; &lt;/camelContext&gt; &lt;/beans&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload