예제 #1
0
        public void DoTerminate_020110(Form1 frm)
        {
            LETSIRTE_Service_020110 ws = new LETSIRTE_Service_020110(frm.GetSessionId(), frm.Secret);

            frm.Log("Making Terminate Request");

            TerminateRequestType terminateRequest = new TerminateRequestType();

            terminateRequest.RequestID = frm.GetNextRequestId();
            terminateRequest.SessionID = frm.GetSessionId();

            TerminateResponseType terminateResponse = ws.Terminate(terminateRequest);

            string responseText = "";

            responseText += "\tErrorCode=" + terminateResponse.ErrorCode + "\r\n";
            responseText += "\tErrorString=" + terminateResponse.ErrorString + "\r\n";
            responseText += "\tErrorDiagnostic=" + terminateResponse.ErrorDiagnostic + "\r\n";
            responseText += "\tRequestID=" + terminateResponse.RequestID + "\r\n";
            responseText += "\tSessionID=" + terminateResponse.SessionID + "\r\n";
            responseText += "\tSuccessIndicator=" + terminateResponse.SuccessIndicator + "\r\n";

            frm.Log("Server responded with:\r\n" + responseText);
        }
        public void DoTerminate_020110(Form1 frm)
        {
            LETSIRTE_Service_020110 ws = new LETSIRTE_Service_020110(frm.GetSessionId(),frm.Secret);

            frm.Log("Making Terminate Request");

            TerminateRequestType terminateRequest = new TerminateRequestType();
            terminateRequest.RequestID = frm.GetNextRequestId();
            terminateRequest.SessionID = frm.GetSessionId();

            TerminateResponseType terminateResponse = ws.Terminate(terminateRequest);

            string responseText = "";
            responseText += "\tErrorCode=" + terminateResponse.ErrorCode + "\r\n";
            responseText += "\tErrorString=" + terminateResponse.ErrorString + "\r\n";
            responseText += "\tErrorDiagnostic=" + terminateResponse.ErrorDiagnostic + "\r\n";
            responseText += "\tRequestID=" + terminateResponse.RequestID + "\r\n";
            responseText += "\tSessionID=" + terminateResponse.SessionID + "\r\n";
            responseText += "\tSuccessIndicator=" + terminateResponse.SuccessIndicator + "\r\n";

            frm.Log("Server responded with:\r\n" + responseText);
        }
