I have a post-function that sends a POST request from Jira to BMC Remedy, I can do the request successfully but I don't know how can I get the SOAP response?
I should be getting a value which is the Change ID along with the Error Code and Error Description.
This is a sample response that I should receive:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns0:CreateResponse xmlns:ns0="urn:JR_Create">
<ns0:ChangeID>CR1000</ns0:ChangeID>
<ns0:ErrCode>OK</ns0:ErrCode>
<ns0:ErrDesc>Successful</ns0:ErrDesc>
</ns0:CreateResponse>
</soapenv:Body>
</soapenv:Envelope>
How can I get the response right after I sent the request successfully?
I'm trying to follow this example, but I'm getting too many errors:
def client = new SOAPClient("http://...")
def response = client.send(SOAPAction: "SomeAction",
connectTimeout:5000,
readTimeout:10000,
useCaches:false,
followRedirects:false,
sslTrustAllCerts:true) {
version SOAPVersion.V1_2 // SOAPVersion.V1_1 is default
soapNamespacePrefix "SOAP" // "soap-env" is default
encoding "ISO-8859-1" // "UTF-8" is default encoding for xml
envelopeAttributes "xmlns:hr":"http://example.org/hr"
header(mustUnderstand:false) {
auth {
apiToken("1234567890")
}
}
body {
GetWeatherByZipCode(xmlns:"http://example.weather.org") {
ZipCode("93657")
}
}
}