aspose file tools*
The moose likes JavaFX and the fly likes Javafx object in Webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Javafx object in Webservice" Watch "Javafx object in Webservice" New topic
Author

Javafx object in Webservice

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
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?


MH
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

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.


Mohamed Sanaulla | My Blog
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
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

Joined: Sep 08, 2007
Posts: 3071
    
  33

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

Joined: Mar 13, 2003
Posts: 1874
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Javafx object in Webservice