XML RPC c# Call returns array of strings and int
        Posted  
        
            by chillconsulting
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by chillconsulting
        
        
        
        Published on 2010-04-27T02:53:54Z
        Indexed on 
            2010/04/27
            3:03 UTC
        
        
        Read the original article
        Hit count: 585
        
I'm doing an XML RPC call in ASP.net with c# and the call returns an Array called userinfo with strings and integers in it and I can't seem to figure out how to parse the data and put it into string and int objects... The only thing that compiles is if I make it an Object in the struct. The int returns fines and is referenced easily.
Any help would be appreciated - this is what I got.
public Page_Load(object sender, EventArgs e){
    IValidateSSO proxy = XmlRpcProxyGen.Create<IValidateSSO>();
    UserInfoSSOValue ret2 = proxy.UserInfoSSO(ssoAuth, ssoValue);
    int i = ret2.isonid;
}
public struct UserInfoSSOValue
{
    public Object userinfo;
    public int isonid;
}
[XmlRpcUrl("host")]
public interface IValidateSSO : IXmlRpcProxy
{
    [XmlRpcMethod("sso.session_userinfo")]
    UserInfoSSOValue UserInfoSSO(string ssoauth, string sid);
}
Here is what the xml rpc calls returns (I know it's in php... I'm trying to implement in c#):
sso.session_userinfo(string $ssoauth, string $sid)
string $ssoauth - authentication string (assigned by ONID support)
string $sid - sid to get info on
Returns:
Array
    (
        [userinfo] => Array  
            (
                [lastname] => College  
                [expire_time] => 1118688011
                [osuuid] => 12345678901  
                [sid_length] => 3600  
                [ip] => 10.0.0.1  
                [sid] => WiT7ppAEUKS3rJ2lNz3Ue64sGPxnnLL0  
                [username] => collegej  
                [firstname] => Joe  
                [fullname] => College, Joe Student  
                [email] => [email protected]  
                [create_time] => 1118684410  
             )  
        [isonid] => 1  
    )  
array userinfo - array containing basic user information
© Stack Overflow or respective owner