Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Objective 4.7 - Describe creating a Web Service using JAX-WS

 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,

Ivan's study guide says -

Developing the most basic form of a JAX-WS web service consists of the following steps:
- Write a Java class that contains the implementation of the service method(s).
- Annotate the above class with JAX-WS annotation(s).
- Compile, package and deploy the web service.
In the above case the web service container will generate the WSDL document



That's Java first or "bottom-up", right? Is there a "top-down" or "contract first" way within JAX-WS?

Regards,
Dan
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interestingly, Implementing Web Services using JAX-WS describes the exact same Java first approach in a very concise way.

Regards,
Dan
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Dan Drillich wrote:
That's Java first or "bottom-up", right? Is there a "top-down" or "contract first" way within JAX-WS?


Yes, there is.
If you want to start from a WSDL, then you generate the client and server artifacts using wsimport.
Finally you write the endpoint implementation class, which is to implement the generated interface of the service.

Edit:
I see your point - you feel that there is something missing from my study guide.
I can agree with you and even to the extent that I feel that I should add an example of contract-first development in that very section.
Thanks for pointing this out!
Best wishes!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ivan.
 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This conversation provoked me to ask "if contract first style of developing webservice, a part of SCJDWS 5.0". It is better to know the process, which seem to be followed by many other frameworks, but just curious if this is a part of the certification.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you seen section 9.3 in which there indeed is an example of WSDL-first development of a JAX-WS web service?
Admitted, the example is not as clear and concise as it can be.
I haven't had time to write anything yet so I thought I'd at least give you a pointer.
Best wishes!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Much appreciated Ivan!

Regards,
Dan
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic