0

我需要使用 FedEx Web Services 生成运单。我发现下面这段代码是生成运单的 XML SOAP 请求。

xmlReq = "<?xml version=""1.0"" encoding=""UTF-8""?>" &_
"<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:q0=""http://fedex.com/ws/ship/v7"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">" &_
"<soapenv:Body>" &_
"<q0:ProcessShipmentRequest>" &_
"<q0:WebAuthenticationDetail>" &_
"<q0:CspCredential>" &_
"<q0:Key>CSP Key</q0:Key>" &_
"<q0:Password>CSP Password</q0:Password> "&_
"</q0:CspCredential>" &_
"<q0:UserCredential>" &_
"<q0:Key>User Key</q0:Key>" &_
"<q0:Password>User Password</q0:Password>" &_
"</q0:UserCredential>" &_
"</q0:WebAuthenticationDetail>" &_
"<q0:ClientDetail>" &_
"<q0:AccountNumber>123456789</q0:AccountNumber>" &_
"<q0:MeterNumber>123456789</q0:MeterNumber>" &_
"<q0:ClientProductId>ABCD</q0:ClientProductId>" &_
"<q0:ClientProductVersion>1234</q0:ClientProductVersion>" &_
"</q0:ClientDetail>" &_
"<q0:TransactionDetail>" &_
"<q0:CustomerTransactionId>Express US Basic Shipment</q0:CustomerTransactionId>" &_
"</q0:TransactionDetail>" &_
"<q0:Version>" &_
"<q0:ServiceId>ship</q0:ServiceId>" &_
"<q0:Major>8</q0:Major>" &_
"<q0:Intermediate>0</q0:Intermediate>" &_
"<q0:Minor>0</q0:Minor> </q0:Version>" &_
"<q0:RequestedShipment>" &_
"<q0:ShipTimestamp>2009-01-15T12:00:00-05:00</q0:ShipTimestamp>" &_
"<q0:DropoffType>REGULAR_PICKUP</q0:DropoffType>" &_
"<q0:ServiceType>PRIORITY_OVERNIGHT</q0:ServiceType>" &_
"<q0:PackagingType>YOUR_PACKAGING</q0:PackagingType>" &_
"<q0:Shipper>" &_
"<q0:Contact>" &_
"<q0:CompanyName>Shipper Company</q0:CompanyName>" &_
"<q0:PhoneNumber>1234567890</q0:PhoneNumber>" &_
"</q0:Contact>" &_
"<q0:Address>" &_
"<q0:StreetLines>Shipper Address Line 1</q0:StreetLines>" &_
"<q0:StreetLines>Shipper Address Line 2</q0:StreetLines>" &_
"<q0:City>Collierville</q0:City>" &_
"<q0:StateOrProvinceCode>TN</q0:StateOrProvinceCode>" &_
"<q0:PostalCode>38017</q0:PostalCode>" &_
"<q0:CountryCode>US</q0:CountryCode>" &_
"</q0:Address>" &_
"</q0:Shipper>" &_
"<q0:Recipient>" &_
"<q0:Contact>" &_
"<q0:PersonName>Recipient Contact</q0:PersonName>" &_
"<q0:PhoneNumber>1234567890</q0:PhoneNumber>" &_
"</q0:Contact>" &_
"<q0:Address>" &_
"<q0:StreetLines>Recipient Address Line 1</q0:StreetLines>" &_
"<q0:StreetLines>Recipient Address Line 2</q0:StreetLines>" &_
"<q0:City>Irving</q0:City>" &_
"<q0:StateOrProvinceCode>TX</q0:StateOrProvinceCode>" &_
"<q0:PostalCode>75063</q0:PostalCode>" &_
"<q0:CountryCode>US</q0:CountryCode>" &_
"</q0:Address>" &_
"</q0:Recipient>" &_
"<q0:ShippingChargesPayment>" &_
"<q0:PaymentType>SENDER</q0:PaymentType>" &_
"<q0:Payor>" &_
"<q0:AccountNumber>123456789</q0:AccountNumber>" &_
"<q0:CountryCode>USD</q0:CountryCode>" &_
"</q0:Payor>" &_
"</q0:ShippingChargesPayment>" &_
"<q0:LabelSpecification>" &_
"<q0:LabelFormatType>COMMON2D</q0:LabelFormatType>" &_
"<q0:ImageType>PDF</q0:ImageType>" &_
"<q0:LabelStockType>PAPER_7X4.75</q0:LabelStockType>" &_
"</q0:LabelSpecification>" &_
"<q0:RateRequestTypes>ACCOUNT</q0:RateRequestTypes>" &_
"<q0:PackageCount>1</q0:PackageCount>" &_
"<q0:RequestedPackages>" &_
"<q0:SequenceNumber>1</q0:SequenceNumber>" &_
"<q0:Weight>" &_
"<q0:Units>LB</q0:Units>" &_
"<q0:Value>15</q0:Value>" &_
"</q0:Weight>" &_
"<q0:Dimensions>" &_
"<q0:Length>5</q0:Length>" &_
"<q0:Width>5</q0:Width>" &_
"<q0:Height>5</q0:Height>" &_
"<q0:Units>IN</q0:Units>" &_
"</q0:Dimensions>" &_
"</q0:RequestedPackages>" &_
"</q0:RequestedShipment>" &_
"</q0:ProcessShipmentRequest>" &_
"</soapenv:Body></soapenv:Envelope>" &_

我在经典 ASP 中工作,我需要使用 FedEX Web 服务打印运单。我不确定这段代码。我不知道如何生成获取响应所需的 CSP 密钥和 CSP 密码。

请指导我。提前致谢。

4

1 回答 1

1

该信息在 www.fedex.com/us/developer/ 生成,您必须使用有效的用户名密码和帐户登录系统。转到http://www.fedex.com/us/developer/migration.html并立即按迁移。登录系统...然后转到“移至生产”。

您必须登录并按获取生产密钥 -> https://www.fedex.com/wpor/web/jsp/commonTC.jsp

您将收到一封包含所有信息的电子邮件。brgds

于 2013-08-31T19:49:46.893 回答