Colin,
Sorry about not responding to your earlier post. I was out on vacation
and it probably slipped between the cracks after I got back (there's
always a tonne of email to go through after vacation).
I think the attributes set is missing the "data" key with value
"contact_info". That should fix the "invalid command" reply you're
getting. Was it missing from the API document?
eg. (in Perl hash examples -- sorry, I'm not farmiliar with PHP)
{
action => "modify",
object => "domain",
attributes => {
data => "contact_info", # <--- this was missing
affect_domain => 0,
contact_set => {
also_apply_to => [
"tech",
] ,
admin => {
first_name => "",
.....
} ,
},
}
}
Also, I don't think OpenSRS can accept different updates to multiple
contact types in a single request. If you're changing multiple contact
types with the same info you would include the "also_apply_to" array,
listing the other contact types to apply the changes to. See the
example above.
I hope this helps. Let me know if you have any more problems.
And sorry again for the delay.
Dan
Colin Viebrock wrote:
> Apologies in advance for sending this directly to you Dan, but
> I haven't heard back from anyone on list or any of the OpenSRS
> developers on this issue yet, so I'm posting once more in hopes
> of help! (If you can't help, perhaps you can forward it to someone
> who can.)
>
> Under the new API, I seem unable to execute a MODIFY DOMAIN
> command to change contact info, for instance.
>
> Granted, I am using my own client class in PHP, but every other
> command works just fine, except this one.
>
> Below is the exact XML packet I am sending (the cookie was determined
> by successfully executing a SET COOKIE command). The OpenSRS server
> responds with an error code 400: "Invalid Command: modify".
>
> FWIW, this is all being done on the test server (horizon).
>
> Can someone please tell me what I'm doing wrong ... or confirm
> that this is some bug with the OpenSRS server?
>
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
> <!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
> <OPS_envelope>
> <header>
> <version>0.9</version>
> <msg_id>18945</msg_id>
> <msg_type>standard</msg_type>
> </header>
> <body>
> <data_block>
> <dt_assoc>
> <item key="action">MODIFY</item>
> <item key="object">DOMAIN</item>
> <item key="cookie">910927715:143006</item>
> <item key="attributes">
> <dt_assoc>
> <item key="affect_domains">0</item>
> <item key="contact_set">
> <dt_assoc>
> <item key="owner">
> <dt_assoc>
> <item key="first_name">Bob</item>
> <item key="last_name">Smith</item>
> <item key="org_name">TestISP.com</item>
> <item key="address1">1 Main Street</item>
> <item key="address2"></item>
> <item key="address3"></item>
> <item key="city">Toronto</item>
> <item key="state">ON</item>
> <item key="country">CA</item>
> <item key="postal_code">M1M 1M1</item>
> <item key="phone">416-123-4567</item>
> <item key="fax">416-789-4561</item>
> <item key="email">bob@test-isp.com</item>
> <item key="url"></item>
> </dt_assoc>
> </item>
> <item key="admin">
> <dt_assoc>
> <item key="first_name">Techinical</item>
> <item key="last_name">Contact</item>
> <item key="org_name">TestISP Inc.</item>
> <item key="address1">1 Main Street</item>
> <item key="address2">Suite 123</item>
> <item key="address3"></item>
> <item key="city">Toronto</item>
> <item key="state">ON</item>
> <item key="country">CA</item>
> <item key="postal_code">M1A 1A1</item>
> <item key="phone">416 123 4567</item>
> <item key="fax">416 987 6543</item>
> <item key="email">tech@www.test-isp.com</item>
> <item key="url">http://www.test-isp.com>
> </dt_assoc>
> </item>
> <item key="billing">
> <dt_assoc>
> <item key="first_name">Bob</item>
> <item key="last_name">Smith</item>
> <item key="org_name">TestISP.com</item>
> <item key="address1">1 Main Street</item>
> <item key="address2"></item>
> <item key="address3"></item>
> <item key="city">Toronto</item>
> <item key="state">ON</item>
> <item key="country">CA</item>
> <item key="postal_code">M1M 1M1</item>
> <item key="phone">416-123-4567</item>
> <item key="fax">416-789-4561</item>
> <item key="email">bob@test-isp.com</item>
> <item key="url"></item>
> </dt_assoc>
> </item>
> <item key="tech">
> <dt_assoc>
> <item key="first_name">Techinical</item>
> <item key="last_name">Contact</item>
> <item key="org_name">TestISP Inc.</item>
> <item key="address1">1 Main Street</item>
> <item key="address2">Suite 123</item>
> <item key="address3"></item>
> <item key="city">Toronto</item>
> <item key="state">ON</item>
> <item key="postal_code">M1A 1A1</item>
> <item key="country">CA</item>
> <item key="phone">416 123 4567</item>
> <item key="fax">416 987 6543</item>
> <item key="email">tech@www.test-isp.com</item>
> <item key="url">http://www.test-isp.com>
> </dt_assoc>
> </item>
> </dt_assoc>
> </item>
> </dt_assoc>
> </item>
> <item key="registrant_ip">207.35.219.99</item>
> <item key="protocol">XCP</item>
> </dt_assoc>
> </data_block>
> </body>
> </OPS_envelope>
>
> __________________________________________________________________
> Colin Viebrock easyDNS Technologies
> Co-Founder control your domain
> http://www.easyDNS.com
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:36:03 EDT