首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用FedEx ship服务WSDL创建FedEx发货文档

使用FedEx ship服务WSDL创建FedEx发货文档
EN

Stack Overflow用户
提问于 2011-02-10 17:35:22
回答 1查看 4.4K关注 0票数 3

我正在与FedEx国际船舶服务集成的过程中。但是我真的被卡住了。我正在尝试使用他们的测试环境创建一个原产地证书。我遵循了xml模式,并编写了以下代码

代码语言:javascript
复制
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;

    }

但我一直收到web服务返回的错误消息,指出“股票类型无效”。即使shipmentDocumentStockType是一个枚举,并且我正在使用其中的一个值。我仍然收到这个错误。你知道我可能会错在哪里吗?任何信息都将是一个很大的帮助。我试着联系了FedEx的技术支持,但他们并没有真正帮上大忙。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-06-29 02:08:14

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

我也有类似的问题,但不是原产地证书,而是商业发票。原来这些表单需要以PDF格式打印在8.5x11的完整页面上,所以将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 };

希望这能有所帮助

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4955361

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档