• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Dan Drillich
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
 
Ivan Krizsan
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.
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic