Created
May 11, 2016 21:33
-
-
Save Dispader/0f0e8f706e097f38fa5a46d2eef8d35a to your computer and use it in GitHub Desktop.
SOAPTest, errors, from http://stackoverflow.com/posts/19950033/revisions
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: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