-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Contact set should contain reference to the index of the contact in the
contacts list and not the contacts themselves like in the example you've
provided, for example:
contacts => [
{
contact_id => 1234, # refers to existing contact
},
{
email => [EMAIL PROTECTED], # creates new contact
...
}
]
Later in the request inside create_items contact_set refers to one of
those contacts:
create_items => [
{
ordertem_type = 'new',
product_data => {
},
contact_set => {
admin => 0, # is contact from $contacts[0]
# meaning contact_id 1234
billing => 1, # use contact specified by
# $contacts[1] - newly created
tech => 1, #same as above
}
}
]
Hope this quick explanation helps.
Leonid Igolnik
OpenSRS developer.
On Sat, 6 Sep 2003, Amit Rana wrote:
> Hi,
>
> I sent following xml (TPP to order for certs) and it gives me
> this error:
> Unable to convertToString
> OPSDocument->attributes->create_items->0->contact_set(compas
> s.entities.struct.impl.TypedList) to 'OPSHash' reason:
> java.lang.ClassCastException: compass.entities.struct.impl.TypedList
>
> Can anyone throw some light on what it would be?
>
> Any help will be highly appreciated.
>
> Regards,
> Amit.
>
> <OPS_envelope>
> <header><version>0.9</version><msg_id>3.01462685995842</msg_id><msg_type
> >standard</msg_type></header>
> <body>
> <data_block>
> <dt_assoc>
> <item key="attributes">
> <dt_assoc>
> <item
> key="handling">process</item>
> <item
> key="password">aaaaaaaaaa</item>
> <item key="create_items">
> <dt_array>
> <item key="0">
>
> <dt_assoc>
>
> <item key="product_data">
>
> <dt_assoc>
>
> <item key="approver_email">[EMAIL PROTECTED]</item>
>
> <item key="csr">wwwwwwwwwww</item>
>
> <item key="Period">1</item>
>
> </dt_assoc>
>
> </item>
>
> <item key="service">cert</item>
>
> <item key="object_type">quickssl</item>
>
> <item key="orderitem_type">new</item>
>
> <item key="contact_set">
>
> <dt_array>
>
> <item key="0">
>
> <dt_assoc>
>
> <item key="admin">
>
> <dt_assoc>
>
> <item key="state">tokyo</item>
>
> <item key="id">3</item>
>
> <item key="address1">shinjuku</item>
>
> <item key="country">JP</item>
>
> <item key="city">tokyo</item>
>
> <item key="first_name">Amit</item>
>
> <item key="phone">+81.333710960</item>
>
> <item key="email">[EMAIL PROTECTED]</item>
>
> <item key="postal_code">1690073</item>
>
> <item key="last_name">Rana</item>
>
> </dt_assoc>
>
> </item>
>
> </dt_assoc>
>
> </item>
>
> <item key="1">
>
> <dt_assoc>
>
> <item key="billing">
>
> <dt_assoc>
>
> <item key="state">tokyo</item><item key="id">3</item><item
> key="address1">shinjuku</item><item key="country">JP</item><item
> key="city">tokyo</item><item key="first_name">Amit</item><item
> key="phone">+81.333710960</item><item
> key="email">[EMAIL PROTECTED]</item><item
> key="postal_code">1690073</item><item key="last_name">Rana</item>
>
> </dt_assoc>
>
> </item>
>
> </dt_assoc>
>
> </item>
>
> <item key="2">
>
> <dt_assoc>
>
> <item key="technical">
>
> <dt_assoc>
>
> <item key="state">tokyo</item><item key="id">3</item><item
> key="address1">shinjuku</item><item key="country">JP</item><item
> key="city">tokyo</item><item key="first_name">Amit</item><item
> key="phone">+81.333710960</item><item
> key="email">[EMAIL PROTECTED]</item><item
> key="postal_code">1690073</item><item key="last_name">Rana</item>
>
> </dt_assoc>
>
> </item>
>
> </dt_assoc>
>
> </item>
>
> </dt_array>
>
> </item>
>
> </dt_assoc>
> </item>
> </dt_array>
> </item>
> <item key="contacts">
> <dt_array>
> <item key="0">
>
> <dt_assoc>
>
> <item key="admin">
>
> <dt_assoc>
>
> <item key="state">tokyo</item><item key="id">3</item><item
> key="address1">shinjuku</item><item key="country">JP</item><item
> key="city">tokyo</item><item key="first_name">Amit</item><item
> key="phone">+81.333710960</item><item
> key="email">[EMAIL PROTECTED]</item><item
> key="postal_code">1690073</item><item
> key="last_name">Rana</item></dt_assoc></item></dt_assoc></item><item
> key="1"><dt_assoc><item key="billing"><dt_assoc><item
> key="state">tokyo</item><item key="id">3</item><item
> key="address1">shinjuku</item><item key="country">JP</item><item
> key="city">tokyo</item><item key="first_name">Amit</item><item
> key="phone">+81.333710960</item><item
> key="email">[EMAIL PROTECTED]</item><item
> key="postal_code">1690073</item><item
> key="last_name">Rana</item></dt_assoc></item></dt_assoc></item><item
> key="2"><dt_assoc><item key="technical"><dt_assoc><item
> key="state">tokyo</item><item key="id">3</item><item
> key="address1">shinjuku</item><item key="country">JP</item><item
> key="city">tokyo</item><item key="first_name">Amit</item><item
> key="phone">+81.23433223</item><item
> key="email">[EMAIL PROTECTED]</item><item
> key="postal_code">1690073</item><item
> key="last_name">Rana</item></dt_assoc></item></dt_assoc></item></dt_arra
> y></item><item key="username">jrd</item></dt_assoc></item><item
> key="object">order</item><item key="action">create</item><item
> key="protocol">TPP</item></dt_assoc></data_block></body></OPS_envelope>
>
- --
Leonid Igolnik.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/WUE/RrKFtN3cJpMRAlQLAKCSq7DSnNKbN7pbG36SbyX1WWrHYgCgw9yQ
IMV2hBuSxEHFEtAicDoMUNY=
=8afO
-----END PGP SIGNATURE-----