Hi,
I'm using the CIM API, and having some trouble with the optional fields under the profile node of the createCustomerProfileRequest.
I'm sending the following (name and transactionKey obfuscated here):
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>NNNNNNNN</name>
<transactionKey>MMMMMMMMMMMMMMM</transactionKey>
</merchantAuthentication>
<profile>
<description>Just some guy</description>
<merchantCustomerId>999</merchantCustomerId>
<email>someone@somewhere</email>
</profile>
</createCustomerProfileRequest>
Which fails with
E00003
The element 'profile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'merchantCustomerId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'email, paymentProfiles, shipToList' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
Oddly though, I only get this error when I include the 'description' field. If I just include 'merchantCustomerId', or 'merchantCustomerId' and 'email', I get success. It also works just fine if I include 'email' and 'description', but not 'merchantCustomerId'.
It only fails when I include all three elements.
According to the documentation (CIM XML Guide, last revision 5/24/2011, page 21-22), one or more of 'merchantCustomerId', 'email', and 'description' is required under 'profile'. I don't understand why it should fail if I include all three. The error message seems to indicate a bug in the XSD file (or elsewhere), since 'merchantCustomerId' is obviously allowed under 'profile'.
I'm using Python 2.6.6 to communicate with the API. More specifically, I'm using a custom version of django-authorizenet (https://github.com/chrislawlor/django-authorizenet), in which I'm attempting to add support for the 'email' and 'description' fields.