Using proxies
If you are using a proxy for accessing internet, you can use the following environment variables to get rid of it:
- http.proxyHost
- http.proxyPort
- proxy.user
- proxy.password
or directly use the following in your code:
| Code Block |
|---|
|
proxy.setProxyProperties([:]) // map containing all or part of the above properties
|
The proxy will not be used when the WSClient accesses the WSDL during initialization.
Using basic authentication
If your server use basic authentication, you need to set up the following properties:
or directly use
| Code Block |
|---|
|
proxy.setBasicAuthentication(user, password)
|
Setting a time out value
If your want to set a time out value for the connection to the server just use:
| Code Block |
|---|
|
proxy.setConnectionTimeout(value_in_milliseconds)
|
Using SOAP 1.2 (in test/review)
If your server is proposing SOAP 1.2 endpoints, then you can use:
| Code Block |
|---|
|
import groovyx.net.ws.cxf.SoapVersion
proxy.setPreferredSoapVersion(SoapVersion.SOAP_1_2)
|