Last updated by admin 2 years ago
grails install-plugin ws-client
Last updated by amiller 1 year ago
WSClient Plugin
This plugin allows you to connect to web services. It is based on
GroovyWS - GroovySOAP replacement that uses CXF and Java5 features.
Requirements
- Grails Version: 1.1.1 and above
- JDK: 1.5 and above
Installation
grails install-plugin ws-client
Usage
import org.grails.plugins.wsclient.service.WebServiceclass TestController {
WebService webService def index = {
def wsdlURL = "http://www.w3schools.com/webservices/tempconvert.asmx?WSDL"
def proxy = webService.getClient(wsdlURL) def result = proxy.CelsiusToFahrenheit(0)
result = "You are probably freezing at ${result} degrees Farhenheit"
render result
}
}
- or you can skip the usage of WebService class and use directly:
def proxy = new WSClient(wsdlLocation [, classLoader, soapVersion])
If the WSDL contains complex types you can enable DEBUG logging to see a list of bean classes as they are defined:
log4j = {
…
debug 'org.apache.cxf'
}For more information, please access:
GroovyWSVersion History
- 1.0 - Updated to GroovyWS 0.5.1.
- 0.1 - First official release.
Suggestions, comments or bugs
Feel free to submit questions or comments to the
Grails users mailing list.
Alternatively you can contact me directly - cazacugmihai at gmail dot com
Please report any issues to the
Grails users mailing list and/or write up an issue in JIRA at
http://jira.codehaus.org/browse/GRAILSPLUGINS under the Grails-WSClient component.
Last updated by An Tran 10 months ago
Hi, how to add a progress bar to indicate that client is waiting for result from WS?
Thanks.
Last updated by admin 2 years ago