I'm having an issue performing a successful handshake, and am hoping someone 
can through some light on a resolution. Weather running Apache Vysper 0.7 from 
the batch file or embedded in a simple Java Server (my own or one of the 
prepackaged examples), I get the same error condition upon attempting to 
connect from a javascript browser client (my own or one of the prepackaged 
examples). The error the returns is a HTTP 405 Response, reported in Chrome as 
"Unexpected response code: 405". Greater detail follows:

Batch run Server:
'spring-config.xml' has the following additions:
    <bean id="websocketEndpoint" 
class="org.apache.vysper.xmpp.extension.websockets.WebSocketEndpoint">
        <property name="port" value="8080" />
        <property name="contextPath" value="/ws" />
    </bean>
And in the server constructor:
   <ref bean="websocketEndpoint"/>
The Server appears to run start properly, only with the following possible 
problem reported:
  org.eclipse.jetty.server.Server@2af081 STOPPED
   [email protected]:8080
   +-qtp29384701{8<=6<=8/254,0}
   +-ServletContextHandler@32efa7@32efa7/ws,null started
      +-{}
      +-{}
     +-SessionHandler@1fbfd6 started
        +-ServletHandler@6b9c84 started
           
+-[/ws]=>org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-23860799{}

The embedded server, developed with Eclipse Juno and coded as per the example 
on the Vysper homepage (and as per the packaged examples), shows the same error 
as above:
  org.eclipse.jetty.server.Server@1f8ec00 STOPPED
  [email protected]:8080
   +-qtp8256952{8<=6<=8/254,0}
   +-HandlerCollection@148fb3f started
      +-ResourceHandler@191ce2a started
      +-ServletContextHandler@1f05ce9@1f05ce9/ws,null started
         +-{}
         +-{}
         +-SessionHandler@11f25f3 started
            +-ServletHandler@1f4899c started
               
+-[/ws]=>org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-29347786{}

When attempting to connect from the client the following is logged in both 
types of server instance:
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | REQUEST /ws/ws on 
org.eclipse.jetty.server.nio.SelectChannelConnector$3@c3615b
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | 
sessionManager=org.eclipse.jetty.server.session.HashSessionManager@1767f84
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | session=null
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | 
servlet=org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-29347786
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet holder=
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | chain=
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | RESPONSE /ws/ws  405
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | EOF

And to the Chrome console on the client side:
Unexpected response code: 405
Event {clipboardData: undefined, cancelBubble: false, returnValue: true, 
srcElement: WebSocket, defaultPrevented: false...}
CloseEvent {reason: "", code: 1006, wasClean: false, clipboardData: undefined, 
cancelBubble: false...}

Any suggestions on how to proceed?

Thanks, Rob

Reply via email to