예제 #3
0
        public void DoDataExchange_020110(Form1 frm)
        {
            frm.Log("Making Data Exchange Request");

            LETSIRTE_Service_020110 ws = new LETSIRTE_Service_020110(frm.GetSessionId(), frm.Secret);

            RTERequestType dataExchangeRequest = new RTERequestType();

            dataExchangeRequest.SessionID = frm.GetSessionId();
            dataExchangeRequest.RequestID = frm.GetNextRequestId();


            ArrayList requests = new ArrayList();


            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));
            requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.incomplete, frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));
            //requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.completed, frm));
            //requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.unknown, frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));


            //requests.Add(CreateGetValueRequest_020110("/cocd/location", frm));


            ////literalString1000Type location = new literalString1000Type();
            ////location.Value = "this is location";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.location, location, frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/location", frm));


            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/completionThreshold", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/credit", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/entry", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/launchData", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/learnerId", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/learnerName", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/learnerPreferenceData", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/audioLevel", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/deliverySpeed", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/audioCaptioning", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/language", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/lessonStatus", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/location", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/maxTimeAllowed", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/mode", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/progressMeasure", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/rawPassingScore", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/scaledPassingScore", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/score", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/scaled", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/raw", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/min", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/max", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/sessionTime", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/successStatus", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/suspendData", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/totalTime", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/objectives", frm));


            //////test set and then get
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.incomplete, frm));
            ////requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));

            //////test set values



            ////comments from learner
            ////commentsFromLearner comments = new commentsFromLearner();
            ////comments.commentFromLearner = new commentType[2];

            ////comments.commentFromLearner[0] = new commentType();
            ////comments.commentFromLearner[0].comment = new localizedString4000Type();
            ////comments.commentFromLearner[0].comment.Value = "first comment";
            ////comments.commentFromLearner[0].comment.lang = "es";
            ////comments.commentFromLearner[0].location = new literalString1000Type();
            ////comments.commentFromLearner[0].location.Value = "1st comment location";
            ////comments.commentFromLearner[0].timeStampSpecified = true;
            ////comments.commentFromLearner[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);

            ////comments.commentFromLearner[1] = new commentType();
            ////comments.commentFromLearner[1].comment = new localizedString4000Type();
            ////comments.commentFromLearner[1].comment.Value = "2nd comment";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.commentsFromLearner, comments, frm));


            //////completion status
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.unknown, frm));

            //////exit
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.exit, exit.suspend, frm));


            //interactions
            interactions interactions = new interactions();

            interactions.interaction = new interactionType[2];

            interactions.interaction[0]                    = new interactionType();
            interactions.interaction[0].identifier         = "int1";
            interactions.interaction[0].type               = interactionTypeType.true_false;
            interactions.interaction[0].weightingSpecified = true;
            interactions.interaction[0].weighting          = .9M;
            interactions.interaction[0].timeStampSpecified = true;
            interactions.interaction[0].timeStamp          = new DateTime(2009, 9, 1, 15, 23, 5);
            interactions.interaction[0].result             = interactionTypeResult.correct;
            interactions.interaction[0].description        = new interactionTypeDescription();
            interactions.interaction[0].description.Value  = "int 1 description";
            interactions.interaction[0].latency            = "PT3S";

            interactions.interaction[0].objectiveIds    = new string[1];
            interactions.interaction[0].objectiveIds[0] = "intobj1";

            interactions.interaction[1]            = new interactionType();
            interactions.interaction[1].identifier = "int2";
            interactions.interaction[1].type       = interactionTypeType.multiple_choice;
            interactions.interaction[1].result     = interactionTypeResult.incorrect;

            requests.Add(CreateSetValueRequest_020110(ItemChoiceType.interactions, interactions, frm));


            requests.Add(CreateGetValueRequest_020110("/cocd/interactions", frm));


            //////learner preference
            ////learnerPreferenceType prefs = new learnerPreferenceType();
            ////prefs.audioCaptioningSpecified = true;
            ////prefs.audioCaptioning = learnerPreferenceTypeAudioCaptioning.on;
            ////prefs.audioLevelSpecified = true;
            ////prefs.audioLevel = .9M;
            ////prefs.deliverySpeedSpecified = true;
            ////prefs.deliverySpeed = .2M;
            ////prefs.language = "en-uk";
            //// *
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.learnerPreferenceData, prefs, frm));

            //////location
            ////literalString1000Type location2  = new literalString1000Type();
            ////location.Value = "we're at the first page";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.location, location2, frm));


            //////objectives
            ////objectivesType objectives = new objectivesType();

            ////objectives.objective = new objectiveType[2];

            ////objectives.objective[0] = new objectiveType();
            ////objectives.objective[0].identifier = new longIdentifierType();
            ////objectives.objective[0].identifier.Value = "obj1";
            ////objectives.objective[0].description = new localizedString250Type();
            ////objectives.objective[0].description.Value = "desc of obj1";
            ////objectives.objective[0].description.lang = "en";
            ////objectives.objective[0].completionStatus = completionStatusType.incomplete;
            ////objectives.objective[0].progressMeasure = .2M;
            ////objectives.objective[0].score = new scoreType();
            ////objectives.objective[0].score.maxSpecified = true;
            ////objectives.objective[0].score.max = 100;
            ////objectives.objective[0].score.minSpecified = true;
            ////objectives.objective[0].score.min = 0;
            ////objectives.objective[0].score.rawSpecified = true;
            ////objectives.objective[0].score.raw = 50;
            ////objectives.objective[0].score.scaledSpecified = true;
            ////objectives.objective[0].score.scaled = .5M;
            ////objectives.objective[0].successStatus = successStatusType.failed;

            ////objectives.objective[1] = new objectiveType();
            ////objectives.objective[1].identifier = new longIdentifierType();
            ////objectives.objective[1].identifier.Value = "obj2";
            ////objectives.objective[1].description = new localizedString250Type();
            ////objectives.objective[1].description.Value = "desc of obj2";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.objectives, objectives, frm));



            //////progress measure
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.progressMeasure, .32M, frm));


            //////score
            ////scoreType score = new scoreType();

            ////score.maxSpecified = true;
            ////score.max = 20;

            ////score.minSpecified = true;
            ////score.min = 10;

            ////score.rawSpecified = true;
            ////score.raw = 15;

            ////score.scaledSpecified = true;
            ////score.scaled = .5M;

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.score, score, frm));


            //////session time
            //////TODO: figure out other session time strings
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.sessionTime, "PT3S", frm));

            //////success status
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.successStatus, successStatusType.passed, frm));

            //////suspend data
            ////literalString4000Type suspendData = new literalString4000Type();
            ////suspendData.Value = "oh suspend can you suspend";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.suspendData, suspendData, frm));
            ////

            ///***********************************/
            ////begin value tests to check in database

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.completed, frm));
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.successStatus, successStatusType.passed, frm));

            ////literalString4000Type suspendData = new literalString4000Type();
            ////suspendData.Value = "oh suspend can you suspend";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.suspendData, suspendData, frm));

            ////literalString1000Type location = new literalString1000Type();
            ////location.Value = "this is location";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.location, location, frm));

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.exit, exit.normal, frm));

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.progressMeasure, .64M, frm));

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.sessionTime, "PT100S", frm));

            ////learnerPreferenceType prefs = new learnerPreferenceType();
            ////prefs.audioCaptioningSpecified = true;
            ////prefs.audioCaptioning = learnerPreferenceTypeAudioCaptioning.on;
            ////prefs.audioLevelSpecified = true;
            ////prefs.audioLevel = .9M;
            ////prefs.deliverySpeedSpecified = true;
            ////prefs.deliverySpeed = .2M;
            ////prefs.language = "en-uk";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.learnerPreferenceData, prefs, frm));


            ////objectivesType objectives = new objectivesType();

            ////objectives.objective = new objectiveType[2];

            ////objectives.objective[0] = new objectiveType();
            ////objectives.objective[0].identifier = new longIdentifierType();
            ////objectives.objective[0].identifier.Value = "obj3";
            ////objectives.objective[0].description = new localizedString250Type();
            ////objectives.objective[0].description.Value = "desc of obj1";
            ////objectives.objective[0].description.lang = "en";
            ////objectives.objective[0].completionStatusSpecified = true;
            ////objectives.objective[0].completionStatus = completionStatusType.incomplete;
            ////objectives.objective[0].progressMeasureSpecified = true;
            ////objectives.objective[0].progressMeasure = .2M;
            ////objectives.objective[0].score = new scoreType();
            ////objectives.objective[0].score.maxSpecified = true;
            ////objectives.objective[0].score.max = 100;
            ////objectives.objective[0].score.minSpecified = true;
            ////objectives.objective[0].score.min = 0;
            ////objectives.objective[0].score.rawSpecified = true;
            ////objectives.objective[0].score.raw = 50;
            ////objectives.objective[0].score.scaledSpecified = true;
            ////objectives.objective[0].score.scaled = .5M;
            ////objectives.objective[0].successStatusSpecified = true;
            ////objectives.objective[0].successStatus = successStatusType.failed;


            ////objectives.objective[1] = new objectiveType();
            ////objectives.objective[1].identifier = new longIdentifierType();
            ////objectives.objective[1].identifier.Value = "obj4";
            ////objectives.objective[1].description = new localizedString250Type();
            ////objectives.objective[1].description.Value = "desc of obj2";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.objectives, objectives, frm));

            ////commentsFromLearner comments = new commentsFromLearner();
            ////comments.commentFromLearner = new commentType[2];

            ////comments.commentFromLearner[0] = new commentType();

            ////comments.commentFromLearner[0].comment = new localizedString4000Type();
            ////comments.commentFromLearner[0].comment.Value = "first comment";
            ////comments.commentFromLearner[0].comment.lang = "es";
            ////comments.commentFromLearner[0].location = new literalString1000Type();
            ////comments.commentFromLearner[0].location.Value = "1st comment location";
            ////comments.commentFromLearner[0].timeStampSpecified = true;
            ////comments.commentFromLearner[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);

            ////comments.commentFromLearner[1] = new commentType();
            ////comments.commentFromLearner[1].comment = new localizedString4000Type();
            ////comments.commentFromLearner[1].comment.Value = "2nd comment";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.commentsFromLearner, comments, frm));


            ////interactionsType interactions = new interactionsType();
            ////interactions.interaction = new interactionType[2];

            ////interactions.interaction[0] = new interactionType();
            ////interactions.interaction[0].identifier = new longIdentifierType();
            ////interactions.interaction[0].identifier.Value = "int1";
            ////interactions.interaction[0].type = interactionTypeType.true_false;
            ////interactions.interaction[0].weightingSpecified = true;
            ////interactions.interaction[0].weighting = .9M;
            ////interactions.interaction[0].timeStampSpecified = true;
            ////interactions.interaction[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);
            ////interactions.interaction[0].result = "correct";
            ////interactions.interaction[0].description = new localizedString250Type();
            ////interactions.interaction[0].description.Value = "int 1 description";
            ////interactions.interaction[0].latency = "PT3S";

            ////interactions.interaction[0].objectiveIds = new objectiveIdsType();
            ////interactions.interaction[0].objectiveIds.objectiveId = new longIdentifierType[1];
            ////interactions.interaction[0].objectiveIds.objectiveId[0] = new longIdentifierType();
            ////interactions.interaction[0].objectiveIds.objectiveId[0].Value = "intobj1";

            ////interactions.interaction[1] = new interactionType();
            ////interactions.interaction[1].identifier = new longIdentifierType();
            ////interactions.interaction[1].identifier.Value = "int2";
            ////interactions.interaction[1].type = interactionTypeType.multiple_choice;
            ////interactions.interaction[1].result = "incorrect";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.interactions, interactions, frm));

            /***********************************/

            dataExchangeRequest.Items = requests.ToArray();

            RTEResponseType dataResponse = ws.RTERequest(dataExchangeRequest);

            string responseText = "";

            responseText += "\tRequestID=" + dataResponse.RequestID + "\r\n";
            responseText += "\tSessionId=" + dataResponse.SessionID + "\r\n\r\n";

            responseText += "\tGetValues:\r\n";

            for (int i = 0; i < dataResponse.Items.Length; i++)
            {
                if (dataResponse.Items[i] is GetValueResponseType)
                {
                    GetValueResponseType getResponse = (GetValueResponseType)dataResponse.Items[i];

                    responseText += "\tGetValue Request\r\n";
                    responseText += "\tItemElementName=" + getResponse.cmiDataModelElement.ItemElementName + "\r\n";
                    responseText += "\tItem=" + getResponse.cmiDataModelElement.Item + "\r\n";
                    responseText += "\t\tSuccessIndicator=" + getResponse.SuccessIndicator + "\r\n";
                    responseText += "\t\tRequestID=" + getResponse.RequestID + "\r\n";
                    responseText += "\t\tErrorCode=" + getResponse.ErrorCode + "\r\n";
                    responseText += "\t\tErrorString=" + getResponse.ErrorString + "\r\n";
                    responseText += "\t\tErrorDiagnostic=" + getResponse.ErrorDiagnostic + "\r\n";
                    responseText += "\t\t-----\r\n";
                }
                else if (dataResponse.Items[i] is SetValueResponseType)
                {
                    SetValueResponseType setResponse = (SetValueResponseType)dataResponse.Items[i];

                    responseText += "\tSetValue Request\r\n";
                    responseText += "\tRequestID=" + setResponse.RequestID + "\r\n";
                    responseText += "\t\tSuccessIndicator=" + setResponse.SuccessIndicator + "\r\n";
                    responseText += "\t\tErrorCode=" + setResponse.ErrorCode + "\r\n";
                    responseText += "\t\tErrorString=" + setResponse.ErrorString + "\r\n";
                    responseText += "\t\tErrorDiagnostic=" + setResponse.ErrorDiagnostic + "\r\n";
                    responseText += "\t\t-----\r\n";
                }
                else
                {
                    responseText += "\tERROR, unrecognized response type\r\n";
                    responseText += "\t\t-----\r\n";
                }
            }

            frm.Log("Server responded with:\r\n" + responseText);
        }
        public void DoDataExchange_020110(Form1 frm)
        {
            frm.Log("Making Data Exchange Request");

            LETSIRTE_Service_020110 ws = new LETSIRTE_Service_020110(frm.GetSessionId(),frm.Secret);

            RTERequestType dataExchangeRequest = new RTERequestType();

            dataExchangeRequest.SessionID = frm.GetSessionId();
            dataExchangeRequest.RequestID = frm.GetNextRequestId();

            ArrayList requests = new ArrayList();

            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));
            requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.incomplete, frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));
            //requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.completed, frm));
            //requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.unknown, frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/location", frm));

            ////literalString1000Type location = new literalString1000Type();
            ////location.Value = "this is location";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.location, location, frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/location", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/completionThreshold", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/credit", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/entry", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/launchData", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/learnerId", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/learnerName", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/learnerPreferenceData", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/audioLevel", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/deliverySpeed", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/audioCaptioning", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/learnerPreferenceData/language", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/lessonStatus", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/location", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/maxTimeAllowed", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/mode", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/progressMeasure", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/rawPassingScore", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/scaledPassingScore", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/score", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/scaled", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/raw", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/min", frm));
            ////getValueRequests.Add(CreateGetValueRequest("/cocd/score/max", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/sessionTime", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/successStatus", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/suspendData", frm));
            //requests.Add(CreateGetValueRequest_020110("/cocd/totalTime", frm));

            //requests.Add(CreateGetValueRequest_020110("/cocd/objectives", frm));

            //////test set and then get
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.incomplete, frm));
            ////requests.Add(CreateGetValueRequest_020110("/cocd/completionStatus", frm));

            //////test set values

            ////comments from learner
            ////commentsFromLearner comments = new commentsFromLearner();
            ////comments.commentFromLearner = new commentType[2];

            ////comments.commentFromLearner[0] = new commentType();
            ////comments.commentFromLearner[0].comment = new localizedString4000Type();
            ////comments.commentFromLearner[0].comment.Value = "first comment";
            ////comments.commentFromLearner[0].comment.lang = "es";
            ////comments.commentFromLearner[0].location = new literalString1000Type();
            ////comments.commentFromLearner[0].location.Value = "1st comment location";
            ////comments.commentFromLearner[0].timeStampSpecified = true;
            ////comments.commentFromLearner[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);

            ////comments.commentFromLearner[1] = new commentType();
            ////comments.commentFromLearner[1].comment = new localizedString4000Type();
            ////comments.commentFromLearner[1].comment.Value = "2nd comment";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.commentsFromLearner, comments, frm));

            //////completion status
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.unknown, frm));

            //////exit
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.exit, exit.suspend, frm));

            //interactions
            interactions interactions = new interactions();
            interactions.interaction = new interactionType[2];

            interactions.interaction[0] = new interactionType();
            interactions.interaction[0].identifier = "int1";
            interactions.interaction[0].type = interactionTypeType.true_false;
            interactions.interaction[0].weightingSpecified = true;
            interactions.interaction[0].weighting = .9M;
            interactions.interaction[0].timeStampSpecified = true;
            interactions.interaction[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);
            interactions.interaction[0].result = interactionTypeResult.correct;
            interactions.interaction[0].description = new interactionTypeDescription();
            interactions.interaction[0].description.Value = "int 1 description";
            interactions.interaction[0].latency = "PT3S";

            interactions.interaction[0].objectiveIds = new string[1];
            interactions.interaction[0].objectiveIds[0] = "intobj1";

            interactions.interaction[1] = new interactionType();
            interactions.interaction[1].identifier = "int2";
            interactions.interaction[1].type = interactionTypeType.multiple_choice;
            interactions.interaction[1].result = interactionTypeResult.incorrect;

            requests.Add(CreateSetValueRequest_020110(ItemChoiceType.interactions, interactions, frm));

            requests.Add(CreateGetValueRequest_020110("/cocd/interactions", frm));

            //////learner preference
            ////learnerPreferenceType prefs = new learnerPreferenceType();
            ////prefs.audioCaptioningSpecified = true;
            ////prefs.audioCaptioning = learnerPreferenceTypeAudioCaptioning.on;
            ////prefs.audioLevelSpecified = true;
            ////prefs.audioLevel = .9M;
            ////prefs.deliverySpeedSpecified = true;
            ////prefs.deliverySpeed = .2M;
            ////prefs.language = "en-uk";
            //// *
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.learnerPreferenceData, prefs, frm));

            //////location
            ////literalString1000Type location2  = new literalString1000Type();
            ////location.Value = "we're at the first page";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.location, location2, frm));

            //////objectives
            ////objectivesType objectives = new objectivesType();

            ////objectives.objective = new objectiveType[2];

            ////objectives.objective[0] = new objectiveType();
            ////objectives.objective[0].identifier = new longIdentifierType();
            ////objectives.objective[0].identifier.Value = "obj1";
            ////objectives.objective[0].description = new localizedString250Type();
            ////objectives.objective[0].description.Value = "desc of obj1";
            ////objectives.objective[0].description.lang = "en";
            ////objectives.objective[0].completionStatus = completionStatusType.incomplete;
            ////objectives.objective[0].progressMeasure = .2M;
            ////objectives.objective[0].score = new scoreType();
            ////objectives.objective[0].score.maxSpecified = true;
            ////objectives.objective[0].score.max = 100;
            ////objectives.objective[0].score.minSpecified = true;
            ////objectives.objective[0].score.min = 0;
            ////objectives.objective[0].score.rawSpecified = true;
            ////objectives.objective[0].score.raw = 50;
            ////objectives.objective[0].score.scaledSpecified = true;
            ////objectives.objective[0].score.scaled = .5M;
            ////objectives.objective[0].successStatus = successStatusType.failed;

            ////objectives.objective[1] = new objectiveType();
            ////objectives.objective[1].identifier = new longIdentifierType();
            ////objectives.objective[1].identifier.Value = "obj2";
            ////objectives.objective[1].description = new localizedString250Type();
            ////objectives.objective[1].description.Value = "desc of obj2";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.objectives, objectives, frm));

            //////progress measure
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.progressMeasure, .32M, frm));

            //////score
            ////scoreType score = new scoreType();

            ////score.maxSpecified = true;
            ////score.max = 20;

            ////score.minSpecified = true;
            ////score.min = 10;

            ////score.rawSpecified = true;
            ////score.raw = 15;

            ////score.scaledSpecified = true;
            ////score.scaled = .5M;

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.score, score, frm));

            //////session time
            //////TODO: figure out other session time strings
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.sessionTime, "PT3S", frm));

            //////success status
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.successStatus, successStatusType.passed, frm));

            //////suspend data
            ////literalString4000Type suspendData = new literalString4000Type();
            ////suspendData.Value = "oh suspend can you suspend";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.suspendData, suspendData, frm));
            ////

            ///***********************************/
            ////begin value tests to check in database

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.completionStatus, completionStatusType.completed, frm));
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.successStatus, successStatusType.passed, frm));

            ////literalString4000Type suspendData = new literalString4000Type();
            ////suspendData.Value = "oh suspend can you suspend";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.suspendData, suspendData, frm));

            ////literalString1000Type location = new literalString1000Type();
            ////location.Value = "this is location";
            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.location, location, frm));

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.exit, exit.normal, frm));

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.progressMeasure, .64M, frm));

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.sessionTime, "PT100S", frm));

            ////learnerPreferenceType prefs = new learnerPreferenceType();
            ////prefs.audioCaptioningSpecified = true;
            ////prefs.audioCaptioning = learnerPreferenceTypeAudioCaptioning.on;
            ////prefs.audioLevelSpecified = true;
            ////prefs.audioLevel = .9M;
            ////prefs.deliverySpeedSpecified = true;
            ////prefs.deliverySpeed = .2M;
            ////prefs.language = "en-uk";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.learnerPreferenceData, prefs, frm));

            ////objectivesType objectives = new objectivesType();

            ////objectives.objective = new objectiveType[2];

            ////objectives.objective[0] = new objectiveType();
            ////objectives.objective[0].identifier = new longIdentifierType();
            ////objectives.objective[0].identifier.Value = "obj3";
            ////objectives.objective[0].description = new localizedString250Type();
            ////objectives.objective[0].description.Value = "desc of obj1";
            ////objectives.objective[0].description.lang = "en";
            ////objectives.objective[0].completionStatusSpecified = true;
            ////objectives.objective[0].completionStatus = completionStatusType.incomplete;
            ////objectives.objective[0].progressMeasureSpecified = true;
            ////objectives.objective[0].progressMeasure = .2M;
            ////objectives.objective[0].score = new scoreType();
            ////objectives.objective[0].score.maxSpecified = true;
            ////objectives.objective[0].score.max = 100;
            ////objectives.objective[0].score.minSpecified = true;
            ////objectives.objective[0].score.min = 0;
            ////objectives.objective[0].score.rawSpecified = true;
            ////objectives.objective[0].score.raw = 50;
            ////objectives.objective[0].score.scaledSpecified = true;
            ////objectives.objective[0].score.scaled = .5M;
            ////objectives.objective[0].successStatusSpecified = true;
            ////objectives.objective[0].successStatus = successStatusType.failed;

            ////objectives.objective[1] = new objectiveType();
            ////objectives.objective[1].identifier = new longIdentifierType();
            ////objectives.objective[1].identifier.Value = "obj4";
            ////objectives.objective[1].description = new localizedString250Type();
            ////objectives.objective[1].description.Value = "desc of obj2";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.objectives, objectives, frm));

            ////commentsFromLearner comments = new commentsFromLearner();
            ////comments.commentFromLearner = new commentType[2];

            ////comments.commentFromLearner[0] = new commentType();

            ////comments.commentFromLearner[0].comment = new localizedString4000Type();
            ////comments.commentFromLearner[0].comment.Value = "first comment";
            ////comments.commentFromLearner[0].comment.lang = "es";
            ////comments.commentFromLearner[0].location = new literalString1000Type();
            ////comments.commentFromLearner[0].location.Value = "1st comment location";
            ////comments.commentFromLearner[0].timeStampSpecified = true;
            ////comments.commentFromLearner[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);

            ////comments.commentFromLearner[1] = new commentType();
            ////comments.commentFromLearner[1].comment = new localizedString4000Type();
            ////comments.commentFromLearner[1].comment.Value = "2nd comment";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.commentsFromLearner, comments, frm));

            ////interactionsType interactions = new interactionsType();
            ////interactions.interaction = new interactionType[2];

            ////interactions.interaction[0] = new interactionType();
            ////interactions.interaction[0].identifier = new longIdentifierType();
            ////interactions.interaction[0].identifier.Value = "int1";
            ////interactions.interaction[0].type = interactionTypeType.true_false;
            ////interactions.interaction[0].weightingSpecified = true;
            ////interactions.interaction[0].weighting = .9M;
            ////interactions.interaction[0].timeStampSpecified = true;
            ////interactions.interaction[0].timeStamp = new DateTime(2009, 9, 1, 15, 23, 5);
            ////interactions.interaction[0].result = "correct";
            ////interactions.interaction[0].description = new localizedString250Type();
            ////interactions.interaction[0].description.Value = "int 1 description";
            ////interactions.interaction[0].latency = "PT3S";

            ////interactions.interaction[0].objectiveIds = new objectiveIdsType();
            ////interactions.interaction[0].objectiveIds.objectiveId = new longIdentifierType[1];
            ////interactions.interaction[0].objectiveIds.objectiveId[0] = new longIdentifierType();
            ////interactions.interaction[0].objectiveIds.objectiveId[0].Value = "intobj1";

            ////interactions.interaction[1] = new interactionType();
            ////interactions.interaction[1].identifier = new longIdentifierType();
            ////interactions.interaction[1].identifier.Value = "int2";
            ////interactions.interaction[1].type = interactionTypeType.multiple_choice;
            ////interactions.interaction[1].result = "incorrect";

            ////requests.Add(CreateSetValueRequest_020110(ItemChoiceType.interactions, interactions, frm));

            /***********************************/

            dataExchangeRequest.Items = requests.ToArray();

            RTEResponseType dataResponse = ws.RTERequest(dataExchangeRequest);

            string responseText = "";
            responseText += "\tRequestID=" + dataResponse.RequestID + "\r\n";
            responseText += "\tSessionId=" + dataResponse.SessionID + "\r\n\r\n";

            responseText += "\tGetValues:\r\n";

            for (int i = 0; i < dataResponse.Items.Length; i++)
            {
                if (dataResponse.Items[i] is GetValueResponseType){
                    GetValueResponseType getResponse = (GetValueResponseType) dataResponse.Items[i];

                    responseText += "\tGetValue Request\r\n";
                    responseText += "\tItemElementName=" + getResponse.cmiDataModelElement.ItemElementName + "\r\n";
                    responseText += "\tItem=" + getResponse.cmiDataModelElement.Item + "\r\n";
                    responseText += "\t\tSuccessIndicator=" + getResponse.SuccessIndicator + "\r\n";
                    responseText += "\t\tRequestID=" + getResponse.RequestID + "\r\n";
                    responseText += "\t\tErrorCode=" + getResponse.ErrorCode + "\r\n";
                    responseText += "\t\tErrorString=" + getResponse.ErrorString + "\r\n";
                    responseText += "\t\tErrorDiagnostic=" + getResponse.ErrorDiagnostic + "\r\n";
                    responseText += "\t\t-----\r\n";
                }
                else if (dataResponse.Items[i] is SetValueResponseType){
                    SetValueResponseType setResponse = (SetValueResponseType) dataResponse.Items[i];

                    responseText += "\tSetValue Request\r\n";
                    responseText += "\tRequestID=" + setResponse.RequestID + "\r\n";
                    responseText += "\t\tSuccessIndicator=" + setResponse.SuccessIndicator + "\r\n";
                    responseText += "\t\tErrorCode=" + setResponse.ErrorCode + "\r\n";
                    responseText += "\t\tErrorString=" + setResponse.ErrorString + "\r\n";
                    responseText += "\t\tErrorDiagnostic=" + setResponse.ErrorDiagnostic + "\r\n";
                    responseText += "\t\t-----\r\n";
                }
                else{
                    responseText += "\tERROR, unrecognized response type\r\n";
                    responseText += "\t\t-----\r\n";
                }
            }

            frm.Log("Server responded with:\r\n" + responseText);
        }