Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javafx object in Webservice

 
Arjun Shastry
Ranch Hand
Posts: 1899
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using NetBeans 7.1 and JDK1.6 . I am trying to develop JAX-WS webservice.I want to use javafx.scene.image.Image as an Object passed through function. I am able to do that. but when i use wsgen tool to generate wsdl, i get an "Annnotation Exception error"
i want to use javafx as client. This client will upload/downlaod the image to server using webservice.
Any thoughts?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to tie it to some UI implementation? You can pass around generic Image object which has the source url and necessary data to render the image on the UI using the JavaFX Image object.
 
Arjun Shastry
Ranch Hand
Posts: 1899
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mohamed. You mean to say we should pass java.awt.Image ? in Javafx application, i am using javafx.scene.image.Image Object . How should we convert this Image to awt.Image one ?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arjun Shastry wrote:Thanks Mohamed. You mean to say we should pass java.awt.Image ? in Javafx application, i am using javafx.scene.image.Image Object . How should we convert this Image to awt.Image one ?

Dont pass any specific Image implementation. You can just pass the data required to reconstruct the image on the UI. You might just require the source for the image and use the source to construct either JavaFX Image object or any other Imaged object.
This means you create you own custom data structure for holding details about the image and then transport this data structure/object via the webservice.
 
Arjun Shastry
Ranch Hand
Posts: 1899
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I will do that. Problem came when i tried creating webservice. I added javafxrt.jar in project and wrote the service.But while running wsgen command for creating WSDL, it threw Annotation Exception. If i remove javafx component like Image from the program, wsgen works fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic