Skip to content
Snippets Groups Projects
Commit 936be50b authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

fix: header, hostname and clean-up comments

parent 938ebf3e
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ perf_values="-"
ROSETTA_HTTPS_PORT="8443"
ROSETTA_HTTP_PORT="1801"
ROSETTA_HOST=$(hostname --fqdn)
# check if HTTPS is used, TRUE == 1
IS_HTTPS=$( lsof -i:8443 -sTCP:LISTEN | tail -n +2 | wc -l )
......@@ -28,26 +29,11 @@ else
PROTOCOL="http"
fi
HEADER_CONTENT='Content-Type:text/xml;charset=UTF-8'
HEADER_CALL='SOAPAction:'
HEADER_CONTENT="Content-type: text/xml; charset=\"utf-8\""
HEADER_CALL="SOAPAction:"
SOAP_ENVELOPE_PATH="$( dirname ${0} )/$( basename ${0} '.sh').xml"
SOAP_ENVELOPE=$(cat <<-EOM
<soap:Envelope
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:namesp1='http://dps.exlibris.com/'
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<soap:Body>
<getHeartBit xmlns='http://dps.exlibris.com/' />
</soap:Body>
</soap:Envelope>
EOM
)
SOAP_ENDPOINT_URL="${PROTOCOL}://${HOSTNAME}.slub-dresden.de:${ROSETTA_PORT}/dpsws/repository/DataManagerServicesWS?getHeartBit"
# CALL="echo \"${SOAP_ENVELOPE}\" | curl --header \"${HEADER_CONTENT}\" --header \"${HEADER_CALL}\" --data @- ${SOAP_ENDPOINT_URL}"
CALL="curl --header \"${HEADER_CONTENT}\" --header \"${HEADER_CALL}\" --data @${SOAP_ENVELOPE_PATH} ${SOAP_ENDPOINT_URL}"
SOAP_ENDPOINT_URL="${PROTOCOL}://${ROSETTA_HOST}:${ROSETTA_PORT}/dpsws/repository/DataManagerServicesWS?getHeartBit"
CALL="curl -s --header '${HEADER_CONTENT}' --header '${HEADER_CALL}' --data @${SOAP_ENVELOPE_PATH} ${SOAP_ENDPOINT_URL}"
# check if curl is installed
BINARY="$(command -v curl)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment