I keep getting the error: ErrorE00045The root node does not reference a valid XML namespace. I am developing in Cold Fusion . I have read that this is most likely do the the "xmlns", that it may not even be needed, but I tried it without it and still got the error. Perhaps it is my XML?
Here is my XML, is it correct?
<?xml version="1.0" encoding="utf-8"?>
<ARBCreateSubscriptionRequest xmlns="https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>#x_login#</name>
<transactionKey>#x_tran_key#</transactionKey>
</merchantAuthentication>
<subscription>
<name>CarBIDium.com Auction Listing</name>
<paymentSchedule>
<interval>
<length>1</length>
<unit>months</unit>
</interval>
<startDate>#dateformat(startdate, "yyyy-mm-dd")#</startDate>
<totalOccurrences>9999</totalOccurrences>
</paymentSchedule>
<amount>#x_amount#</amount>
<payment>
<creditCard>
<cardNumber>#x_card_num#</cardNumber>
<expirationDate>#x_exp_date#</expirationDate>
<cardcode>#trim(x_card_code)#</cardcode>
</creditCard>
</payment>
<billTo>
<firstName>#x_first_name#</firstName>
<lastName>#x_last_name#</lastName>
<address>#x_address#</address>
<city>#x_city#</city>
<state>#x_state#</state>
<zip>#x_zip#</zip>
</billTo>
</subscription>
Thanks!
Brett/
Solved! Go to Solution.
12-24-2012 10:49 AM
I just try it. And don't know why, but it only work if it is
AnetApi/xml/v1/schema/AnetApiSchema.xsd
and E00045 when
12-26-2012 08:05 AM
Did you miss the
</ARBCreateSubscriptionRequest>
at the end?
12-24-2012 02:53 PM
Good eyes Raynor, but just a copy and paste mistake on my part.
12-24-2012 07:32 PM
In the example they have
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
12-25-2012 11:26 AM
Good eyes again, but with just using that portion of the URL it does not connect at all to their server. The full URL has to be implemented. It is bad documentation in their example on their part as the XML Schema in the rest of the documentation has the full URL.
12-26-2012 07:35 AM
I just try it. And don't know why, but it only work if it is
AnetApi/xml/v1/schema/AnetApiSchema.xsd
and E00045 when
12-26-2012 08:05 AM
Thank you Raynor! That did it.
12-27-2012 09:12 AM