Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Learning Aids/Tools 2 years ago
Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I'm currently stuck with quite a significant issue that i'm hoping someone may be able to shed some light on, regarding configuring an XML-RPC based web service to talk between my game based learning virtual world and a dedicated Moodle site
To the best of my knowledge, from following some sparse information on how to configure a Moodle web service, i've done the following steps:
The moodle documentation sends you in a bit of a loop but from what I can see i've the check list covered
I'm now trying to plug this into the backend of my virtual world to populate my dynamic terrain engine with sets of topics,assignments etc based on what the user would have access to etc
My issue comes from the simple HttpWebRequest for retrieving the token for the user I'm using the following method to return a string containing the token
public string GetToken(string uname,string pword) { byte[] buffer = Encoding.ASCII.GetBytes("username="+uname+"&password="+pword+"&service=reflex"); HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url + "login/token.php?username=" + uname + "&password=" + pword + "&service=myservice"); WebReq.Method = WebRequestMethods.Http.Post; WebReq.ContentType = "application/x-www-form-urlencoded"; WebReq.ContentLength = buffer.Length; using(Stream PostData = WebReq.GetRequestStream()) PostData.Write(buffer, 0, buffer.Length); HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse(); using(StreamReader reader = new StreamReader(WebResp.GetResponseStream())) return token = reader.ReadToEnd(); }
When I debug this to validate the token is generated, it throws an error saying the web service is down, but to the best of my knowledge the web service isnt called here, this uses a built in primitive php file to return a string and no more. I have checked the PostData.Write and its throwing a .Length NotSupportedException which i'm unsure as to if its having an impact upon the second using statement
I'm hoping if someone can aid regarding configuration settings that the next steps should fall into place easily as the XML-RPC dll seems quite robust and easy to use
Any help would be greatly appreciated
Many thanks Barry
Now resolved
Worked around to retrieve the token manually through a sql call and have the web service functioning now
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.