• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JAX-WS - WSDLS - Where are they?

 
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?
 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the book says about your question?
 
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?

     
    Ranch Hand
    Posts: 642
    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!
     
      Bookmark Topic Watch Topic
    • New Topic