Forum Discussion
Thanks for your feedback. I managed to get the HTTPBuilder library to work, but unfortunately it also restricts the HTTP verbs to the "traditional" ones ie. forbidding PROPFIND et al. I will try out the suggestions you made and report back...
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*
def http = new HTTPBuilder('https://test.com')
http.request( GET ) {
uri.path = '/path/'
requestContentType = "text/xml"
// body = ""
response.success = { resp ->
log.info "POST response status: ${resp.statusLine}"
}
}Hi,
If you're happy to go the Groovy script route, then I would try using a Java based WebDAV client like Apache JackRabbit. Maybe take a look at:
http://jackrabbit.apache.org/jcr/getting-started-with-apache-jackrabbit.html
You'll probably need to add it's jar file (jackrabbit-core, maybe javax.jcr - see http://jackrabbit.apache.org/jcr/first-hops.html) as a dependency. If you're not sure how to do this please see http://rupertanderson.com/blog/1-how-to-develop-add-and-use-a-custom-groovy-library-in-soapui/
I also saw this WebDAV client https://github.com/lookfirst/sardine - but I'd probably try the Apache one first.
I had quick try with a simple HttpURLConnection based approach, but like you found, it wouldn't allow PROPFIND.
Regards,
Rup