Skip to content

Instantly share code, notes, and snippets.

@Dispader
Created May 11, 2016 21:33
Show Gist options
  • Save Dispader/0f0e8f706e097f38fa5a46d2eef8d35a to your computer and use it in GitHub Desktop.
Save Dispader/0f0e8f706e097f38fa5a46d2eef8d35a to your computer and use it in GitHub Desktop.
@Grab( 'com.github.groovy-wslite:groovy-wslite:0.8.0' )
import wslite.soap.*
import wslite.http.auth.*
import groovy.xml.XmlUtil
def client = new SOAPClient( 'https://test.anis.ch/HTDB.WebService/AnimalImportService.asmx' )
client.authorization = new HTTPBasicAuthorization( "613731", "test" )
// Trust the ssl for this site
client.httpClient.sslTrustAllCerts = true
def response = client.send(SOAPAction:'urn:tvd:heimtierdatenbanksql:webservice:animalimportservcie:v1:getAnimalsIn') {
body {
getAnimals( 'xmlns':'urn:tvd:heimtierdatenbanksql:webservice:animalimportmessages:v1' ) {
getMessage {
Header( 'xmlns':'urn:tvd:heimtierdatenbanksql:webservice:animalimportdata:v1' ) {
P_Praxisnummer( '371066' )
P_Account( '613731' )
P_PIN( 'test' )
}
Body( 'xmlns':'urn:tvd:heimtierdatenbanksql:webservice:animalimportdata:v1' ) {
KZ_Kennzeichnung( '756000100230345' )
}
}
}
}
}
println XmlUtil.serialize( response.getAnimalResponse )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment