Created
February 8, 2019 02:22
-
-
Save pradhyu/2c7ef912949c71fd1ca3358bb7b3da56 to your computer and use it in GitHub Desktop.
Soap ui client using groovy grab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('com.github.groovy-wslite:groovy-wslite:1.1.2') | |
import wslite.soap.* | |
def client = new SOAPClient('http://www.holidaywebservice.com/Holidays/US/Dates/USHolidayDates.asmx') | |
def response = client.send(SOAPAction:'http://www.27seconds.com/Holidays/US/Dates/GetMothersDay') { | |
body { | |
GetMothersDay('xmlns':'http://www.27seconds.com/Holidays/US/Dates/') { | |
year(2011) | |
} | |
} | |
} | |
println(response.GetMothersDayResponse.GetMothersDayResult.text()) | |
assert "2011-05-08T00:00:00" == response.GetMothersDayResponse.GetMothersDayResult.text() | |
assert 200 == response.httpResponse.statusCode | |
assert "ASP.NET" == response.httpResponse.headers['X-Powered-By'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment