This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Unit Testing Web Services

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

We have a project that uses JAX-WS and JAXB for webservices.
We want to write Junit Test cases for testing web services.

The client side i.e. Junit will need stubs to be generated to test the actual web service using tool wsgen. We want to automate this process of generating stubs in a standard manner using Ant Build script.

Can anyone share a sample build script that is generating these artifacts. Please share the same.

Also share a standard practice for unit testing web services.

Thanks
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Also share a standard practice for unit testing web services.



Basically ours are text/xml based webservices -- meaning that the response we expect does not contain binary data. For unit testing this we use a simple Http Request/Response client. We feed this client with the URL of the webservice and the request XML and that is fired over an HTTP connection to the URL. The response XML is then displayed and we can compare it to what we expect it to be.

It would be insightful to know how the developers go about testing their web services...
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are some good resources that you can Google on this including:

Dr Dobbs article

WSUnit - A JUnit for web services
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic