On dc, 2005-02-02 at 11:50 +0100, Arturo GonzÃlez wrote: > Hi, > > I'm trying to develop an example client for ILIAS open source > webservice, lately supported by novell > (http://www.ilias.uni-koeln.de/ios/index-e.html) , but i'm having > problems with a remote function that returns an integer. > > The server is located at: > > http://tad1.ugr.es/ilias_3_3_x/webservice/soap/server.php > http://tad1.ugr.es/ilias_3_3_x/webservice/soap/server.php?wsdl > > if i try to consume the lookupUser method as follows: > > int user_id = ilUA.lookupUser(sess_id, "soap_user"); > > Then the compiler says that can't convert from string to int: > > exampleClient.cs(25) error CS0029: Cannot convert implicitly from > `string' to `int'
The return type of that method is xsd:integer, which is mapped to String by to wsdl tool. Notice that xsd:integer is not the same as xsd:int, which is mapped to Int32. MS.NET does the same. > > if i try the next: > > int user_id = Convert.ToInt32(ilUA.lookupUser(sess_id, "soap_user")); > > then it throws: > > Unhandled Exception: System.Web.Services.Protocols.SoapException: > Session not valid The error you are getting is an error reported by the server. You should debug the server and see why it is throwing that error. > > in <0x004c5> > System.Web.Services.Protocols.SoapHttpClientProtocol:ReceiveResponse > (System.Net.WebResponse,System.Web.Services.Protocols.SoapClientMessage,System.Web.Services.Protocols.SoapExtension[]) > in <0x0007d> (wrapper remoting-invoke-with-check) > System.Web.Services.Protocols.SoapHttpClientProtocol:ReceiveResponse > (System.Net.WebResponse,System.Web.Services.Protocols.SoapClientMessage,System.Web.Services.Protocols.SoapExtension[]) > in <0x002a9> System.Web.Services.Protocols.SoapHttpClientProtocol:Invoke > (string,object[]) > in <0x0006b> (wrapper remoting-invoke-with-check) > System.Web.Services.Protocols.SoapHttpClientProtocol:Invoke > (string,object[]) > in <0x0006b> ilUserAdministration:lookupUser (string,string) > in <0x000bf> ConsoleIlUserAdmin:Main (string[]) > > > Does anyone know what could be happening? I had no problem consuming the > 'login' method that returns a string with the PHP_SESSID. > > regards, > > Arturo. > > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
