Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 45 Next »

Module Overview

GroovyWS is taking over GroovySOAP as CXF replaces XFire. The major difference here is that GroovyWS is using Java5 so if you need to stick to 1.4 please continue to use GroovySOAP.

Warning: Most of the documentation is adapted from the former GroovySOAP documentation and will improve in the future. I tried to make it as accurate as possible but feel free to report any error.

Warning: GroovyWS is Java5 dependent (due to CXF) and has been tested using groovy-1.5.

Warning: In order to use GroovyWS, you must ensure that GroovySOAP is not in your classpath (~/.groovy/lib) 

Installation

If you are online and using the latest groovy version, here is the no-brainer way to use GroovyWS:

If you need more control, see the GroovyWS installation notes.

Getting Started

GroovyWS comes with 2 sets of APIS that are briefly described below using a simple example.

When your service is using groovy beans on the server side, you may want to control the fields that are serialized. This is done using a small xml file located next to your script. A small example is demonstrating this:

When consuming a web service, you may also be using some complex types. Those types are automatically generated from the WSDL, compiled and made available via your classloader. The client API is providing you a method to easily instantiate such a complex object from its name. Obviously, knowing the class name can be difficult when using a complex web service and may require to study the contract (WSDL). In order to help the user, GroovyWS is logging the names of the classes generated on the fly.

The client side can be easily embedded in a Grails application. This is demonstrated hereafter

There exists a lot of public web services. We provide two examples that show how easy it is to use GroovyWS to tap on these resources.

More WSClient configuration is available if you need to use proxies, basic authentication and security related features.

The javadoc is probably the ultimate place to the missing bits. If you are missing a feature email us user@groovy.codehaus.org.

More Information

TODO

 If you have ideas how the API should look, do not hesitate to post on the user list ;-

Developers

Guillaume Alleon

Source Control

http://svn.codehaus.org/gmod/groovyws

Building

The build process is using gradle.  In order to build the sources from svn, just run:

in the directory containing the source tree.

Contributing

Community

Mailing List(s)

use user@groovy.codehaus.org

Issue tracker

There is a GroovyWS http://groovy.codehaus.org/GroovyWS category in JIRA

Articles

#A nice article from Geertjan's blog with several examples: http://blogs.sun.com/geertjan/entry/groovy_web_service
#An article explaining the difference between the different WSDL styles http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

  • No labels