This discussion is archived
2 Replies Latest reply: Feb 20, 2013 1:32 AM by 991887 RSS

How to communicate with a server ?

991887 Newbie
Currently Being Moderated
Hello.

I'm an intern trying to find a RIA client to use with a Java application server. The server provides two ways to access data :
- a HTTP servlet that deals with XML
- a web service

I can't find information about how to communicate with a server using JavaFX 2, so can you try to explain it to me ?
I'm sorry if what I ask is stupid, but I'm not very familiar with these things, I'm just a student.

Thank you.
  • 1. Re: How to communicate with a server ?
    user8244906 Newbie
    Currently Being Moderated
    Hi,
    communicate with a server is not JavaFX speciffic. You can use any "Java way" to access web-services or http requests. Try Axis2, it creates you the client API from the WSDL (the webservices on your server should provide the WSDL), than you can use this created client API to access the web-service in your JavaFX application. (see: http://people.apache.org/~ruchithf/hw-axis2/). You should be aware that by default you are working on one Application Thread (JavaFX as well as Swing and SWT), so when your first poc. is running you should use the javafx concurrent api, to create non blocking requests (http://docs.oracle.com/javafx/2/threads/jfxpub-threads.htm).

    Andy
  • 2. Re: How to communicate with a server ?
    991887 Newbie
    Currently Being Moderated
    Thank you Andy.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points