• 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

Java class to WSDL

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to map a java class to wsdl.
The problem is my java class use java.util.Map as function arguments.
I am wondering how to map/bind this java class to wsdl.

Here is the code:

Hi,

Can anyone tell me how to map the following java class to wsdl (in Eclispe)?



When executing bottom-up mapping in Eclipse, I got the following error:

....does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.


Any suggestion is highly appreciated.

Thanks
S
 
Ranch Hand
Posts: 109
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sam,

Try to convert it with Apache Axis2 tools. Using these tools you can convert WSDL to java and java to WSDL.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
It is generally a good idea not to use Java collection types, such as Map, List, Set etc, as parameter or return types of methods that are exposed as web service operations.
While it may be possible to make it work with some web service stack(s), there is a significant risk of lock-in.
Best wishes!
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for the suggestion.

How about using the following class, and convert it to wsdl?



In Eclipse, it generated the following wsdl using bottom-up approach (java2wsdl):




Is generated wsdl looks correct?

Thank you for your time.

Sam
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
You are aware that you are using a web service stack that was built five years ago?
Unless there is a very good reason for using this particular web service stack, I strongly suggest using something more recent.
A lot has happened in that time, for instance the WS-I Basic Profile and JAX-WS.
Best wishes!
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thank you very much for your comment on my wsdl.

Do you know how to configure WSDL generator in Eclipse so that it generates more recent version of WSDL file?

From the About Eclipse page, it shows

Eclipse Java EE IDE for Web Developers.

Version: Helios Service Release 2
Build id: 20110218-0911


When I looked the generated wsdl file which was generated from Netbeans 7.0, it looks like as follow:



Is the version of WSDL generated by Netbeans 7.0 correct?

Thanks
Sam
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
In Eclipse, if you look in the Preferences, there is a section named Web Services.
Under that section there are subsections for CXF 2.x Preferences, JBossWS Preferences.
These two allow you to use at least Apache CXF and JBoss WS (these options may require installation of plugins).
It is very easy to write an Ant-file that, given annotated Java classes, generate a WSDL file and use this in Eclipse.
As you may suspect, the web service tooling in Eclipse is not as good as that in NetBeans.
Best wishes!
 
For my next trick, I'll need the help of 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