2012-07-05 6 views
2

UPS.com에서 ShippingGroundFreightWebService PHP 예제를 다운로드합니다. 다음 오류 메시지가 표시됩니다.UPS 배송 API 통합 오류 (PHP)

SoapFault Object 
(
    [message:protected] => An exception has been raised as a result of client data. 
    [string:private] => 
[code:protected] => 0 
[file:protected] => /home5/vizparts/public_html/PHP/SoapGroundFreightShipClient.php 
[line:protected] => 193 
[trace:private] => Array 
    (
     [0] => Array 
      (
       [file] => /home5/vizparts/public_html/PHP/SoapGroundFreightShipClient.php 
       [line] => 193 
       [function] => __soapCall 
       [class] => SoapClient 
       [type] => -> 
       [args] => Array 
        (
         [0] => ProcessShipment 
         [1] => Array 
          (
           [0] => Array 
            (
             [Request] => Array 
              (
               [RequestOption] => Array 
                (
                 [0] => 1 
                 [1] => Shipping 
                ) 

              ) 

             [Shipment] => Array 
              (
               [ShipFrom] => Array 
                (
                 [Name] => Pat Stewart 
                 [TaxIdentification] => 1234567890 
                 [Address] => Array 
                  (
                   [AddressLine] => 2311 York Road 
                   [City] => Timonium 
                   [StateProvinceCode] => MD 
                   [PostalCode] => 21093 
                   [CountryCode] => US 
                  ) 

                 [AttentionName] => String 
                 [Phone] => Array 
                  (
                   [Number] => 6785851000 
                   [Extension] => 123 
                  ) 

                ) 

               [ShipperNumber] => 222006 
               [ShipTo] => Array 
                (
                 [Name] => Superman 
                 [Address] => Array 
                  (
                   [AddressLine] => 2010 Warsaw Road 
                   [StateProvinceCode] => GA 
                   [PostalCode] => 30076 
                   [CountryCode] => US 
                   [City] => Roswell 
                  ) 

                 [AttentionName] => String 
                 [Phone] => Array 
                  (
                   [Number] => 6785851000 
                   [Extention] => 111 
                  ) 

                ) 

               [PaymentInformation] => Array 
                (
                 [Payer] => Array 
                  (
                   [Name] => Superman 
                   [Address] => Array 
                    (
                     [AddressLine] => 2010 Warsaw Road 
                     [City] => Roswell 
                     [StateProvinceCode] => GA 
                     [PostalCode] => 30075 
                     [CountryCode] => US 
                    ) 

                   [ShipperNumber] => 00613270 
                   [AttentionName] => String 
                   [Phone] => Array 
                    (
                     [Number] => 6785851000 
                    ) 

                  ) 

                 [ShipmentBillingOption] => Array 
                  (
                   [Code] => 10 
                   [Description] => String 
                  ) 

                ) 

               [Service] => Array 
                (
                 [Code] => 308 
                 [Description] => String 
                ) 

               [HandlingUnitOne] => Array 
                (
                 [Quantity] => 16 
                 [Type] => Array 
                  (
                   [Code] => PLT 
                   [Description] => String 
                  ) 

                ) 

               [Commodity] => Array 
                (
                 [CommodityID] => 22 
                 [Description] => BUGS 
                 [Weight] => Array 
                  (
                   [UnitOfMeasurement] => Array 
                    (
                     [Code] => LBS 
                     [Description] => String 
                    ) 

                   [Value] => 511.25 
                  ) 

                 [Dimensions] => Array 
                  (
                   [UnitOfMeasurement] => Array 
                    (
                     [Code] => IN 
                     [Description] => String 
                    ) 

                   [Length] => 1.25 
                   [Width] => 1.2 
                   [Height] => 5 
                  ) 

                 [NumberOfPieces] => 1 
                 [PackagingType] => Array 
                  (
                   [Code] => PLT 
                   [Description] => String 
                  ) 

                 [CommodityValue] => Array 
                  (
                   [CurrencyCode] => USD 
                   [MonetaryValue] => 265.2 
                  ) 

                 [FreightClass] => 60 
                 [NMFCCommodityCode] => 566 
                ) 

               [Reference] => Array 
                (
                 [Number] => Array 
                  (
                   [Code] => PM 
                   [Value] => 1651651616 
                  ) 

                 [BarCodeIndicator] => Array 
                  (
                   [NumberOfCartons] => 5 
                   [Weight] => Array 
                    (
                     [UnitOfMeasurement] => Array 
                      (
                       [Code] => LBS 
                       [Description] => String 
                      ) 

                     [Value] => 2 
                    ) 

                  ) 

                ) 

              ) 

            ) 

          ) 

        ) 

      ) 

    ) 

[faultstring] => An exception has been raised as a result of client data. 
[faultcode] => Client 
[faultcodens] => http://schemas.xmlsoap.org/soap/envelope/ 
[detail] => stdClass Object 
    (
     [Errors] => stdClass Object 
      (
       [ErrorDetail] => stdClass Object 
        (
         [Severity] => Hard 
         [PrimaryErrorCode] => stdClass Object 
          (
           [Code] => 9121000 
           [Description] => Invalid Ship Request Document 
          ) 

        ) 

      ) 

    ) 

) 

UPS API를 내 웹 사이트에 통합하려고합니다. 배송 라벨을 인쇄하고 싶습니다. 이 문제를 해결하는 방법?

+0

요청하신 XML이 적절하지 않은 것으로 보입니다. webcollage.wordpress.com에서 모든 UPS 레이블 관련 도움말을 볼 수 있습니다. –

답변

0

요청 xsd 파일을 설정하고 다운로드 한 패키지의 다른 폴더에서 찾아야합니다. 그런 다음 요청 파일을 설정하십시오.