I'm building an LTI tool that will allow users to be graded on content they create in my system. I want to accomplish this through LIS Outcomes, but I'm having trouble sending my grade to the D2L system.
I keep getting an "Exception Occurred while processing the request" message from D2L.
Am I sending the correct request body?
Here is the request body I am sending:
<?xml version="1.0" encoding="UTF-8"?>
<imsx_POXEnvelopeRequest xmlns="http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0">
<imsx_POXHeader>
<imsx_POXRequestHeaderInfo>
<imsx_version>V1.0</imsx_version>
<imsx_messageIdentifier>Inserted from My App</imsx_messageIdentifier>
</imsx_POXRequestHeaderInfo>
</imsx_POXHeader>
<imsx_POXBody>
<replaceResultRequest>
<resultRecord>
<sourcedGUID>
<sourcedId>31e08aaa-157f-4f60-9b7f-65c4f6f8ae67</sourcedId>
</sourcedGUID>
<result>
<resultScore>
<language>en</language>
<textString>0.65</textString>
</resultScore>
</result>
</resultRecord>
</replaceResultRequest>
</imsx_POXBody>
</imsx_POXEnvelopeRequest>
And here is the response I get back from the D2L server:
<?xml version="1.0" encoding="UTF-8"?>
<imsx_POXEnvelopeRequest xmlns="http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<imsx_POXHeader>
<imsx_POXResponseHeaderInfo>
<imsx_version>V1.0</imsx_version>
<imsx_messageIdentifier>Inserted from My App</imsx_messageIdentifier>
<imsx_statusInfo>
<imsx_codeMajor>failure</imsx_codeMajor>
<imsx_severity>error</imsx_severity>
<imsx_description>Exception occured while processing the request.</imsx_description>
<imsx_messageRefIdentifier>11a1fe65-aacf-47d6-9062-072cb61cc5b4</imsx_messageRefIdentifier>
<imsx_operationRefIdentifier>replaceResult</imsx_operationRefIdentifier>
</imsx_statusInfo>
</imsx_POXResponseHeaderInfo>
</imsx_POXHeader>
<imsx_POXBody />
</imsx_POXEnvelopeRequest>
Any help is greatly appreciated, thanks.
Edit:
As a sidenote, I was at first sending the Oauth hash in the Authorization
header with spaces in between values.
for example: Authorization: OAuth realm="{url}", oauth_signature="{sig}"...
but I kept getting a "authorizationfailure" message.
I took a look at the PHP example at: https://github.com/Desire2Learn-Valence/sample-LTI-WHMIS-quiz, and it looked like that was not inserting the spaces into the Authorization
header, so i changed my headers to look like:
Authorization: OAuth realm="{url}",oauth_signature="{sig}"
And now D2L seems to accept it, but gives me the aforementioned Exception occured
message