Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-WS - WSDLS - Where are they?

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the book says about your question?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 style
  • Encoding
  • Parameter style

  • Best wishes!
     
    Duran Harris
    Ranch Hand
    Posts: 608
    Eclipse IDE Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for clearing that up for me!
     
    Duran Harris
    Ranch Hand
    Posts: 608
    Eclipse IDE Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 626
    Mac
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 608
    Eclipse IDE Spring Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I think so....I saw something about HTTP binding in WSDL for Rest...But I think Rest is using GET?
     
    Ivan Krizsan
    Ranch Hand
    Posts: 2198
    1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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!
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic