Hello,
We have built one Moodle site for each of our faculties. Also, we have
deployed a .NET Portal (DotNetNuke) where every teacher and student may
login and see various resources.
One of this resources are the courses from Moodle (one for each
faculty). Since a teacher may teach to several faculties we tried via
WS/login to get his/her courses from Moodle via Web Services.
For achieving this we should change the Web Service URL dinamically, at runtime to the URL of the faculty one teaches.
The proxy for the WS is generated for one Moodle platform and,
since all the platforms are exactly the same, changing the Web Service
URL dynamically should work.... but it does not! meaning that I can
change the proxy URL but invoking a method that is on a different
platform that the original (the one the proxy was generated from) fails. The URL Behavior for the Web service is set to Dynamic.
All the platforms have the exact same web services version and they are on the same version of Moodle.
Help ?
System.InvalidOperationException:
There is an error in XML document (2, 559). --->
System.InvalidCastException: Cannot assign object of type
System.Xml.XmlNode[] to an object of type
AGSISPortal.MoodleWS.fr.loginReturn. at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMoodleWS.Read46_loginResponse()
at
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer26.Deserialize(XmlSerializationReader
reader) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events) ---
End of inner exception stack trace --- at
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
String encodingStyle, XmlDeserializationEvents events) at
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
String encodingStyle) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
AGSISPortal.MoodleWS.fr.MoodleWS.login(String username, String
password) in e:\dnn_48\desktopmodules\agsisportal\agsisportal\web
references\moodlews.fr\reference.cs:line 297 at
AGSIS.E_Learning.Moodle_MyCourses_Profesor.gvFacultati_RowDataBound(Object
sender, GridViewRowEventArgs e) in
E:\dnn_48\DesktopModules\AGSISPortal\AGSISPortal\Moodle_MyCourses_Profesor.ascx.cs:line
107