You can download Wireshark from http://www.wireshark.org/ and see all your
messages.

On 28 September 2010 14:10, Thomas Wrobel <[email protected]> wrote:

> Ok, so I can ignore the compile errors as they have nothing to do with the
> server not connecting.
>
> I added a few more log lines to try to debug.
>
> After a "Warning:Session not available" message, the webclient seems to get
> as far as the;
>
>
> *"  public static native WebSocketImpl create(WebSocket client, String
> server)*
> *    /*-{    *
> *    console.warn("creating websocket ");    ** *
> *    var ws = new WebSocket(server); ............"    *
>
>
> But then I get a "unexpected response" in the console;
>
> creating websocket
>  :1234 <http://127.0.0.1:1234/>Unexpected response code: 200
>
> And the server is getting this exception;
>
> HttpException(400,null,null)
>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:360)
>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.
> java:211)
>        at org.eclipse.jetty.server.HttpConnection.handle(HttpConnectio
> n.java:424)
>        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectCha
> nnelEndPoint.java:506)
>        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedT
> hreadPool.java:436)
>        at java.lang.Thread.run(Thread.java:619)
>
>
> I'm not sure how to proceed to debug this further. (Is there a way to see
> what "new WebSocket(server);" is broadcasting out?)
> ========
> Regarding websockets;
>
> I was not aware same-origin policy applied to websockets - I really need to
> be able to run the server on a different machine
> to the client, so is there some way to specify an IP/Port as being allowed?
> They are both on the same local network. (Server is Ubuntu/Prosody, client
> is just WindowsXP).
> This is my first experience using websockets so I have little knowledge of
> how to set things up. (or even where to look)
>
>
> Thanks for your help,
> -Thomas
>
>
>
>
>
> On 28 September 2010 01:25, Joseph Gentle <[email protected]> wrote:
>
>> Hey - I didn't know you could just right-click and go 'Compile GWT
>> Application'. Thats neat. I've been using eclipse's ant plugin to
>> compile the code using ant. Maybe thats the reason you had to add
>> gwt.user.User to the modules - maybe our ant gwt compilation adds that
>> through a command-line flag or something.
>>
>> The compile errors you're seeing are due to our gwt xml files pulling
>> in some unused class files, which are missing .java source code. The
>> compile still works anyway because none of those classes are actually
>> used. As for the JavaWaverefEncoder thing, I actually fixed something
>> else related to that class and got confused. I'm seeing that error
>> during gwt compilation as well.
>>
>> So given that your build is succeeding, why doesn't your wave client
>> work? If I had to guess, I'd say that maybe the single-origin policy
>> is causing the websocket connection to fail, since you're loading the
>> client locally, and its trying to open a websocket connection
>> remotely? I really don't know. If you want to muck around, I recommend
>> just running the server locally on your dev box. You can launch the
>> server from eclipse by importing the project ("New java project...
>> From existing source, Location: /foo/blah/wave-protocol"). Make a run
>> configuration. It should look like this:
>> Main class: org.waveprotocol.wave.examples.fedone.ServerMain
>> Arguments:
>>  Program arguments:
>> --client_frontend_hostname=localhost --client_frontend_port=9876
>> --wave_server_domain=example.com --xmpp_component_name=wave
>> --xmpp_jid=wave.example.com --xmpp_server_description=FedOne
>> --xmpp_server_hostname=example.com --xmpp_server_ip=example.com
>> --xmpp_server_port=5275 --xmpp_server_secret opensesame
>> --xmpp_server_ping=wavesandbox.com
>> --certificate_private_key=example.com.key
>> --certificate_files=example.com.crt --certificate_domain=example.com
>> --waveserver_disable_verification=false
>> --waveserver_disable_signer_verification=true
>> --http_frontend_hostname=localhost --http_frontend_port=9898
>> --enable_federation=false --cert_path_store_type=memory
>> --attachment_store_type=disk --account_store_type=memory
>>
>>  VM arguments:
>> -Dorg.eclipse.jetty.util.log.DEBUG=true
>>
>> ... At least, that works for me.
>>
>> -J
>>
>>
>> On Tue, Sep 28, 2010 at 4:16 AM, Thomas Wrobel <[email protected]>
>> wrote:
>> > Yup, the webclient hosted by the webserver works just fine.
>> > I wanted a go at making my own customized client though.
>> >
>> > It seemed, from a quick glance of the code, pretty trival to change
>> > where the client looks for the server so that was the only change I
>> > made. (just changing a dynamically made string by
>> > "getWebSocketBaseUrl" to a hard-coded one for now).
>> > I think that part is correct, as the server is getting the requests,
>> > they are just formated badly....which I assume is due to the other
>> > compile errors.
>> >
>> > I do get the permutations.
>> > The full compile log at the moment is;
>> > ===============================================================
>> >
>> > I'm compiling this by right clicking on WebClient.xml and going
>> > "Compile GWT Application" in eclipse.
>> >
>> > Strangely though, this is all from a version I checked out after
>> > Friday, so it should have had your fix already in it.
>> >
>> > Thanks,
>> > Thomas
>> >
>> >
>> > On 27 September 2010 03:53, Joseph Gentle <[email protected]> wrote:
>> >> If you're running the server on another machine, just run:
>> >> ant compile_gwt
>> >> on the server and then when you ./run-server.sh it'll also host the
>> >> web frontend as well. (Usually at http://hostname:9898/)
>> >>
>> >> The web frontend isn't designed to let you connect to arbitrary wave
>> >> servers, it assumes you're connecting to the machine that is hosting
>> >> the page.
>> >>
>> >> As for windows builds, all that looks troubling. I put in a change to
>> >> fix the JavaWaverefEncoder error last friday. Do those errors just
>> >> crop up when you're building? Does it go on to say:
>> >>    [java]    Compiling 3 permutations
>> >>     [java]       Compiling permutation 0...
>> >>     [java]       Compiling permutation 1...
>> >> ... etc?
>> >>
>> >> We really need to clean up our windows build bits. I think its a bit
>> >> painful at the moment. (Or at the very least, write some docs which
>> >> explain how to do it)
>> >>
>> >> -J
>> >>
>> >>
>> >> On Mon, Sep 27, 2010 at 6:00 AM, ThomasWrobel <[email protected]>
>> wrote:
>> >>> I'm trying to compile the simple web client using eclipse.
>> >>> I have a working wave server on another pc already, so I'm merely
>> >>> trying to compile a client and connect to it.
>> >>>
>> >>> I got the web client from here;
>> >>>
>> http://code.google.com/p/wave-protocol/source/browse?repo=default#hg/src/org/waveprotocol/wave/examples/client/webclient
>> >>>
>> >>> And imported it into eclipse.
>> >>> At first I got a few errors about "String" not being recognized in
>> >>> WebSockets,java, which were fixed by add;
>> >>>
>> >>>    <inherits name="com.google.gwt.user.User"/>
>> >>>
>> >>> To some of the module.xmls.
>> >>>
>> >>> I also had to add a startup URL, pointing to copy of the starting
>> >>> page.
>> >>> With this it will compile and load in the browser (chrome) but fails
>> >>> to connect.
>> >>> Giving a "attempting to reconnect" error every few seconds.
>> >>> (on the server end these are producing parser errors)
>> >>>
>> >>> Looking at the compile logs I got;
>> >>>
>> >>> 21:17:03.468 [ERROR] [webclient] Errors in 'jar:file:/C:/TomsProjects/
>> >>> SimpleWaveMapClient/tomswaveserverthing/third_party/runtime/wave-
>> >>> libraries/common-src.jar!/org/waveprotocol/wave/common/util/
>> >>> JavaWaverefEncoder.java'
>> >>>
>> >>> 21:17:03.484 [ERROR] [webclient] Line 20: The import java.net cannot
>> >>> be resolved
>> >>>
>> >>> 21:17:03.546 [ERROR] [webclient] Line 43: URLDecoder cannot be
>> >>> resolved
>> >>>
>> >>> and
>> >>>
>> >>> 21:17:03.718 [ERROR] [webclient] Errors in 'jar:file:/C:/TomsProjects/
>> >>> SimpleWaveMapClient/tomswaveserverthing/third_party/runtime/wave-
>> >>> libraries/model-src.jar!/org/waveprotocol/wave/model/schema/impl/
>> >>> UserDataSchemas.java'
>> >>>
>> >>> 21:17:03.734 [ERROR] [webclient] Line 65: No source code is available
>> >>> for type
>> >>> org.waveprotocol.wave.model.supplement.WaveletBasedSupplement; did you
>> >>> forget to inherit a required module?
>> >>>
>> >>> 21:17:03.750 [ERROR] [webclient] Line 209: No source code is available
>> >>> for type
>> >>> org.waveprotocol.wave.model.supplement.DocumentBasedAbuseStore<N,E>;
>> >>> did you forget to inherit a required module?
>> >>>
>> >>>
>> >>> errors.
>> >>> I read around the group and it seems some errors are expected when
>> >>> compiling, but I dont think these ones are and the URLDecoder could be
>> >>> the source of my error?
>> >>> any ideas?
>> >>>
>> >>> --
>> >>> You received this message because you are subscribed to the Google
>> Groups "Wave Protocol" group.
>> >>> To post to this group, send email to [email protected].
>> >>> To unsubscribe from this group, send email to
>> [email protected]<wave-protocol%[email protected]>
>> .
>> >>> For more options, visit this group at
>> http://groups.google.com/group/wave-protocol?hl=en.
>> >>>
>> >>>
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups "Wave Protocol" group.
>> >> To post to this group, send email to [email protected].
>> >> To unsubscribe from this group, send email to
>> [email protected]<wave-protocol%[email protected]>
>> .
>> >> For more options, visit this group at
>> http://groups.google.com/group/wave-protocol?hl=en.
>> >>
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Wave Protocol" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to
>> [email protected]<wave-protocol%[email protected]>
>> .
>> > For more options, visit this group at
>> http://groups.google.com/group/wave-protocol?hl=en.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Wave Protocol" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<wave-protocol%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/wave-protocol?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Wave Protocol" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<wave-protocol%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/wave-protocol?hl=en.
>



-- 
Regards

Dave Butler
butlerdi-at-pharm2phork-dot-org

Also on Skype as pharm2phork

Get Skype here http://www.skype.com/download.html


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

-- 
You received this message because you are subscribed to the Google Groups "Wave 
Protocol" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wave-protocol?hl=en.

Reply via email to