title: UPS Shipping API - ShipmentConfirmRequest Error
body: <p>Hello I am creating a wordpress website for a client using WooCommerce. The site is complete but the client wants the ability to create shipments from the shop_order page. I have most of this figured out, the problem is my XML request to the UPS API. I have checked and recheck, and I cant seem to find the error: </p>
  
  <pre><code>&lt;ShipmentConfirmResponse&gt;&lt;Response&gt;&lt;ResponseStatusCode&gt;0&lt;/ResponseStatusCode&gt;&lt;ResponseStatusDescription&gt;Failure&lt;/ResponseStatusDescription&gt;&lt;Error&gt;&lt;ErrorSeverity&gt;Hard&lt;/ErrorSeverity&gt;&lt;ErrorCode&gt;10002&lt;/ErrorCode&gt;&lt;ErrorDescription&gt;The XML document is well formed but the document is not valid&lt;/ErrorDescription&gt;&lt;/Error&gt;&lt;/Response&gt;&lt;/ShipmentConfirmResponse&gt;
  </code></pre>
  
  <p>Below is my xml mark up with sensitive info hidden.</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;AccessRequest xml:lang='en-US'&gt;
      &lt;AccessLicenseNumber&gt;******&lt;/AccessLicenseNumber&gt;
      &lt;UserId&gt;********&lt;/UserId&gt;
      &lt;Password&gt;********&lt;/Password&gt;
  &lt;/AccessRequest&gt;
      &lt;?xml version="1.0" ?&gt;
      &lt;ShipConfirmRequest xml:lang='en-US'&gt;
      &lt;Request&gt;
      &lt;TransactionReference&gt;
          &lt;CustomerContext&gt;Customer Context&lt;/CustomerContext&gt;
          &lt;XpciVersion&gt;1.0&lt;/XpciVersion&gt;
      &lt;/TransactionReference&gt;
       &lt;RequestAction&gt;ShipConfirm&lt;/RequestAction&gt;
       &lt;RequestOption&gt;validate&lt;/RequestOption&gt;
   &lt;/Request&gt;
   &lt;Shipment&gt;
       &lt;Shipper&gt;
          &lt;ShipperNumber&gt;*******&lt;/ShipperNumber&gt;
           &lt;Name&gt;Canyon Werks, LLC&lt;/Name&gt;
           &lt;Address&gt;
               &lt;AddressLine&gt;2941 Brookspark Drive&lt;/AddressLine&gt;
              &lt;AddressLine&gt;&lt;/AddressLine&gt;
              &lt;City&gt;North Las Vegas&lt;/City&gt;
              &lt;StateProvinceCode&gt;NV&lt;/StateProvinceCode&gt;
              &lt;PostalCode&gt;89030&lt;/PostalCode&gt;
              &lt;CountryCode&gt;US&lt;/CountryCode&gt;
          &lt;/Address&gt;
          &lt;Phone&gt;
              &lt;Number&gt;7022552222&lt;/Number&gt;
          &lt;/Phone&gt;
      &lt;/Shipper&gt;
      &lt;ShipTo&gt;
          &lt;Name&gt;Justin Walker&lt;/Name&gt;
          &lt;Address&gt;
              &lt;AddressLine&gt;2675 Windmill Pkwy&lt;/AddressLine&gt;
              &lt;AddressLine&gt;3024&lt;/AddressLine&gt;
              &lt;City&gt;Henderson&lt;/City&gt;
              &lt;StateProvinceCode&gt;NV&lt;/StateProvinceCode&gt;
              &lt;PostalCode&gt;89074&lt;/PostalCode&gt;
              &lt;CountryCode&gt;US&lt;/CountryCode&gt;
          &lt;/Address&gt;
          &lt;Phone&gt;
              &lt;Number&gt;7024609485&lt;/Number&gt;
          &lt;/Phone&gt;
      &lt;/ShipTo&gt;
      &lt;ShipFrom&gt;
          &lt;Name&gt;Canyon Werks, LLC&lt;/Name&gt;
          &lt;Address&gt;
              &lt;AddressLine&gt;2941 Brookspark Drive&lt;/AddressLine&gt;
              &lt;AddressLine&gt;&lt;/AddressLine&gt;
              &lt;City&gt;North Las Vegas&lt;/City&gt;
              &lt;StateProvinceCode&gt;NV&lt;/StateProvinceCode&gt;
              &lt;PostalCode&gt;89030&lt;/PostalCode&gt;
              &lt;CountryCode&gt;US&lt;/CountryCode&gt;
          &lt;/Address&gt;
          &lt;Phone&gt;
              &lt;Number&gt;7022552222&lt;/Number&gt;
          &lt;/Phone&gt;
      &lt;/ShipFrom&gt;
      &lt;PaymentInformation&gt;
          &lt;ShipmentCharge&gt;
              &lt;Type&gt;01&lt;/Type&gt;
              &lt;BillShipper&gt;
                  &lt;AccountNumber&gt;*******&lt;/AccountNumber&gt;
              &lt;/BillShipper&gt;
          &lt;/ShipmentCharge&gt;
      &lt;/PaymentInformation&gt;
      &lt;Service&gt;
          &lt;Code&gt;03&lt;/Code&gt;
      &lt;/Service&gt;
      &lt;Package&gt;
          &lt;Packaging&gt;
              &lt;Code&gt;02&lt;/Code&gt;
              &lt;Description&gt;Customer Supplied&lt;/Description&gt;
          &lt;/Packaging&gt;
          &lt;Dimensions&gt;
              &lt;UnitOfMeasurement&gt;
                  &lt;Code&gt;IN&lt;/Code&gt;
              &lt;/UnitOfMeasurement&gt;
              &lt;Length&gt;16&lt;/Length&gt;
              &lt;Width&gt;12&lt;/Width&gt;
              &lt;Height&gt;6&lt;/Height&gt;
          &lt;/Dimensions&gt;
          &lt;PackageWeight&gt;
              &lt;UnitOfMeasurement&gt;
                  &lt;Code&gt;LBS&lt;/Code&gt;
              &lt;/UnitOfMeasurement&gt;
              &lt;Weight&gt;6.07&lt;/Weight&gt;
          &lt;/PackageWeight&gt;
      &lt;/Package&gt;
  &lt;/Shipment&gt;
  &lt;LabelSpecification&gt;
      &lt;LabelImageFormat&gt;
          &lt;Code&gt;GIF&lt;/Code&gt;
      &lt;/LabelImageFormat&gt;
  &lt;/LabelSpecification&gt;
  &lt;/ShipConfirmRequest&gt;
  </code></pre>
  
  <p>I am almost there on this, but I am stuck at this road block. If anyone can shed some light into this it would be much appreciated.</p>