title: CustomerReferences entry not included in FedEx web service request geberated via PHP
body: <p>I am working on this FedEx web service integration project for some time. I am using PHP to make calls to the FedEx server. Everything seems to be working properly. </p>
  
  <p>But I am having problems with CustomerReferences fields appearing in the original fedex request that is sent to the server. I am using the ShipService_v7.wsdl. I asked FedEx tech support saying that would not be able to help with PHP code. But my problem is even the sample code provided by fedex is not able to generate the customerreferences fields in the request sent to the server. </p>
  
  <p>Would you guys happen to know whats the deals with this?</p>
  
  <p>EDIT:
  Code that is generating the XML file being sent to the fedex web server,</p>
  
  <pre><code>$client = new SoapClient($path_to_wsdl, array('trace' =&gt; 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information
  
  $request['WebAuthenticationDetail'] = array('UserCredential' =&gt;
                                        array('Key' =&gt; $DEVELOPER_KEY, 'Password' =&gt; $DEVELOPER_PASSWORD)); // Replace 'XXX' and 'YYY' with FedEx provided credentials 
  $request['ClientDetail'] = array('AccountNumber' =&gt; $FEDEX_ACCOUNT_NUMBER, 'MeterNumber' =&gt; $FEDEX_METER_NUMBER);// Replace 'XXX' with your account and meter number
  $request['TransactionDetail'] = array('CustomerTransactionId' =&gt; '*** Ground International Shipping Request v7 using PHP ***');
  $request['Version'] = array('ServiceId' =&gt; 'ship', 'Major' =&gt; '7', 'Intermediate' =&gt; '0', 'Minor' =&gt; '0');
  $request['RequestedShipment'] = array('ShipTimestamp' =&gt; date('c'),
                                      'DropoffType' =&gt; 'REGULAR_PICKUP', // valid values REGULAR_PICKUP, REQUEST_COURIER, DROP_BOX, BUSINESS_SERVICE_CENTER and STATION
                                      'ServiceType' =&gt; 'FEDEX_GROUND', // valid values STANDARD_OVERNIGHT, PRIORITY_OVERNIGHT, FEDEX_GROUND, ...
                                      'PackagingType' =&gt; 'YOUR_PACKAGING', // valid values FEDEX_BOX, FEDEX_PAK, FEDEX_TUBE, YOUR_PACKAGING, ...
                                      'Shipper' =&gt; array('Contact' =&gt; array('PersonName' =&gt; 'Sender Name',
                                                                            'CompanyName' =&gt; 'Company Name',
                                                                            'PhoneNumber' =&gt; '0805522713'),
                                                         'Address' =&gt; array('StreetLines' =&gt; array('Address Line 1'),
                                                                            'City' =&gt; 'Memphis',
                                                                            'StateOrProvinceCode' =&gt; 'TN',
                                                                            'PostalCode' =&gt; '38110',
                                                                            'CountryCode' =&gt; 'US')),
                                      'Recipient' =&gt; array('Contact' =&gt; array('PersonName' =&gt; 'Recipient Name',
                                                                              'CompanyName' =&gt; 'Company Name',
                                                                              'PhoneNumber' =&gt; '9012637906'),
                                                           'Address' =&gt; array('StreetLines' =&gt; array('Address Line 1'),
                                                                              'City' =&gt; 'Richmond',
                                                                              'StateOrProvinceCode' =&gt; 'BC',
                                                                              'PostalCode' =&gt; 'V7C4V4',
                                                                              'CountryCode' =&gt; 'CA',
                                                                              'Residential' =&gt; false)),
                                      'ShippingChargesPayment' =&gt; array('PaymentType' =&gt; 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
                                                                        'Payor' =&gt; array('AccountNumber' =&gt; $FEDEX_ACCOUNT_NUMBER, // Replace 'XXX' with payors account number
                                                                                         'CountryCode' =&gt; 'US')),
                                      'InternationalDetail' =&gt; array('DutiesPayment' =&gt; array('PaymentType' =&gt; 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
                                                                                              'Payor' =&gt; array('AccountNumber' =&gt; $FEDEX_ACCOUNT_NUMBER, // Replace 'XXX' with payor's account number
                                                                                              'CountryCode' =&gt; 'CA')),
                                                                     'DocumentContent' =&gt; 'DOCUMENTS_ONLY',                                                                                            
                                                                     'CustomsValue' =&gt; array('Amount' =&gt; 100.0, 'Currency' =&gt; 'USD'),
                                                                     'Commodities' =&gt; array('0' =&gt; array('NumberOfPieces' =&gt; 1,
                                                                                                         'Description' =&gt; 'Books',
                                                                                                         'CountryOfManufacture' =&gt; 'US',
                                                                                                         'Weight' =&gt; array('Value' =&gt; 1.0, 'Units' =&gt; 'LB'),
                                                                                                         'Quantity' =&gt; 1,
                                                                                                         'QuantityUnits' =&gt; 'EA',
                                                                                                         'UnitPrice' =&gt; array('Amount' =&gt; 1.000000, 'Currency' =&gt; 'USD'),
                                                                                                         'CustomsValue' =&gt; array('Amount' =&gt; 100.000000, 'Currency' =&gt; 'USD'))),
                                                                     'ExportDetail' =&gt; array('B13AFilingOption' =&gt; 'FILED_ELECTRONICALLY')),                                                                                                       
                                      'LabelSpecification' =&gt; array('LabelFormatType' =&gt; 'COMMON2D', // valid values COMMON2D, LABEL_DATA_ONLY
                                                                    'ImageType' =&gt; 'PNG',  // valid values DPL, EPL2, PDF, ZPLII and PNG
                                                                    'LabelStockType' =&gt; 'PAPER_7X4.75'), 
                                      'RateRequestTypes' =&gt; array('ACCOUNT'), // valid values ACCOUNT and LIST
                                      'PackageCount' =&gt; 1,
                                      'PackageDetail' =&gt; 'INDIVIDUAL_PACKAGES',                                        
                                      'RequestedPackageLineItems' =&gt; array('SequenceNumber' =&gt; 1,
                                                                   'Weight' =&gt; array('Value' =&gt; 20.0, 'Units' =&gt; 'LB')), // valid values LB and KG
                                                                   'CustomerReferences' =&gt; array('0' =&gt; array('CustomerReferenceType' =&gt; 'CUSTOMER_REFERENCE', 'Value' =&gt; 'TC007_07_PT1_ST01_PK01_SNDUS_RCPCA_POS')));
  </code></pre>
  
  <p><strong>Expected Output :</strong></p>
  
  <p>... XML Stuff ...</p>
  
  <pre><code>            &lt;ns1:RequestedPackageLineItems&gt;
                  &lt;ns1:SequenceNumber&gt;1&lt;/ns1:SequenceNumber&gt;
                  &lt;ns1:Weight&gt;
                      &lt;ns1:Units&gt;LB&lt;/ns1:Units&gt;
                      &lt;ns1:Value&gt;20&lt;/ns1:Value&gt;
                  &lt;/ns1:Weight&gt;
                  &lt;ns1:CustomerReferences&gt;
                      &lt;ns1:CustomerReferenceType&gt;CUSTOMER_REFERENCE&lt;/ns1:CustomerReferenceType&gt;
                      &lt;ns1:Value&gt;I am a customer reference&lt;/ns1:Value&gt;
                  &lt;/ns1:CustomerReferences&gt;
              &lt;/ns1:RequestedPackageLineItems&gt;
  </code></pre>
  
  <p>... XML Stuff ...</p>
  
  <p><strong>Current Output</strong> </p>
  
  <pre><code>            &lt;ns1:RequestedPackageLineItems&gt;
                  &lt;ns1:SequenceNumber&gt;1&lt;/ns1:SequenceNumber&gt;
                  &lt;ns1:Weight&gt;
                      &lt;ns1:Units&gt;LB&lt;/ns1:Units&gt;
                      &lt;ns1:Value&gt;20&lt;/ns1:Value&gt;
                  &lt;/ns1:Weight&gt;       
              &lt;/ns1:RequestedPackageLineItems&gt;
  </code></pre>