I cannot set preemptive authentication in groovyws. (ws provider required preemptive authentication.)
I try to find out in groovyws document but no clue.
import groovyx.net.ws.WSClient
//def proxy = new WSClient("http://202.44.4.97/webservice/pttinfo.asmx?wsdl", this.class.classLoader)
def proxy = new WSClient("http://192.168.3.69/provider/myService", this.class.classLoader)
proxy.setBasicAuthentication('user', 'pass')
proxy.initialize()
below is an error.
Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://192.168.3.69/provider/myService
Have you tried
groovy-wslite? It says in the documentation for GroovyWS that:So afaics, this should get close (I’m assuming you’re using SOAP):
There are instructions for getting wslite working with Grails here.