cancel
Showing results for 
Search instead for 
Did you mean: 

Root element is missing

I started testing my integration for the Akamai stuff and can't seem to get anything to work. We have been integrated for years with no issue so I didn't expect there to be any real problems getting this to work...

 

Just to be sure I hadn't screwed up the XML I went to the API reference, clicked "Try It", copied the XML to my test app and sent it. Since I copied the XML directly from the the API reference I assume that the XML is valid. This leads me to believe that the post data is getting mangled somewhere between my computer and the server that is processing the request. Is there anyway kind of server side log to help me figure out what is going on?

Here is the XML I sent...minus my auth info.

<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
   <merchantAuthentication>
     <name>******</name>
     <transactionKey>*********</transactionKey>
    </merchantAuthentication>
   <profile>
     <merchantCustomerId>Merchant_Customer_ID</merchantCustomerId>
     <description>Profile description here</description>
     <email>customer-profile-email@here.com</email>
     <paymentProfiles>
       <customerType>individual</customerType>
          <payment>
             <creditCard>
                <cardNumber>4111111111111111</cardNumber>
                <expirationDate>2020-12</expirationDate>
              </creditCard>
           </payment>
      </paymentProfiles>
    </profile>
<validationMode>testMode</validationMode>
  </createCustomerProfileRequest>

 

Thanks,

 

Sean

rswsean
Member
4 REPLIES 4

This happened on April 20th for about 24 hours and no one at Authorize.net informed anyone of the problem.  They just fixed it and it stopped causing that error.  It's happening now, as well (it started on Thursday May 12th in the early afternoon Pacific time).  I have contacted support via chat and email, and no one has gotten back to me either.

larsinsd
Member

Just as a sanity check we pointed our tester at an external echo server...

 

Here is the response I am getting back.

 

URL: /?action=echo
<-------------- HEADERS ------------>
Host: rest.rswtest.net
User-Agent: Mozilla/4.0 (compatible; Synapse)
<----------------------------------->
<--------------- QUERY ------------->
action: echo
<----------------------------------->
<--------------- BODY ------------->
<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>*******</name>
<transactionKey>*******</transactionKey>
</merchantAuthentication>
<profile>
<merchantCustomerId>Merchant_Customer_ID</merchantCustomerId>
<description>Profile description here</description>
<email>customer-profile-email@here.com</email>
<paymentProfiles>
<customerType>individual</customerType>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2020-12</expirationDate>
</creditCard>
</payment>
</paymentProfiles>
</profile>
<validationMode>testMode</validationMode>
</createCustomerProfileRequest>

<---------------------------------->
<--------------- Decode BODY ------------->
<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>*******</name>
<transactionKey>*******</transactionKey>
</merchantAuthentication>
<profile>
<merchantCustomerId>Merchant_Customer_ID</merchantCustomerId>
<description>Profile description here</description>
<email>customer-profile-email@here.com</email>
<paymentProfiles>
<customerType>individual</customerType>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2020-12</expirationDate>
</creditCard>
</payment>
</paymentProfiles>
</profile>
<validationMode>testMode</validationMode>
</createCustomerProfileRequest>

rswsean
Member

After staring at this all day I finally figured it out....

 

When we wrote our implementation years ago the requests were being sent as a GET. As I went to copy the code to a new tester it finally jumped out at me that it wasn't doing a POST.

 

It is too bad that there isn't a server side log somewhere that might have helped to surface this a little quicker.

@rswsean Good to know you found a solution.

We're working on improving our logging and analysis, so hopefully we'll be in a better position in the future to shed light into odd things like this. Thanks.

--
"Move fast and break things," out. "Move carefully and fix what you break," in.