• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javafx object in Webservice

 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
That feels good. Thanks. Here's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic