I am trying to integrate Fedex Service in my asp.net website. I have downloaded the code from the Fedex website, but when I run this simple program I get an error, Check the following Code:
static void Main(string[] args)
{
TrackRequest request = CreateTrackRequest();
TrackService service = new TrackService();//I get Error Here
if (usePropertyFile())
{
service.Url = getProperty("endpoint");
}
try
{
// Call the Track web service passing in a TrackRequest and returning a TrackReply
TrackReply reply = service.track(request);
if (reply.HighestSeverity == NotificationSeverityType.SUCCESS || reply.HighestSeverity == NotificationSeverityType.NOTE || reply.HighestSeverity == NotificationSeverityType.WARNING)
{
ShowTrackReply(reply);
}
ShowNotifications(reply);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerText);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Console.WriteLine("Press any key to quit!");
Console.ReadKey();
}
The Following error on debugging occurred on TrackService service = new TrackService();
(line #5):
Unable to generate a temporary class (result=1). error CS0029: Cannot implicitly convert type 'TrackWebServiceClient.TrackServiceWebReference.EMailNotificationEventType' to 'TrackWebServiceClient.TrackServiceWebReference.EMailNotificationEventType[]'