| Author |
JAX-WS - WSDLS - Where are they?
|
Duran Harris
Ranch Hand
Joined: Nov 09, 2008
Posts: 571
|
|
Hi all,
I was doing a hello world application with JAX-WS from Martin Kalin's JWS - Up and running when I noticed that I had no wsdl in the project, yet it still works.
Do annotations like @Soapbind(Style=Style.RPC) replace the need for having a wsdl?
|
===>SCJP 1.5(72%)<===
==>SCWCD1.5(76%)<===
|
 |
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
|
|
|
What does the book says about your question?
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
If you deploy an annotated web service endpoint implementation class to a server like, for instance, GlassFish, then the WSDL will be generated by GlassFish.
Actually, it is taken care of by the Metro web service stack, which also can be installed on Tomcat.
This approach in which the WSDL is generated is called a code-first approach. It has the drawback of risking changes to the WSDL in case the endpoint implementation class (etc) are changed, which may break the contract with clients using the earlier version of the WSDL.
The annotation used to tell the web service stack that a class is to be exposed as a web service is called @WebService.
The @SOAPBinding annotation specifies the following properties of a web service:
Messaging styleEncodingParameter style
Best wishes!
|
My free books and tutorials: http://www.slideshare.net/krizsan
|
 |
Duran Harris
Ranch Hand
Joined: Nov 09, 2008
Posts: 571
|
|
|
Thanks for clearing that up for me!
|
 |
Duran Harris
Ranch Hand
Joined: Nov 09, 2008
Posts: 571
|
|
I see now that the WSDL being generated dynamically is POSSIBLY a result of using Endpoint.publish( which I guess is from Java SE 6 - Metro). I say possibly because I think I'm confused as to whether it's the standard java/wsdl mapping taking place or whether it's because I'm using Metro?
|
 |
Jignesh Patel
Ranch Hand
Joined: Nov 03, 2001
Posts: 625
|
|
|
Can we use wsdl with restful web services? I am always under the impression that RESTful web services works with HTTP Post only?
|
 |
Duran Harris
Ranch Hand
Joined: Nov 09, 2008
Posts: 571
|
|
|
I think so....I saw something about HTTP binding in WSDL for Rest...But I think Rest is using GET?
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
|
|
Hi!
There is this article about using WSDL 2.0 to describe a RESTful web service:
http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/
I have never seen this being used in real life.
Best wishes!
|
 |
 |
|
|
subject: JAX-WS - WSDLS - Where are they?
|
|
|