【问题标题】:Creating FedEx Shipping Documnents using FedEx ship service WSDL使用 FedEx 寄件服务 WSDL 创建 FedEx 寄件单据
【发布时间】:2011-02-10 09:35:21
【问题描述】:

我正在与 FedEx 国际寄件服务整合。但我真的被困在一个部分。我正在尝试使用他们的测试环境创建原产地证书。我遵循了 xml 架构并提出了以下代码

private static void SetCustomInvoice(ProcessShipmentRequest request)
    {
        request.RequestedShipment.ShippingDocumentSpecification = new ShippingDocumentSpecification();
        request.RequestedShipment.ShippingDocumentSpecification.ShippingDocumentTypes = new RequestedShippingDocumentType[1] { new RequestedShippingDocumentType() };
        request.RequestedShipment.ShippingDocumentSpecification.ShippingDocumentTypes[0] = RequestedShippingDocumentType.CERTIFICATE_OF_ORIGIN;
        request.RequestedShipment.ShippingDocumentSpecification.CertificateOfOrigin = new CertificateOfOriginDetail();
        request.RequestedShipment.ShippingDocumentSpecification.CertificateOfOrigin.DocumentFormat = new ShippingDocumentFormat { StockType = ShippingDocumentStockType.STOCK_4X6, ImageType = ShippingDocumentImageType.PDF, ImageTypeSpecified = true, StockTypeSpecified = true };
        request.RequestedShipment.SpecialServicesRequested = new ShipmentSpecialServicesRequested();
        request.RequestedShipment.SpecialServicesRequested.SpecialServiceTypes = new ShipmentSpecialServiceType[1] { new ShipmentSpecialServiceType() };
        request.RequestedShipment.SpecialServicesRequested.SpecialServiceTypes[0] = ShipmentSpecialServiceType.ELECTRONIC_TRADE_DOCUMENTS;

        request.RequestedShipment.SpecialServicesRequested.EtdDetail = new EtdDetail();
        request.RequestedShipment.SpecialServicesRequested.EtdDetail.RequestedDocumentCopies = new RequestedShippingDocumentType[1] { RequestedShippingDocumentType.CERTIFICATE_OF_ORIGIN };
        request.RequestedShipment.SpecialServicesRequested.EtdDetail.DocumentReferences = new UploadDocumentReferenceDetail[1] { new UploadDocumentReferenceDetail() };
        request.RequestedShipment.SpecialServicesRequested.EtdDetail.RequestedDocumentCopies[0] = RequestedShippingDocumentType.CERTIFICATE_OF_ORIGIN;

    }

但我不断收到来自网络服务的错误消息,指出“库存类型无效”。即使 shippingDocumentStockType 是一个枚举并且我正在使用其中的一个值。我仍然收到此错误。有什么想法我可能会出错吗? 任何信息都会有很大帮助。我曾尝试与 FedEx 技术支持取得联系,但他们的帮助并不大。

【问题讨论】:

    标签: c# fedex


    【解决方案1】:

    这对您来说可能有点晚了,但只是想提供一个答案,以防其他人可能正在寻找它。

    我遇到了类似的问题,但不是原产地证书,而是商业发票。结果这些表格需要以 PDF 格式打印在 8.5 x 11 的完整页面上,因此将 StockType 从 STOCK_4x6 更改为 PAPER_LETTER 为我修复了它:

    来自: request.RequestedShipment.ShippingDocumentSpecification.CertificateOfOrigin.DocumentFormat = new ShippingDocumentFormat { StockType = ShippingDocumentStockType.STOCK_4X6, ImageType = ShippingDocumentImageType.PDF, ImageTypeSpecified = true, StockTypeSpecified = true };

    到: request.RequestedShipment.ShippingDocumentSpecification.CertificateOfOrigin.DocumentFormat = new ShippingDocumentFormat { StockType = ShippingDocumentStockType.PAPER_LETTER, ImageType = ShippingDocumentImageType.PDF, ImageTypeSpecified = true, StockTypeSpecified = true };

    希望对你有帮助

    【讨论】:

    • 仍然如此。我尝试了 PAPER_7X4.75 的商业发票并得到了错误
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-20
    • 1970-01-01
    • 2013-10-29
    相关资源
    最近更新 更多