Hello Carlos,

Can you try sending your request with this additional header as well?

GData-Version: 3.0


Thanks!
Alain

On Fri, Jul 22, 2011 at 2:10 AM, Juanma Barrio <[email protected]>wrote:

> Hi Alain, thanks for your interest.
> As you ask me, i share with you the DATA and URL.
> It´s a batch request that contains 2 contacts insertions that shares the
> same email.
> In the response, the first entry refers to the contact that could not be
> inserted because of the email, and the second one is the one that could be
> inserted.
> I added some commets just after ##### characters.
>
>
> >> CONNECT www.google.com:443 HTTP/1.1
>    Host: www.google.com
>    Proxy-Connection: Keep-Alive
>    User-Agent: Apache-HttpClient/4.1 (java 1.5)
>    dynaTrace: FW;1435137529;14;57;1435137529;14;2
>
> << HTTP/1.1 200 Connection established
>
> >> POST /m8/feeds/contacts/
> [email protected]/full/batch?xoauth_requestor_id=mockname.mock%40mock.orgHTTP/1.1
>    Authorization: OAuth oauth_consumer_key="mock.org",
> oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
> oauth_timestamp="1311316346", oauth_nonce="8039724591584141225",
> oauth_signature="9B1KpMdPvjuebrSHptKxVYofh9g%3D"
>    If-Match: *
>    Content-Length: 11633
>    Content-Type: application/atom+xml
>    Host: www.google.com
>    Connection: Keep-Alive
>    User-Agent: Apache-HttpClient/4.1 (java 1.5)
>    dynaTrace: FW;1435137529;14;60;1435137529;14;2
>    #########################
>    ######################### HERE STARTS THE XML WE SEND. It's a batch
> request that contains two different contacts that share the same email
> ([email protected])
>    <atom:feed xmlns:atom='http://www.w3.org/2005/Atom'
>    xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
>    xmlns:gd='http://schemas.google.com/g/2005'
>    xmlns:batch='http://schemas.google.com/gdata/batch'
>    xmlns:gContact='http://schemas.google.com/contact/2008'>
>      <atom:category scheme='http://schemas.google.com/g/2005#kind'
>      term='http://schemas.google.com/contact/2008#contact' />
>      <atom:entry>
>        <atom:category scheme='http://schemas.google.com/g/2005#kind'
>        term='http://schemas.google.com/contact/2008#contact' />
>        <atom:title type='text'>SARA SANCHEZ LACROIX</atom:title>
>        <atom:content type='text'>TIPO CLIENTE :FISICA IDIOMA:
>        CASTELLANO ES</atom:content>
>        <gContact:sensitivity rel='normal' />
>        <gd:name>
>          <gd:fullName>SARA</gd:fullName>
>          <gd:familyName>SANCHEZ</gd:familyName>
>          <gd:additionalName>LACROIX</gd:additionalName>
>        </gd:name>
>        <batch:operation type='insert' />
>        <batch:id>0182-ES-C-000000042-</batch:id>
>        <gd:extendedProperty name='COD_DOCUMPS_S' value='007341357X' />
>        <gd:extendedProperty name='DES_CTIPCL_S'
>        value='PERSONA NIF FISICA' />
>        <gContact:language code='CASTELLANO ES'
>        label='Language label' />
>        <gd:postalAddress rel='http://schemas.google.com/g/2005#home'>
>        ESPA&#209;A MADRID MADRID 28001</gd:postalAddress>
>        <gd:phoneNumber rel='http://schemas.google.com/g/2005#main'>
>        961240161</gd:phoneNumber>
>        <gd:email label='Email' address='[email protected]' />
>        <gContact:externalId rel='customer'
>        value='0182-ES-C-000000042-' />
>      </atom:entry>
>      <atom:entry>
>        <atom:category scheme='http://schemas.google.com/g/2005#kind'
>        term='http://schemas.google.com/contact/2008#contact' />
>        <atom:title type='text'>FERNANDO PAKETE TORRES</atom:title>
>        <atom:content type='text'>TIPO CLIENTE :FISICA IDIOMA:
>        CASTELLANO ES</atom:content>
>        <gContact:sensitivity rel='normal' />
>        <gd:name>
>          <gd:fullName>FERNANDO</gd:fullName>
>          <gd:familyName>PAKETE</gd:familyName>
>          <gd:additionalName>TORRES</gd:additionalName>
>        </gd:name>
>        <batch:operation type='insert' />
>        <batch:id>0182-ES-C-000000044-</batch:id>
>        <gd:extendedProperty name='COD_DOCUMPS_S' value='065839518V' />
>        <gd:extendedProperty name='DES_CTIPCL_S'
>        value='PERSONA NIF FISICA' />
>        <gContact:language code='CASTELLANO ES'
>        label='Language label' />
>        <gd:postalAddress rel='http://schemas.google.com/g/2005#home'>
>        ESPA&#209;A BARCELONA BARCELONA 08001</gd:postalAddress>
>        <gd:phoneNumber rel='http://schemas.google.com/g/2005#main'>
>        341361225</gd:phoneNumber>
>        <gd:email label='Email' address='[email protected]' />
>        <gContact:externalId rel='customer'
>        value='0182-ES-C-000000044-' />
>      </atom:entry>
>      </atom:feed>
>
>   ########  HERE STARTS THE GOOGLE's RESPONSE
>
> << HTTP/1.1 200 OK
>    Content-Type: application/atom+xml; charset=UTF-8
>    GData-Version: 1.0
>    Date: Fri, 22 Jul 2011 06:32:27 GMT
>    Expires: Fri, 22 Jul 2011 06:32:27 GMT
>    Cache-Control: private, max-age=0
>    X-Content-Type-Options: nosniff
>    X-Frame-Options: SAMEORIGIN
>    X-XSS-Protection: 1; mode=block
>    Server: GSE
>    Transfer-Encoding: chunked
>    ####### HERE STARTS THE XML RESPONSE. As you can notice, one contact
> with that email could be created, but the other one couldn't and tells us
> that
>    ####### it´s in conflict with the other Contact (just below it).
>    <?xml version='1.0' encoding='utf-8'?>
>    <atom:feed xmlns:atom='http://www.w3.org/2005/Atom'
>    xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
>    xmlns:gContact='http://schemas.google.com/contact/2008'
>    xmlns:batch='http://schemas.google.com/gdata/batch'
>    xmlns:gd='http://schemas.google.com/g/2005'>
>      <atom:id>
>
> https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/batch/1310981807505
> </atom:id>
>      <atom:updated>2011-07-18T09:36:47.528Z</atom:updated>
>      <atom:title type='text'>Batch Feed</atom:title>
>      <atom:entry>
>        <atom:id>0182-ES-C-000000044-</atom:id>
>        <atom:updated>2011-07-18T09:36:47.543Z</atom:updated>
>        <atom:title type='text'>Error</atom:title>
>        <atom:content type='text'>conflict</atom:content>
>        <batch:id>0182-ES-C-000000044-</batch:id>
>        <batch:status code='409' reason='conflict'
>        content-type='text/plain'>&lt;?xml version='1.0'
>        encoding='utf-8'?&gt;&lt;entry
>        xmlns='http://www.w3.org/2005/Atom'
>        xmlns:gContact='http://schemas.google.com/contact/2008'
>        xmlns:batch='http://schemas.google.com/gdata/batch'
>        xmlns:gd='
> http://schemas.google.com/g/2005'&gt;&lt;id&gt;http://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/base/50afa3fc0df3cf0c&lt;/id&gt;&lt;updated&gt;2011-07-18T09:36:47.506Z&lt;/updated&gt;&lt;category<http://schemas.google.com/g/2005'><id>http://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/base/50afa3fc0df3cf0c</id><updated>2011-07-18T09:36:47.506Z</updated><category>
>        scheme='http://schemas.google.com/g/2005#kind'
>        
> term='http://schemas.google.com/contact/2008#contact'/&gt;&lt;title<http://schemas.google.com/contact/2008#contact'/><title>
>        type='text'&gt;SARA SANCHEZ LACROIX&lt;/title&gt;&lt;content
>        type='text'&gt;TIPO CLIENTE :FISICA IDIOMA: CASTELLANO ES
>        &lt;/content&gt;&lt;link
>        rel='http://schemas.google.com/contacts/2008/rel#edit-photo'
>        type='image/*'
>        href='
> https://www.google.com/m8/feeds/photos/media/mockname.mock%40mock.org/50afa3fc0df3cf0c/1B2M2Y8AsgTpgAmY7PhCfg?xoauth_requestor_id=mockname.m...@mock.org'/&gt;&lt;link<https://www.google.com/m8/feeds/photos/media/mockname.mock%40mock.org/50afa3fc0df3cf0c/1B2M2Y8AsgTpgAmY7PhCfg?xoauth_requestor_id=mockname.m...@mock.org'/><link>
>        rel='self' type='application/atom+xml'
>        href='
> https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/[email protected]'/&gt;&lt;link<https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/[email protected]'/><link>
>        rel='edit' type='application/atom+xml'
>        href='
> https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/50afa3fc0df3cf0c/[email protected]'/&gt;&lt;gd:email<https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/50afa3fc0df3cf0c/[email protected]'/><gd:email>
>        label='Email'
>        address='[email protected]'/&gt;&lt;gd:phoneNumber
>        label='main'&gt;961240161&lt;/gd:phoneNumber&gt;&lt;gd:postalAddress
>        
> rel='http://schemas.google.com/g/2005#home'&gt;ESPA&#209;A<http://schemas.google.com/g/2005#home'>ESPA&%23209;A>
>        MADRID MADRID 28001
>        &lt;/gd:postalAddress&gt;&lt;gd:extendedProperty
>        name='COD_DOCUMPS_S'
>        value='007341357X'/&gt;&lt;gd:extendedProperty
>        name='DES_CTIPCL_S' value='PERSONA NIF
>        FISICA'/&gt;&lt;/entry&gt;</batch:status>
>        <batch:operation type='insert' />
>      </atom:entry>
>      <atom:entry>
>        <atom:id>
>
> http://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/base/50afa3fc0df3cf0c
> </atom:id>
>        <atom:updated>2011-07-18T09:36:47.562Z</atom:updated>
>        <atom:category scheme='http://schemas.google.com/g/2005#kind'
>        term='http://schemas.google.com/contact/2008#contact' />
>        <atom:title type='text'>SARA SANCHEZ LACROIX</atom:title>
>        <atom:content type='text'>TIPO CLIENTE :FISICA IDIOMA:
>        CASTELLANO ES</atom:content>
>        <atom:link rel='
> http://schemas.google.com/contacts/2008/rel#edit-photo'
>        type='image/*'
>        href='
> https://www.google.com/m8/feeds/photos/media/mockname.mock%40mock.org/50afa3fc0df3cf0c/1B2M2Y8AsgTpgAmY7PhCfg?xoauth_requestor_id=mockname.m...@mock.org'
> />
>        <atom:link rel='self' type='application/atom+xml'
>        href='
> https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/[email protected]'
> />
>        <atom:link rel='edit' type='application/atom+xml'
>        href='
> https://www.google.com/m8/feeds/contacts/mockname.mock%40mock.org/full/50afa3fc0df3cf0c/[email protected]'
> />
>        <batch:id>0182-ES-C-000000042-</batch:id>
>        <batch:status code='201' reason='Created' />
>        <batch:operation type='insert' />
>        <gd:email label='Email' address='[email protected]' />
>        <gd:phoneNumber label='main'>961240161</gd:phoneNumber>
>        <gd:postalAddress rel='http://schemas.google.com/g/2005#home'>
>        ESPA&#209;A MADRID MADRID 28001</gd:postalAddress>
>        <gd:extendedProperty name='COD_DOCUMPS_S' value='007341357X' />
>        <gd:extendedProperty name='DES_CTIPCL_S'
>        value='PERSONA NIF FISICA' />
>      </atom:entry>
>    </atom:feed>
>
>
>
>
>
> On 21 July 2011 18:26, Alain Vongsouvanh <[email protected]> wrote:
>
>> Hello Antonio,
>>
>> Could you share with us the data (including the header) and the URL your
>> are using to send your request?
>> This error seems related to the version 1.0 of the API as it only allows
>> one occurrence within every contacts for each e-mail address.
>>
>> Best,
>> Alain
>>
>> On Wed, Jul 20, 2011 at 1:56 AM, Antonio Lobato 
>> <[email protected]>wrote:
>>
>>> I forgot to tell you that we are using batch processing, so we send a
>>> POST with an xml containing a list of contacts that we want to insert or
>>> update.
>>>
>>> Thanks again.
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
>>> To post to this group, send email to
>>> [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://code.google.com/apis/contacts/community/forum.html
>>>
>>
>>
>>
>> --
>> Alain Vongsouvanh
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
>> To post to this group, send email to
>> [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://code.google.com/apis/contacts/community/forum.html
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://code.google.com/apis/contacts/community/forum.html
>



-- 
Alain Vongsouvanh

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html

Reply via email to