Thanks a lot Zoran, mapping 
org.apache.camel.component.atmosphere.websocket.CamelWebSocketServlet works!


Cheers,
Dmitry


-----Original Message-----
From: Zoran Regvart [mailto:zo...@regvart.com] 
Sent: Friday, May 18, 2018 6:30 AM
To: users@camel.apache.org
Subject: Re: camel-atmosphere-websocket + TomEE

Hi Dmitry,
I think you need to use
org.apache.camel.component.atmosphere.websocket.CamelWebSocketServlet
instead of or in addition to the default 
org.apache.camel.component.servlet.CamelHttpTransportServlet.

From what I can see CamelWebSocketServlet extends from 
CamelHttpTransportServlet so just replacing it should help in your case.

zoran

On Thu, May 17, 2018 at 11:22 PM, Shultz, Dmitry <dmitry_shu...@kaltire.com> 
wrote:
> Hi All,
>
> I'm running CDI + JSF + Deltaspike + Camel web app in TomEE. My web.xml 
> contains following config for the servlets:
>
>    <servlet>
>         <servlet-name>Faces Servlet</servlet-name>
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>*.xhtml</url-pattern>
>     </servlet-mapping>
>     <welcome-file-list>
>         <welcome-file>dashboard.xhtml</welcome-file>
>     </welcome-file-list>
>
>     <servlet>
>         <display-name>Camel Http Transport Servlet</display-name>
>         <servlet-name>CamelServlet</servlet-name>
>         
> <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>
>     <!-- define that url path for the Camel Servlet to use -->
>     <servlet-mapping>
>         <servlet-name>CamelServlet</servlet-name>
>         <url-pattern>/rest/*</url-pattern>
>     </servlet-mapping>
>
> It's all works good except of camel-atmosphere-websocket, when I create route:
>
> from("atmosphere-websocket:///mypath");
>
> from("direct:ws").to("atmosphere-websocket:///mypath?sendToAll=true");
>
> HTTP Client is not able to connect to the WS, getting:
>
> WebSocket connection to 'ws://localhost:8080/my-app/rest/mypath' 
> failed: Error during WebSocket handshake: Unexpected response code: 
> 404
>
> Is there anything I'm missing?
>
> Actually, I'm not sure if camel-atmosphere-websocket actually creates 
> the server endpoint (the same as this one for example: 
> https://github.com/WASdev/sample.microprofile.meetingapp/blob/master/s
> rc/main/java/net/wasdev/samples/microProfile/meetings/MeetingNotifier.
> java)
>
> Cheers,
> Dmitry
>
>



--
Zoran Regvart

Reply via email to