› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › HL7 Messages Posted to a Webservice › Reply To: HL7 Messages Posted to a Webservice
if {[catch {curl::transfer -url $url
-post 1
-httpheader $httpHeader
-postfields $soapEnv
-httpauth basic
-userpwd $useridpw
-verbose 0
-sslverifypeer 0
-infohttpcode httpcode
-errorbuffer error
-bodyvar httpResponse } ]} {
echo “***ERROR from tclcurl sending to REMOTE. Error is ” $error
sleep 30
return “{ERROR $mh}”
}
#
# a returncode of 200 is success.
#
if {$httpcode == 200} {
echo “Message was successfully sent to REMOTE”
} else {
echo “*** Error sending to REMOTE”
echo $httpcode
echo $httpResponse
echo “Original Message from LAB:”
echo $msg
echo “Soap Envelope that was sent to REMOTE:”
echo $soapEnv
sleep 30
return “{ERROR $mh}”
}
return “{CONTINUE $mh}”
}
Note that because I am doing this in a UPOC, returning ERROR actually puts the message into the recovery database and it will try to resend. I am told that this is a feature