Following is the interface I have created:
using System;
using System.Collections.Generic;
using System.Text;
using CookComputing.XmlRpc;
namespace SubtitleFinderLib
{
namespace OpenSubtitles
{
[XmlRpcUrl("http://dev.opensubtitles.org/xml-rpc")]
public interface IOpenSubtitlesXmlRpc : IXmlRpcProxy
{
[XmlRpcMethod("ServerInfo")]
string[] ServerInfo();
[XmlRpcMethod("LogIn")]
string[] LogIn(string UserName, string Password, string Language, string UserAgent);
[XmlRpcMethod("LogOut")]
string LogOut(string Token);
}
}
}
I have created following Proxy class using the above interface:
using System;
using System.Collections.Generic;
using System.Text;
using CookComputing.XmlRpc;
namespace SubtitleFinderLib
{
namespace OpenSubtitles
{
public class OpenSubtitlesProxy
{
private static IOpenSubtitlesXmlRpc OpenSubtitlesService = XmlRpcProxyGen.Create<IOpenSubtitlesXmlRpc>();
public static string[] Login(string UserName, string Password, string Language, string UserAgent)
{
string[] Result;
try
{
Result = OpenSubtitlesService.LogIn(UserName, Password, Language, UserAgent);
}
catch (Exception Ex)
{
throw;
}
return Result;
}
public static string Logout(string Token)
{
return OpenSubtitlesService.LogOut(Token);
}
}
}
}
when i use the Login method of above class I am getting following exception:
response contains struct value where array expected (as type String[]) [response]
can any one please help on this.