rgvieira / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Error In Parsing output of Xml #248

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-client-1.1.1-alpha

Java environment : Java 6

Greetings for the day!

I've been trying to create a simple Java App that exports products to
Merchant Center,I went through the tutorial for Google content API at
http://code.google.com/apis/shopping/content/developers_guide_java.html.
I'm using
google-api-client-1.1.1-alpha-java.zip as its mentioned into the
tutorial that it has been verified with this version.

The Problem that I'm Facing is that the output of the xml I get is :

<?xml version='1.0' ?>
<unknownName xmlns:app="" xmlns:sc="" xmlns:scp="">
<n0:control xmlns:n0="http://unknown/app">
    <n1:required_destination dest="ProductAds" xmlns:n1="http://unknown/
sc" />
</n0:control>
<n2:content type="text" xmlns:n2="http://unknown/">Comfortable and
soft, this sweater will keep you warm on those cold winter nights. Red
and blue stripes.</n2:content>
<n3:link href="http://pocproject.ecomzera.comitem1-info-page.html"
rel="alternate" type="text/html" xmlns:n3="http://unknown/" />
<n4:content_language xmlns:n4="http://unknown/sc">de</
n4:content_language>
<n5:id xmlns:n5="http://unknown/sc">1234567</n5:id>
<n6:image_link xmlns:n6="http://unknown/sc">http://www.example.com/
image1.jpg</n6:image_link>
<n7:image_link xmlns:n7="http://unknown/sc">http://www.example.com/
image2.jpg</n7:image_link>
<n8:target_country xmlns:n8="http://unknown/sc">DE</n8:target_country>
<n9:condition xmlns:n9="http://unknown/scp">new</n9:condition>
<n10:price unit="EUR" xmlns:n10="http://unknown/scp">12.99</n10:price>
<n11:title xmlns:n11="http://unknown/">Red wool sweater</n11:title>
</unknownName>

rather than

<entry>
  <title>Wool sweater</title>
  <content type="text">Comfortable and soft, with red and blue
stripes. </content>
  <sc:id>123456</sc:id>
  <link rel="alternate" type="text/html" href="http://www.replace-with-
your-homepage.com/item1-info-page.html"/>
  <sc:image_link>http://www.example.com/image1.jpg</sc:image_link>
  <sc:target_country>US</sc:target_country>
  <sc:content_language>en</sc:content_language>
  <scp:brand>Acme</scp:brand>
  <scp:condition>new</scp:condition>
  <scp:price unit="usd">25</scp:price>
  <scp:quantity>3</scp:quantity>
  <scp:color>red</scp:color>
  <scp:color>blue</scp:color>
  <scp:tax>
    <scp:tax_country>US</scp:tax_country>
    <scp:tax_region>CA</scp:tax_region>
    <scp:tax_rate>8.25</scp:tax_rate>
    <scp:tax_ship>true</scp:tax_ship>
  </scp:tax>
  <scp:tax>
    <scp:tax_country>US</scp:tax_country>
    <scp:tax_region>926*</scp:tax_region>
    <scp:tax_rate>8.75</scp:tax_rate>
    <scp:tax_ship>false</scp:tax_ship>
  </scp:tax>
</entry>

as is mentioned into the tutorial and I end up receiving a
com.google.api.client.http.HttpResponseException: 400 Bad Request
Although the Login and Setup is a success.
I'm using JAVA 6.0.24
Os is Ubuntu 10.04 .

Could somebody guide what could be the problem.
Any clue will be of Extreme Help to me.

Regards
Prince

Original issue reported on code.google.com by princese...@ymail.com on 14 Jul 2011 at 11:44

GoogleCodeExporter commented 9 years ago
I'm facing the same issue with 1.5-beta lib

Original comment by plexsupp...@gmail.com on 13 Sep 2011 at 4:42

GoogleCodeExporter commented 9 years ago
is there any solution for this issue or any other inputs? got the same error 
and I don't know how to fix it too.

Kind Regards
Claudio

Original comment by goo...@microspot.ch on 28 Mar 2012 at 7:41