Fedex Service benim asp.net web sitesine entegre çalışıyorum. Ben Fedex web sitesinden kod indirdiğiniz ama bu basit programı çalıştırdığınızda bir hata, Kontrol aşağıdaki kodu almak:Fedex Hizmet Entegrasyonu Hatası (geçici bir sınıf oluşturamıyor)
hata ayıklamayı ardından hataTrackService service = new TrackService();
oluştu
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();
}
(5 hat #):
Geçici sınıf oluşturulamadı (sonuç = 1). hata CS0029: örtülü tip 'TrackWebServiceClient.TrackServiceWebReference.EMailNotificationEventType' dönüştürülemez 'TrackWebServiceClient.TrackServiceWebReference.EMailNotificationEventType []'
TrackService sadece 'POCO' sen örneğini mi [aşağıdaki resme bakın] WSDL kaldırıldı? Bu bir web hizmeti ise, FedEx'in bir web başvurusu olarak projenize ekleyeceğiniz bir WSDL sağlayacağını düşünürdüm ve sonra 'iz' yöntemini çağırmak için oluşturulan saplamayı kullanın. –