<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blogs.teztech.com</title>
	<atom:link href="http://blogs.teztech.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.teztech.com</link>
	<description>Programming, Rock Climbing and Running</description>
	<lastBuildDate>Mon, 27 May 2013 23:47:36 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Free DNS Servers on Amazon Web Services (AWS)?</title>
		<link>http://blogs.teztech.com/2013/05/27/free-dns-servers-on-amazon-web-services-aws</link>
		<comments>http://blogs.teztech.com/2013/05/27/free-dns-servers-on-amazon-web-services-aws#comments</comments>
		<pubDate>Mon, 27 May 2013 23:47:36 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[T3city]]></category>

		<guid isPermaLink="false">http://blogs.teztech.com/?p=97</guid>
		<description><![CDATA[Recently, I was researching how to run Ubuntu instances on AWS. I found http://aws.amazon.com/free. The free tier includes 750 hours for EC2 Linux Micro Instances and 30GB of EBS storage. After clicking around, I figured out this is what you get with the Micro EC2 Instance running Ubuntu 12.04 LTS: The default Ubuntu 12.04 LTS AWS image boots [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Recently, I was researching how to run Ubuntu instances on AWS. I found <a href="http://aws.amazon.com/free/">http://aws.amazon.com/free</a>. The free tier includes 750 hours for EC2 Linux Micro Instances and 30GB of EBS storage. After clicking around, I figured out this is what you get with the Micro EC2 Instance running Ubuntu 12.04 LTS:</p>
<ul>
<li>The default Ubuntu 12.04 LTS AWS image boots on a 8GB  root partition created on EBS. This allows you to run a a normal Ubuntu server. If you create a larger EBS partition, Ubuntu will automatically expand the file system on first boot, but 8GB should be plenty for a typical DNS server.</li>
<li>The Micro Instances includes 600MB of RAM</li>
<li>I thought I read that the Micro Instance includes 2 CPU cores, but the image I booted only shows 1 CPU.</li>
</ul>
<p>This should be fine for a backup DNS server.<span id="more-97"></span></p>
<p>The AWS documentation is large and intimidating. In the past, AWS encouraged a lot of specialized AWS development to create paravirtualized kernels that worked under Xen combined with VM instances that booted up and automatically configured  themselves to use S3 storage. This is a great model for web sites and other Internet based services that require scaling across many nodes, it seemed like overkill for something like DNS that typically only requires a couple of high availability servers. Fast forward several years later and now AWS lets you easily create VM backed by EBS storage that can be managed like a typical server. Here are the steps I followed to create my AWS based DNS server:</p>
<ol>
<li>Opened an AWS account  - credit card is required (!)</li>
<li>Configure and start a new Ubuntu 12.04 LTS micro instance. The free instance is clearly identified and the defaults end up with an EBS backed server with a 8GB root partition.</li>
<li>Add a public IP address: <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html</a></li>
<li>Login to the new instance with the AWS generated SSH key pair: <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html</a></li>
<li>Configure your new instance normally</li>
</ol>
<p>Now we just have to wait and see if it is really free!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2013/05/27/free-dns-servers-on-amazon-web-services-aws/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Domain Name Scams</title>
		<link>http://blogs.teztech.com/2013/03/12/new-domain-name-scams</link>
		<comments>http://blogs.teztech.com/2013/03/12/new-domain-name-scams#comments</comments>
		<pubDate>Tue, 12 Mar 2013 18:11:48 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[Abuse]]></category>
		<category><![CDATA[T3city]]></category>

		<guid isPermaLink="false">http://blogs.teztech.com/?p=93</guid>
		<description><![CDATA[Most people know about Cybersquatting, but there are plenty of other scams involving domain names. Here are a few: http://en.wikipedia.org/wiki/Domain_tasting http://en.wikipedia.org/wiki/Domain_name_front_running A friend forwarded me an email yesterday with a scam I haven&#8217;t seen before. He received domain name spam that looked like this: Take time to secure friendsdomainnamewithans.com today. We understand the importance of capturing [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Most people know about <a href="http://en.wikipedia.org/wiki/Cybersquatting">Cybersquatting</a>, but there are plenty of other scams involving domain names. Here are a few:</p>
<ul>
<li>http://en.wikipedia.org/wiki/Domain_tasting</li>
<li>http://en.wikipedia.org/wiki/Domain_name_front_running</li>
</ul>
<p>A friend forwarded me an email yesterday with a scam I haven&#8217;t seen before. He received domain name spam that looked like this:<span id="more-93"></span></p>
<blockquote><p>Take time to secure friendsdomainnamewithans.com today.</p>
<p>We understand the importance of capturing all similar Domain Names in alignment with your business. Make an offer today in order for us to go after the domain name for you.<br />
To confirm interest in owning this domain, fill out form here:</p>
<p>http://dr-gs.com/24343840mavidu-MCI</p>
<p>[...]</p></blockquote>
<p>When I checked yesterday, the domain name was registered to a company with a name something like  &#8220;China Domains&#8221; (too bad I didn&#8217;t save the page). The domain was set to expire in a year. When I checked the domain name today, it was unregistered. It looks like somebody is combining spam with domain tasting&#8230; so creative!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2013/03/12/new-domain-name-scams/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Climbing El Cap in 2008</title>
		<link>http://blogs.teztech.com/2013/01/25/climbing-elcap-in-2008</link>
		<comments>http://blogs.teztech.com/2013/01/25/climbing-elcap-in-2008#comments</comments>
		<pubDate>Fri, 25 Jan 2013 18:14:56 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.teztech.com/?p=85</guid>
		<description><![CDATA[Back in 2008, I climbed The Nose on El Cap with Ian Ryan. While searching my email for something completely unrelated, I came across some Internet trip report posts by El Cap photographer Tom Evans that mention our climb: ElCap Report 6/17/08: Ian and I are the team of &#8220;American men&#8221;. We did make it [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Back in 2008, I climbed <a title="The Nose on El Cap" href="http://www.supertopo.com/rock-climbing/Yosemite-Valley-El-Capitan-The-Nose">The Nose on El Cap</a> with Ian Ryan. While searching my email for something completely unrelated, I came across some Internet trip report posts by El Cap photographer Tom Evans that mention our climb:</p>
<ul>
<li><a href="http://www.supertopo.com/climbing/thread.php?topic_id=616777">ElCap Report 6/17/08</a>: Ian and I are the team of &#8220;American men&#8221;. We did make it to El Cap Tower</li>
<li><a href="http://www.supertopo.com/climbing/thread.php?topic_id=617519">ElCap Report 6/18/08</a>: We didn&#8217;t catch the girls, but we did make it to Camp 5 by climbing late into the night.</li>
<li><a href="http://www.supertopo.com/climbing/thread.php?topic_id=618248">ElCap Report 6/19/08</a>: We made it to the top.</li>
</ul>
<p><span id="more-85"></span></p>
<p>Here are links to my photos of the climb:</p>
<ul>
<li><span style="line-height: 13px;"><a href="http://tezza.t3city.com/gallery/v/pj/El+Cap+Summer+2008/">Pictures of our climb made with a disposable camera</a></span></li>
<li><a href="http://tezza.t3city.com/gallery/v/pj/El+Cap+by+Tom+Summer+2008/">Pictures of our climb from the ground by El Cap photographer Tom Evans</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2013/01/25/climbing-elcap-in-2008/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transcoding a Movie Library with Python</title>
		<link>http://blogs.teztech.com/2013/01/16/transcoding-a-movie-library-with-python</link>
		<comments>http://blogs.teztech.com/2013/01/16/transcoding-a-movie-library-with-python#comments</comments>
		<pubDate>Thu, 17 Jan 2013 02:18:32 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[Home Theatre]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blogs.teztech.com/?p=68</guid>
		<description><![CDATA[Like many a fellow geek, I have a Ubuntu server with shared folders that hold my collection of photos, music, movies, etc.. To show the movies on my TV, I started off with ASUS O!Play media player. Eventually, I bought a Samsung Blu-ray player with built-in media player. While the ASUS box supported CFS (Windows [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Like many a fellow geek, I have a Ubuntu server with shared folders that hold my collection of photos, music, movies, etc.. To show the movies on my TV, I started off with ASUS O!Play media player. Eventually, I bought a Samsung Blu-ray player with built-in media player. While the ASUS box supported CFS (Windows file sharing), the  Samsung could only see DNLA servers. I installed a DNLA service on my Ubunto and that worked fine until recently. Last summer, I moved to a new house. My new place doesn&#8217;t have CAT5 run all over, so I needed a new Blu-ray player with WiFi. I bought an inexpensive Panasonic unit from Costco because the Panasonic supported <a href="http://www.amazon.com/b?ie=UTF8&amp;node=2676882011">Amazon Instant Videos</a>. Unfortunately, the Panasonic was much more picky about the supported video formats. While it can play modern .mkv files, it can&#8217;t play .avi files at all. I had a choice: I could buy another Media Player (the Western Digital WD TV Live was recommended for wide codec support) or I could figure out how to transcode videos.</p>
<p><span id="more-68"></span></p>
<p>After a few experiments, I discovered that the Panasonic was happy with .mkv files with H.264 encoding. After playing with several programs capable of transcoding on Ubuntu, I settled on <a href="http://handbrake.fr/">Handbrake</a>.</p>
<p>As many probably do, I had a large and messy collection of video files that needed to be converted. The one saving grace to the collection was that each group of files for a given movie was in a separate folder with a name that was based on the movie title plus other junk. Since I was cleaning things up anyway, I took some time to manually rename the folders in a consistent way. I did this in a way that allowed my transcoding program to parse the movie&#8217;s folder name and use it to name the resulting .mkv files. The result of all this is the simple Python program, <a href="http://blogs.teztech.com/files/transcode_avis.py">transcode_avis.py</a> that generates the Handbrake commands needed to convert .avi files with arbitrary video encoding to .mkv files encoded with H.264. The audio stream is copied rather than transcoded, as is my preference, to preserve original DVD digital surround sound streams when available.</p>
<p>I used transcode_avis.py to generate a batch file that I ran by hand. The batch file invokes HandbrakeCLI to do the work. I did it this way because I was going to slice up the the work into multiple batch files which I could run simultaneously to take advantage of my 8 core desktop CPU. But, this was unnecessary as Handbrake does a good job of using up all the cores on its own:</p>
<p><a href="http://blogs.teztech.com/2013/01/16/transcoding-a-movie-library-with-python/handbrake_task_manager" rel="attachment wp-att-70"><img class="alignnone size-medium wp-image-70" alt="handbrake_task_manager" src="http://blogs.teztech.com/wp-content/uploads/2013/01/handbrake_task_manager-269x300.png" width="269" height="300" /></a></p>
<p>&nbsp;</p>
<p>Transcoding 2 videos at once does push the CPU usage completely to 100% but it essentially transcodes each video at 1/2 speed.  The typical transcoding speed on my system is 265 frames per second (or 1/2 of that if transcoding 2 videos at once).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2013/01/16/transcoding-a-movie-library-with-python/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq Links</title>
		<link>http://blogs.teztech.com/2011/04/09/linq-links</link>
		<comments>http://blogs.teztech.com/2011/04/09/linq-links#comments</comments>
		<pubDate>Sat, 09 Apr 2011 21:35:29 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blogs.teztech.com/?p=65</guid>
		<description><![CDATA[Linq is some of the coolest new stuff to happen to programming in a long time. The idea was tried in the past with things like &#8220;embedded SQL&#8221; for Cobol and Fortran, but I think this time, Microsoft finally got it right (or at least has things headed in the right direction). With the Standard [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/netframework/aa904594">Linq</a> is some of the coolest new stuff to happen to programming in a long time. The idea was tried in the past with things like &#8220;embedded SQL&#8221; for Cobol and Fortran, but I think this time, Microsoft finally got it right (or at least has things headed in the right direction). With the <a href="http://en.wikipedia.org/wiki/Standard_Template_Library">Standard Template Library (STL)</a>, we got a uniform way to access and navigate type-safe and efficient memory based data containers. With Linq, we have finally a unified way to access and navigate data stored in just about any form. Yeah, I know, Linq really isn&#8217;t new, but I&#8217;m just now getting serious about using it large projects. Some of the interesting Linq related links I&#8217;ve seen recently:</p>
<ul>
<li><a href="http://www.linqpad.net/WhyLINQBeatsSQL.aspx">Why Linq beats SQL</a></li>
<li><a href="http://blogs.msdn.com/b/mattwar/archive/2008/11/21/linq-iqtoolkit-on-codeplex.aspx">IQToolkit</a> (for building Linq data source of any type)</li>
<li><a href="http://www.codeproject.com/KB/IP/equinox.aspx">Linq to IMAP</a> (looks very useful and a very cool demonstration of the possibilities)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2011/04/09/linq-links/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Contacts into My New Droid Phone</title>
		<link>http://blogs.teztech.com/2010/01/01/moving-contacts-into-my-new-droid-phone</link>
		<comments>http://blogs.teztech.com/2010/01/01/moving-contacts-into-my-new-droid-phone#comments</comments>
		<pubDate>Fri, 01 Jan 2010 23:44:22 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://teztech.com/?p=55</guid>
		<description><![CDATA[I&#8217;ve been waiting on a phone like the Droid for years &#8211; an Internet connected miniature computer I can put in my pocket. I skipped Windows Mobile because it was lame: Poor resolution, poor open source application support, poor UI experience (poor Microsoft). I skipped Blackberry because the phones are ugly with small screens and the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been waiting on a phone like the Droid for years &#8211; an Internet connected miniature computer I can put in my pocket. I skipped Windows Mobile because it was lame: Poor resolution, poor open source application support, poor UI experience (poor Microsoft). I skipped Blackberry because the phones are ugly with small screens and the software is just awful. I skipped the iPhone because I&#8217;m not into platforms you can&#8217;t tinker with&#8230; app stores are fine, but, as a developer, I don&#8217;t want to be forced to use one. And Objective C should be something programmers either choose (or not) on its own merits &#8211; not due to Apple strong arming.</p>
<p>The G1 was almost good enough, but I heard it was slow and slow computers drive me crazy. Finally, my Droid has arrived. I&#8217;m not thrilled that Java is the recommended programming language, but at least you don&#8217;t have to program in Objective C. I&#8217;m on day 2 with my Droid and I&#8217;m really just getting started. The first challenge I ran into was moving my contacts from Thunderbird and my old Casio &#8220;Boulder&#8221; phone.<span id="more-55"></span> With my old Casio phone, I used Verizon&#8217;s free Backup Assistant to keep my contacts backed up. This application is actually a nice touch by Verizon and they should publicize it better. After your first backup, you can login to their site and see your contacts. Last time I switched phones, I just installed Backup Assistant on my new phone and downloaded my contacts from my online backup. Unfortunately, Verizon has not yet ported Backup Assistant to the Android platform. They do, however, allow you to login to their web site and download all contacts as a CSV files. I though for sure there would be an easy way to get contacts in a CSV file onto my Droid, but that did not turn out to be the case.</p>
<p>My first task was to export another CSV from Thunderbird and consolidate my cell phone and email contacts. Luckily, this wasn&#8217;t too bad because I had done it last time I switched phones. I used OpenOffice&#8217;s Calc program to open both CSV file, manually consolidate them, then export the resulting consolidated contact list as a CSV file.</p>
<p>To get my consolidated CSV onto the Droid, first, I tried copying the CSV file onto the Droid and using the phone&#8217;s import contact function. With a USB cable,  getting the CSV file onto the phone was easy enough, but the Droid import function only understands vCards, so the CSV file was useless for the Droid import function.</p>
<p>The Droid will automatically sync with Gmail Contacts and I knew Gamail had a CSV import function, so I tried uploading my CSV file into Gmail Contacts. I could get some of the CSV uploaded, but, after many tries, I could not get Email addresses and mobile phone numbers properly imported. These are the most important data items, so IMO, Gmail&#8217;s CSV import is almost useless.</p>
<p>Next I tried to use an online service to convert my CSV to vCard, then import the resulting vCard file via the Droid contact import function. This sort of worked, but contacts with multiple phone numbers had all phone numbers set to be &#8220;home&#8221; and all email addresses were set as &#8220;other&#8221; (rather than &#8220;work&#8221; or &#8220;home&#8221;). I got the bright idea to import the vCard file into Gmail contacts, but this produced the same problems as trying to import directly on the Droid.</p>
<p>Thinking that getting contacts into Gmail must be a common problem, I ran a bunch more Google searches looking for something that would do the conversion I needed, but I found nothing.</p>
<p>So, I decided to do what only a programmer can do&#8230; write a program to get my contacts from the CSV onto my Droid. Actually, I did this indirectly. I used Google&#8217;s .Net data API to upload my CSV into Gmail Contacts, then the Droid&#8217;s built-in Gmail sync function automatically puts the contacts onto my Droid. I did it this way because a) I&#8217;ve worked the Google .Net data API before and found it easy to use and b) I have a good CSV library I&#8217;ve found and used on other projects. </p>
<p>For those interested, I have copied the full source code below:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode">
<span class="kwrd">using</span> System;
<span class="kwrd">using</span> System.Collections.Generic;
<span class="kwrd">using</span> System.IO;
<span class="kwrd">using</span> System.Text;

<span class="kwrd">using</span> Google.GData.Contacts;
<span class="kwrd">using</span> Google.GData.Client;
<span class="kwrd">using</span> Google.GData.Extensions;
<span class="kwrd">using</span> Google.Contacts;

<span class="kwrd">using</span> LumenWorks.Framework.IO.Csv;

<span class="kwrd">namespace</span> GoogleContactsUpload
{
    <span class="kwrd">class</span> Program
    {
        <span class="kwrd">static</span> <span class="kwrd">void</span> Main(<span class="kwrd">string</span>[] args)
        {
            <span class="kwrd">string</span> username = <span class="str">"user1@gmail.com"</span>;
            <span class="kwrd">string</span> password = <span class="str">"password1"</span>;

            Uri feedUri = <span class="kwrd">new</span> Uri(ContactsQuery.CreateContactsUri(username));

            RequestSettings rs = <span class="kwrd">new</span> RequestSettings(<span class="str">"teztech-GoogleContactsUpload-1"</span>, username, password);
            ContactsRequest cr = <span class="kwrd">new</span> ContactsRequest(rs);

            <span class="kwrd">using</span> (StreamReader contactsReader = <span class="kwrd">new</span> StreamReader(<span class="str">@"C:\Users\pj\Documents\Databases\ContactsMerged.csv"</span>))
            {
                <span class="kwrd">using</span> (CsvReader contactsCsv = <span class="kwrd">new</span> LumenWorks.Framework.IO.Csv.CsvReader(contactsReader, <span class="kwrd">true</span>, <span class="str">','</span>, <span class="str">'"'</span>, <span class="str">'"'</span>, <span class="str">'\0'</span>, <span class="kwrd">true</span>))
                {
                    <span class="kwrd">while</span> (contactsCsv.ReadNextRecord())
                    {
                        Contact contact = <span class="kwrd">new</span> Contact();
                        contact.Title = <span class="kwrd">string</span>.Format(<span class="str">"{0} {1}"</span>, contactsCsv[<span class="str">"First Name"</span>], contactsCsv[<span class="str">"Last Name"</span>]);

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Email Address"</span>] != <span class="str">""</span>)
                        {
                            EMail workEmail = <span class="kwrd">new</span> EMail(contactsCsv[<span class="str">"Email Address"</span>]);
                            workEmail.Primary = <span class="kwrd">true</span>;
                            workEmail.Rel = ContactsRelationships.IsWork;
                            contact.Emails.Add(workEmail);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Home Email"</span>] != <span class="str">""</span>)
                        {
                            EMail homeEMail = <span class="kwrd">new</span> EMail(contactsCsv[<span class="str">"Home Email"</span>]);
                            homeEMail.Rel = ContactsRelationships.IsHome;
                            contact.Emails.Add(homeEMail);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Work Phone"</span>] != <span class="str">""</span>)
                        {
                            PhoneNumber workPhone = <span class="kwrd">new</span> PhoneNumber(contactsCsv[<span class="str">"Work Phone"</span>]);
                            workPhone.Rel = ContactsRelationships.IsWork;
                            contact.Phonenumbers.Add(workPhone);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Home Phone"</span>] != <span class="str">""</span>)
                        {
                            PhoneNumber homePhone = <span class="kwrd">new</span> PhoneNumber(contactsCsv[<span class="str">"Home Phone"</span>]);
                            homePhone.Rel = ContactsRelationships.IsHome;
                            contact.Phonenumbers.Add(homePhone);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Mobile Phone"</span>] != <span class="str">""</span>)
                        {
                            PhoneNumber mobilePhone = <span class="kwrd">new</span> PhoneNumber(contactsCsv[<span class="str">"Mobile Phone"</span>]);
                            mobilePhone.Primary = <span class="kwrd">true</span>;
                            mobilePhone.Rel = ContactsRelationships.IsMobile;
                            contact.Phonenumbers.Add(mobilePhone);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Work Fax"</span>] != <span class="str">""</span>)
                        {
                            PhoneNumber faxPhone = <span class="kwrd">new</span> PhoneNumber(contactsCsv[<span class="str">"Work Fax"</span>]);
                            faxPhone.Rel = ContactsRelationships.IsFax;
                            contact.Phonenumbers.Add(faxPhone);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Home Address"</span>] != <span class="str">""</span>)
                        {
                            PostalAddress homeAddress = <span class="kwrd">new</span> PostalAddress();
                            homeAddress.Value = FormatAddress(<span class="kwrd">false</span>, contactsCsv[<span class="str">"Home Address"</span>], contactsCsv[<span class="str">"Home Address 2"</span>], contactsCsv[<span class="str">"Home City"</span>], contactsCsv[<span class="str">"Home State"</span>], contactsCsv[<span class="str">"Home ZipCode"</span>], contactsCsv[<span class="str">"Home Country"</span>]);
                            homeAddress.Rel = ContactsRelationships.IsHome;
                            contact.PostalAddresses.Add(homeAddress);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Work Address"</span>] != <span class="str">""</span>)
                        {
                            PostalAddress workAddress = <span class="kwrd">new</span> PostalAddress();
                            workAddress.Value = FormatAddress(<span class="kwrd">false</span>, contactsCsv[<span class="str">"Work Address"</span>], contactsCsv[<span class="str">"Work Address 2"</span>], contactsCsv[<span class="str">"Work City"</span>], contactsCsv[<span class="str">"Work State"</span>], contactsCsv[<span class="str">"Work ZipCode"</span>], contactsCsv[<span class="str">"Work Country"</span>]);
                            workAddress.Rel = ContactsRelationships.IsWork;
                            contact.PostalAddresses.Add(workAddress);
                        }

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Organization"</span>] != <span class="str">""</span>)
                        {
                            Organization organization = <span class="kwrd">new</span> Organization();
                            organization.Label = contactsCsv[<span class="str">"Organization"</span>];
                            organization.Title = contactsCsv[<span class="str">"Job Title"</span>];
                            contact.Organizations.Add(organization);
                        }

                        StringBuilder notes = <span class="kwrd">new</span> StringBuilder();

                        <span class="kwrd">if</span> (contactsCsv[<span class="str">"Web Page 1"</span>] != <span class="str">""</span>)
                            notes.AppendFormat(<span class="str">"Website: {0}"</span>, contactsCsv[<span class="str">"Web Page 1"</span>]);

                        notes.AppendFormat(<span class="str">"{0}{1}"</span>, notes.Length &amp;gt; 0 ? <span class="str">"\r\n"</span> : <span class="str">""</span>, contactsCsv[<span class="str">"Notes"</span>]);

                        contact.Content = notes.ToString();

                        Contact createdContact = cr.Insert(feedUri, contact);
                    }
                }
            }
        }

        <span class="kwrd">static</span> <span class="kwrd">public</span> <span class="kwrd">string</span> FormatAddress(<span class="kwrd">bool</span> useBR, <span class="kwrd">string</span> address1, <span class="kwrd">string</span> address2, <span class="kwrd">string</span> city, <span class="kwrd">string</span> state, <span class="kwrd">string</span> zip, <span class="kwrd">string</span> country)
        {
            StringBuilder address = <span class="kwrd">new</span> StringBuilder();
            <span class="kwrd">string</span> newLine = useBR ? <span class="str">"&amp;lt;br /&amp;gt;"</span> : <span class="str">"\r\n"</span>;

            <span class="kwrd">if</span>(address1 != <span class="str">""</span>) address.AppendFormat(<span class="str">"{0}{1}"</span>, address.Length &amp;gt; 0 ? newLine : <span class="str">""</span>,   address1);
            <span class="kwrd">if</span>(address2 != <span class="str">""</span>) address.AppendFormat(<span class="str">"{0}{1}"</span>, address.Length &amp;gt; 0 ? newLine : <span class="str">""</span>,   address2);

            StringBuilder cityStateZip = <span class="kwrd">new</span> StringBuilder();

            cityStateZip.Append(city);
            <span class="kwrd">if</span>(state != <span class="str">""</span>)    cityStateZip.AppendFormat(<span class="str">"{0}{1}"</span>, cityStateZip.Length &amp;gt; 0 ? <span class="str">", "</span>  : <span class="str">""</span>, state);
            <span class="kwrd">if</span>(zip != <span class="str">""</span>)      cityStateZip.AppendFormat(<span class="str">"{0}{1}"</span>, cityStateZip.Length &amp;gt; 0 ? <span class="str">"  "</span> : <span class="str">""</span>, zip);

            <span class="kwrd">if</span>(cityStateZip.Length &amp;gt; 0) address.AppendFormat(<span class="str">"{0}{1}"</span>, address.Length &amp;gt; 0 ? newLine : <span class="str">""</span>,   cityStateZip.ToString());
            <span class="kwrd">if</span>(country != <span class="str">""</span>)           address.AppendFormat(<span class="str">"{0}{1}"</span>, address.Length &amp;gt; 0 ? newLine : <span class="str">""</span>,   country);

            <span class="kwrd">return</span> address.ToString();
        }

    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2010/01/01/moving-contacts-into-my-new-droid-phone/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hiring Your Friends</title>
		<link>http://blogs.teztech.com/2009/12/12/hiring-your-friends</link>
		<comments>http://blogs.teztech.com/2009/12/12/hiring-your-friends#comments</comments>
		<pubDate>Sat, 12 Dec 2009 18:11:06 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://teztech.com/?p=33</guid>
		<description><![CDATA[Recently, a friend of mine asked me about hiring friends. I&#8217;ve read a lot of books about team management and I have a lot of hard won experience in this area. Posting this up in public may come back to haunt me, but I&#8217;ve decided to bumble on anyway and try to document some of my suggestions here in [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Recently, a friend of mine asked me about hiring friends. I&#8217;ve read a lot of books about team management and I have a lot of hard won experience in this area. Posting this up in public may come back to haunt me, but I&#8217;ve decided to bumble on anyway and try to document some of my suggestions here in the hope that it will make the world a better place. A lot of the post below details what to do when things aren&#8217;t working out, but I don&#8217;t want you to think things are all &#8220;gloom and doom&#8221; &#8211; I love to work and I&#8217;ve had really good times at work. One of my very best friends today is a &#8220;success story&#8221; about hiring friends.</p>
<h2>It&#8217;s All About the Money</h2>
<p>Many surveys and studies of programmers suggest that job satisfaction is more important than money, but my experience is that you have to take care of money issues first, or you&#8217;ll keep coming back to them over and over. The ideal situation is:</p>
<ol>
<li>Everybody feels that they are being generously compensated (some of the generosity can be in deferred compensation - see #2)</li>
<li>Any type of deferred compensation (sales commissions, stock options, profit sharing, etc.) is &#8220;icing on the cake&#8221; and not necessary for the person to pay their normal living expenses</li>
<li>You don&#8217;t directly control the person&#8217;s paycheck (you both work for somebody else)</li>
</ol>
<p><span id="more-33"></span>Not every situation will be ideal, but if you can&#8217;t handle requirements #1, and #2, maybe you should wait to hire until you can. There are people our there that will work hard without adequate compensation (either real or imagined), but your chances of hiring them are slim indeed.</p>
<h2>3 Strikes and You&#8217;re Out</h2>
<p>People that don&#8217;t perform well waste the time and energy of those that do. It&#8217;s really that simple. If you want the best possible performance from your team, each and every team member has to perform at their best: Team members with sub-par performance  have to &#8220;shape up or ship out&#8221; (even if they are friends). If you could just hire top performers to begin with, it seems like this would never be an issue, but hiring top talent every time is next to impossible and I&#8217;ve found that even top performers go through slumps. But you can identify people that don&#8217;t perform to expectations and it&#8217;s possible to pull people out of slumps. I&#8217;ll explain how I&#8217;ve done it below.</p>
<p>First, let&#8217;s define &#8220;best&#8221; a little more carefully: You&#8217;re the boss so you get to decide what is &#8220;best&#8221;. Maybe you want a shorted schedule (cutting features and quality to compensate). Maybe you want the best possible user-interface experience. Or maybe you want relatively bug-free code with a good, clean architecture. Whatever &#8220;best&#8221; is, it&#8217;s your choice and you need to decide and articulate your requirements and expectations clearly to your team.</p>
<p>Now let&#8217;s talk a little about &#8220;reasonable expectations&#8221;: Do you expect your team to work 60+ hours a week? In some cases this makes sense &#8211; a team working hard at &#8220;crunch time&#8221; to hit an external deadline, a tight knit group hoping to get venture capital funding or big bonus checks&#8230; 60+ hours weeks are OK, but, IMO, it&#8217;s unreasonable to expect people to do this week after week for years on end. Are there necessary tools are skills that are missing? There are two questions I ask myself: &#8220;What can I do to help?&#8221; and &#8220;Is what I&#8217;m asking for reasonable?&#8221;.</p>
<p>With all that background, now I&#8217;ll explain my &#8220;3 strikes&#8221; policy: People that work for me get fired after their 3rd written notice. In practice, this actually works out to 4 written notices because I usually don&#8217;t tell people out my &#8220;3 strikes&#8221; policy until what amounts to a written warning. Here is an example:</p>
<blockquote><p>Boy, I sure am not happy to be writing this email, but tomorrow, unless  you XXX, I am going to have to  YYY. [...] These projects are all  ultimately my responsibility and I can&#8217;t blame the lack of progress on  external forces. [...]</p>
<p>You need to sit down and take a hard, honest look at yourself and your  schedule and decide if you really have the time and willingness  available for a project like this. If the answer is &#8220;yes&#8221;, then XXX.</p>
<p>Here at XXX, we have have a formal employment policy of 3  written notices, then you are fired. This email is a warning&#8230; please, please do not make me give you a written notice. This is not my idea  of fun things to do. What I want is to have fun working with my friends,  but it is not fun for me when I have to do all the work, write emails  like this and/or receive angry calls from our customers.</p>
<p>Here are some concrete suggestions:</p>
<p>First and foremost, you need to spend several hours each day coding.  On a project like this, you simply cannot procrastinate then get  everything accomplished with one all night long programming marathon.  Check out the section &#8220;The Three Hour Rule&#8221; in this article:  <a href="http://www.w-uh.com/articles/030308-tyranny_of_email.html">http://www.w-uh.com/articles/030308-tyranny_of_email.html</a>. Consider  dedicating 2-3 blocks of 3 hours each day coding until you&#8217;ve worked yourself  back into good graces.</p>
<p>XXX is your responsibility. I understand that YYY said he would do ZZZ, but you need to  roll up your sleeves and do whatever is necessary to get this finished. Can you XXX? If you don&#8217;t do it, I will and like I said, it&#8217;s no fun for me  when I have to do all the work.</p>
<p>There is no need to get stuck in the details of C#, XML, JavaScript,  etc., when you can just pick up the phone and call or email me. If you  haven&#8217;t figured it out yet, I am doing everything I can think of to make it easy to you to be successful. My guess is that you aren&#8217;t really  putting in the time. However, if you are really getting stuck on  programming details, that is just as bad when we both know you can can  just pick up the phone and call me any time day or night.</p></blockquote>
<p>These emails are tough to write and they take a lot of time, but I think it&#8217;s worth it. I didn&#8217;t put in all the gory details, but I think you can understand the idea that I&#8217;m trying to let the person know in as explicit terms as possible what it is that I want and that I&#8217;m willing to help them succeed. Firing somebody is a big deal and bringing somebody out of a slump is a really tough job. I think the &#8220;call me any time day or night&#8221; policy is important &#8211; often, challenges would not become major problems if the person had communicated.</p>
<p>Unfortunately, some people just can&#8217;t be saved. I&#8217;ve run into two situations that ended with people getting fired:</p>
<ul>
<li>The person is not capable of performing at a high enough level &#8211; some people really are just just not a good fit for your team. This is the toughest case because often the person is trying really hard. Now that you know the person better, if your company is big enough, maybe there is another position that better matches their capabilities.</li>
<li>The person is not willing to do what it takes. This situation is not fun either, but by the time you get to the 4th written notice, it should be obvious to everybody that things aren&#8217;t going to work out. Usually, the person has made some clear choice to miss a deadline without letting me know in advance.</li>
</ul>
<p>Firing somebody is tough, but it&#8217;s not the end of the world: Maybe your expectations are too high &#8211; if you&#8217;re a team leader, you&#8217;re probably a good bit above average &#8211; one way to learn is to fire and hire (a better way is to consult with others, but in small companies, this is not always possible). Or maybe the other person needs to do some soul searching. A nice, smart guy I hired once couldn&#8217;t perform. We went round and round about his lack of accomplishment (this was before I figured out the &#8220;3 strikes&#8221; policy). On a personal level, he was a great guy and I know he was having serious problems at home. I gave him as much slack as I could, but in the end I fired him. He actually called me a couple times afterwards. The first time was to let me know he was OK &#8211; he had found work and getting  fired had helped the home situation &#8211; it had been a wakeup call for his significant other. In the second call he told me that he was now leading a team and getting fired ended up being the best thing that could happened. Funny world.</p>
<h2>Summary</h2>
<p>Go ahead and hire your friends and have some fun at work. But:</p>
<ol>
<li>Take care of all money issues up front</li>
<li>Make sure you&#8217;re doing your part &#8211; set expectations clearly and ask/discover what you can do to help</li>
<li>Carefully wield the stick of employment by using a clear policy of written notices</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2009/12/12/hiring-your-friends/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoogleBase Troubleshooting</title>
		<link>http://blogs.teztech.com/2009/08/01/googlebase-troubleshooing</link>
		<comments>http://blogs.teztech.com/2009/08/01/googlebase-troubleshooing#comments</comments>
		<pubDate>Sat, 01 Aug 2009 15:16:13 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[OnlineStoreTech]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://teztech.com/?p=32</guid>
		<description><![CDATA[I just spent a large part of the last week troubleshooting a GoogleBase data feed. Question: Data Feed says 8660 of 8660 items inserted, but no Items (Active, Published or Inactive) pjtpj Level 1 7/27/09 We have written a program that generates and uploads a tab delimited data feed file. This program was working fine [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I just spent a large part of the last week troubleshooting a <a href="http://base.google.com/support/bin/answer.py?hl=en&amp;answer=58083">GoogleBase data feed</a>. <span id="more-32"></span></p>
<div class="wpcprqCSS" style="margin: 0px 0px 15px; padding: 0px; position: relative;">
<div style="margin: 0px; padding: 0px; position: relative;">
<h2 class="wpcpsCSS" style="padding: 6px 10px; background-color: #ebeff9; margin-top: 10px; margin-bottom: 12px;">
<table style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;" border="0" width="100%">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;" width="100%"><span class="wpcpspCSS" style="font-weight: bold; font-size: 14px;"><span id="v53d06588cea8cdae_csuid1_span"><span class="Apple-converted-space"> </span></span>Question:<span class="Apple-converted-space"> </span><span class="wpcpsdCSS" style="font-weight: normal;">Data Feed says 8660 of 8660 items inserted, but no Items (Active, Published or Inactive)</span></span></td>
</tr>
</tbody>
</table>
</h2>
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpqeCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/27/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">We have written a program that generates and uploads a tab delimited data feed file. This program was working fine for several months until around June 16. Starting around June 17, the program and the FTP upload has been working, but GoogleBase is not updating our GoogleBase items from the data feed file. We didn&#8217;t make any changes on our end and all required fields are in our data feed file. All our GoogleBase items eventually expired and were deleted last week.<span class="Apple-converted-space"> </span></p>
<p>Last Friday, I tried logging in to GoogleBase with my browser and manually uploading the data feed file. The data feed file was processed successfully, with a handful of the usual warnings and errors we always get (missing upc, encoding problems, missing discription). The missing UPC was a problem for all our products, but we only have 22 products with other errors. As before, I see the message &#8220;8622 of 8622 items inserted&#8221;, but I see no Items. Next, on Saturday, I tried adding a new Data Feed file. This time, the file got stuck &#8220;Processing&#8221; until today. Today, I finally got the error &#8220;Error: Internal server error while retrieving 9 # 0&#8243;. OK, so that is just some weird error.<span class="Apple-converted-space"> </span></p>
<p>Today, I changed our program to add UPCs where we have them and manually uploaded the data feed file again. I quickly got &#8220;8660 of 8660 items inserted &#8211; Processed on Jul 27, 2009 6:09 pm CST&#8221;, and the usual handful of warnings and errors (now I get some invalid UPC errors), but still I have no GoogleBase items.<span class="Apple-converted-space"> </span></p>
<p>I can manually add new Items and they become &#8220;Published and searchable&#8221;.</p>
<p>The Data Quality tab is basiclly empty (has information about the 1 item we created manually).<span class="Apple-converted-space"> </span></p>
<p>I tried creating a new GoogleBase account from scratch, but Google won&#8217;t let me create another account for the same web site (fair enough, I&#8217;m just trying to troubleshoot).<span class="Apple-converted-space"> </span></p>
<p>Any suggestions?</p>
</div>
</div>
</div>
</div>
<h3 id="wpcpfhd" class="wpcrbCSS" style="padding: 6px 10px; background: #ebeff9 none repeat scroll 0px 50%; font-weight: bold; font-size: 14px; margin-bottom: 12px; clear: both;">All answers</h3>
<div id="wpsf" style="margin: 0px; padding: 0px; position: relative;">
<div id="fid_53d06588cea8cdae00046fba92bbe208" class="wpcpraCSS" style="margin: 10px 0px 0px; padding: 0px; position: relative; border-top-style: none; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/27/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">I just received a large batch of data feed related emails. The one associated with the most recent data feed file upload says:</p>
<p>No items inserted<br />
Uploaded at: July 27, 2009 6:03:44 PM CST<br />
Processed at: July 27, 2009 6:09:30 PM CST</p>
<p>For more details on the status of your data feed, go to http://www.google.com/base/showfeedsummary?fid=1336756</p>
<p>When I click on the link, I get the same &#8220;8660 of 8660 items inserted &#8211; Processed on Jul 27, 2009 6:09 pm CST&#8221; page I&#8217;ve already seen.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fbb083eb68a" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="104490437722314418132-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/photos/public/AIbEiAIAAABDCNTPwuSSqs-oPiILdmNhcmRfcGhvdG8qKDdhOWY3ZGYzNzViOTI4ZTViZmM1OWJkZmJmYjViYWRjNjc3MTY5NDIwAfUYnj3Is12Zxk3YzmKRxOHc-SFm" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="104490437722314418132-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en">Celebird</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Top Contributor<br />
7/27/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">what&#8217;s your website-url, google-base display-name and account-id?<br />
has there ever been any disapproved messages seen within any account?</div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fbb7b46222b" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/27/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Website URL: http://www.mountainhighoutfitters.com<br />
Display name: Mountain High Outfitters<br />
Account ID: 2476386</p>
<p>No, we haven&#8217;t ever had any problems with disapproved items. There is one inactive/disapproved item right now &#8211; it&#8217;s the item with the title &#8220;Test Item 1&#8243; I created on Friday to see if I could manually add an item.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc44e52fc35" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="104490437722314418132-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/photos/public/AIbEiAIAAABDCNTPwuSSqs-oPiILdmNhcmRfcGhvdG8qKDdhOWY3ZGYzNzViOTI4ZTViZmM1OWJkZmJmYjViYWRjNjc3MTY5NDIwAfUYnj3Is12Zxk3YzmKRxOHc-SFm" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="104490437722314418132-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en">Celebird</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Top Contributor<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">first, check the &#8216;view errors and suggestions&#8217; page.</p>
<p>if there are no messages on the view-errors page &#8211;<br />
you would need to contact google-base directly here:<br />
<a style="color: #551a8b;" rel="nofollow" href="http://base.google.com/support/bin/request.py?contact_type=error&amp;ctx=direct" target="_blank">http://base.google.com/support/bin/request.py?contact_type=error&amp;ctx=direct</a></p>
</div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc4ecb6ccb2" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">There is nothing the &#8220;view errors and suggestions&#8221; that would suggest why we have no items. As I mentioned earlier, we do have problems on 22 of the 8660 products, but there is nothing I would consider critical and nothing we weren&#8217;t seeing a month ago.</p>
<p>Today, I fixed a problem with custom attribute names (we were including spaces). This problem was always there, but I figured fixing it was worth a try. My upload just finished processing and it hasn&#8217;t seemed to help&#8230; still no items.</p>
<p>As you suggested, I filled out a support request. Thanks.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc5ac9c6921" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=17206044014707673502&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=17206044014707673502&amp;hl=en">Kyle8</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Pjtpj / Celebird, I am experiencing exactly the same issue.  I upload our files and immediately get an email saying &#8216;No Items Inserted&#8217; but when I click into my dashboard it says &#8220;x of x&#8221; (etc.) inserted successfully for all data feeds.  Under errors/suggestions it says I am missing the weight attribute but that the weight attribute is not required and will affect the feed. <span class="Apple-converted-space"> </span></p>
<p>I have been experiencing this issue for over 2 weeks now.  I have been in contact with someone named Atanu at Google, &amp; have sent well over 7 replies to him.  He has been somewhat responsive but each time just responds with a canned response saying &#8220;our engineers are working on resolving this issue. We sincerely apologize for the inconvenience.&#8221;  As I&#8217;m sure is the case with you, this has had a significant impact on our traffic and sales.  Has anyone else who is experiencing this problem found a workaround or a more solid response from Google?</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc625735cde" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=02538955390801447050&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=02538955390801447050&amp;hl=en">eimaj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 2<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">We had the same issue &#8230; identical, but our feed is Atom 1.0</p>
<p>We are making progress having successfully processed only 100 out of 30000+ products.  Little by little, we are adding more the the new feed and going from there.</p>
<p>Here&#8217;s what we did (for Atom 1.0 feed):<br />
Having nothing to lose (our products expired as well), we deleted the feed file from Google Base dashboard<br />
Made sure no products showed in<span class="Apple-converted-space"> </span><a style="color: #551a8b;" rel="nofollow" href="http://www.google.com/base" target="_blank">www.google.com/base</a><span class="Apple-converted-space"> </span>by authorid and by site:<a style="color: #0000cc;" rel="nofollow" href="http://site.com/" target="_blank">site.com</a><span class="Apple-converted-space"> </span>search (count = 0)<br />
Added a new feed file in the Google Base dashboard having a new unique file name different than all others used before<br />
Created a new feed file having the exact content EXCEPT the //id was new, unique and different than all others used before &#8211; only having 2 products<br />
Made sure those 2 products showed in<span class="Apple-converted-space"> </span><a style="color: #551a8b;" rel="nofollow" href="http://www.google.com/base" target="_blank">www.google.com/base</a><span class="Apple-converted-space"> </span>by authorid and by site:<a style="color: #0000cc;" rel="nofollow" href="http://site.com/" target="_blank">site.com</a><span class="Apple-converted-space"> </span>search (count = 2)<br />
Attempt at all 30000+ in a file failed &#8230; looked like we were back to square one<br />
Attempt at 3000+ file failed &#8230; looked like we were still at square one<br />
Attempt at 100 file succeeded!  We excluded products we did not have UPC or placeholder images, CDATA&#8217;ed the //entry/product_type and shortened the //entry/title in this file as well<br />
We are at the point of progressively adding more products to the file trying to pinpoint the issue.</p>
<p>If anything is found, I will be more than happy to share the information. <span class="Apple-converted-space"> </span></p>
<p>~Jamie</p>
</div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc6837cc5fc" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en">cheapercigars</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">ditto to pjtpj. I am facing the same issues with our feed just like pjtpj.<br />
I have sent couple of emails to google.<br />
still waiting for an answer.<br />
lets hope its nothing serious.<br />
- Mel</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc714e276aa" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Thanks for all the replies. I haven&#8217;t heard anything back from Google, but I will post here when/if I figure anything out.<span class="Apple-converted-space"> </span></p>
<p>From the comments above, I suspect that the problem has something to do with the actual data in my data feed file. eimaj, maybe you can pinpoint the offending data via binary search: Divide the data in halves, then try to process each half separately. If one of the halves works, then divide the half that doesn&#8217;t work in halves (quarters of the original file) and try to process each new half separately and so on. This should at least be faster than trying 100 products at a time. Maybe something we added or updated around June 17 is causing the Google data feed file processing code to crash and/or reject all our items. Or maybe Google made some change to the code they use to process data feed files.<span class="Apple-converted-space"> </span></p>
<p>Here is the email I just got from today&#8217;s upload:<span class="Apple-converted-space"> </span></p>
<p>No items inserted<br />
Uploaded at: July 28, 2009 7:37:05 AM CST<br />
Processed at: July 28, 2009 8:10:40 AM CST</p>
<p>But, still, when I login to look at the data feed, I see &#8220;8660 of 8660 items inserted &#8211; Processed on Jul 28, 2009 8:10 am CST&#8221;.<span class="Apple-converted-space"> </span></p>
<p>This mismatch between the count of items inserted in the email and the web page is some kind of bug, but it doesn&#8217;t help point me to what is causing the problem. Just a little feedback from Google might go a long way&#8230;</p>
<p>Since others are reading this thread and having similar problems, I&#8217;m going to share some of my code and see if anybody else sees anything obviously wrong. Going with the theory that there is a problem in the data file, maybe there is a problem with the way I am encoding the file&#8217;s data fields. Here is the function I use to encode most data fields:</p>
<p>static char[] _quotedCharacters = new char[] { &#8216;\t&#8217;, &#8216;\r&#8217;, &#8216;\n&#8217;, &#8216;&#8221;&#8216; };</p>
<p>// GoogleBase specific rules<br />
// See http://base.google.com/support/bin/answer.py?answer=25200&amp;hl=en_US<br />
public string TsvQuote(string s)<br />
{<br />
if (s.IndexOfAny(_quotedCharacters) &gt;= 0)<br />
s = &#8220;\&#8221;&#8221; + s.Replace(&#8220;\&#8221;&#8221;, &#8220;\&#8221;\&#8221;&#8221;) + &#8220;\&#8221;&#8221;;</p>
<p>return s;<br />
}</p>
<p>Here is the header line from my data feed file:</p>
<p>description	id	upc	link	price	title	brand	product_type	image_link	weight	quantity	condition	color	size	c:frame_lens:string	c:flavor:string c:length:string	c:waist_x_inseam:string	c:zipper:string</p>
<p>We use our own categories for product_type. The way the values are input into the system, the users can&#8217;t enter in non-printable characters, so I just do a simple search and replace for double quotes:<span class="Apple-converted-space"> </span></p>
<p>StringBuilder categoryText = new StringBuilder(category.Name);</p>
<p>while (category.ParentCategoryID != null)<br />
{<br />
category = Category.FindCachedCategory(category.ParentCategoryID.Value);<br />
if (category == null)<br />
{<br />
categoryValid = false;<br />
return &#8220;&#8221;;<br />
}</p>
<p>categoryText.Insert(0, category.Name.Replace(&#8220;\&#8221;&#8221;, &#8220;&#8221;) + &#8221; &gt; &#8220;);<br />
}</p>
<p>return categoryText.ToString();</p>
<p>All the above code seemed reasonable at the time and was working OK until about June 16. OpenOffice has no problem parsing my file properly. I do have some HTML embedded into descriptions, and I&#8217;m not sure how GoogleBase treats that, but the HTML is not new.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc74c1bfc72" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Looking at my data feed file, I have a couple of ideas/thoughts:</p>
<p>1) I am worried about product_type. The GoogleBase specifications aren&#8217;t crystal clear&#8230; I coded up my best guess and it seemed to work, but maybe it really doesn&#8217;t. Here are some examples from my data feed file:</p>
<p>&#8220;Clothing &gt; Men&#8217;s Clothing &gt; Men&#8217;s Lifestyle Clothing &gt; Men&#8217;s Lifestyle Pants&#8221;<br />
&#8220;Accessories &gt; Gift Cards&#8221;,&#8221;Gift Ideas &gt; Gifts $50 &#8211; $74.99&#8243;,&#8221;Gift Ideas &gt; Graduation Gifts&#8221;<br />
&#8220;Accessories &gt; Gift Cards&#8221;,&#8221;Gift Ideas &gt; Gifts $75 &#8211; $100&#8243;,&#8221;Gift Ideas &gt; Graduation Gifts&#8221;<br />
&#8220;Accessories &gt; Gift Cards&#8221;,&#8221;Gift Ideas &gt; Gifts $100+&#8221;,&#8221;Gift Ideas &gt; Graduation Gifts&#8221;<br />
&#8220;Accessories &gt; Gift Cards&#8221;,&#8221;Gift Ideas &gt; Gifts $100+&#8221;<br />
&#8220;Gear &gt; Camping/Hiking &gt; Backpacks &gt; Fast and Light Packs&#8221;,&#8221;Gear &gt; Camping/Hiking &gt; Backpacks &gt; Weekend Packs&#8221;<br />
&#8220;Accessories &gt; Book Bags&#8221;,&#8221;Activities &gt; Adventure Travel &gt; Travel Gear &gt; Travel Packs&#8221;<br />
&#8220;Activities &gt; Adventure Travel &gt; Travel Gear &gt; Travel Packs&#8221;,&#8221;Gear &gt; Camping/Hiking &gt; Backpacks &gt; Day Packs&#8221;<br />
&#8220;Gear &gt; Camping/Hiking &gt; Backpacks &gt; Day Packs&#8221;,&#8221;Activities &gt; Adventure Travel &gt; Travel Gear &gt; Travel Packs&#8221;<br />
&#8220;Footwear &gt; Men&#8217;s Footwear &gt; Men&#8217;s Multisport Footwear&#8221;,&#8221;Activities &gt; Climb &gt; Climbing Shoes&#8221;,&#8221;Earth friendly Gear&#8221;<br />
&#8220;Clearance &gt; Winter Sale&#8221;,&#8221;Clothing &gt; Kid&#8217;s Clothing &gt; Kid&#8217;s Shirts&#8221;</p>
<p>As you can see, many of our products are in multiple categories / product_types and I believe we handle this correctly according to GoogleBase, but maybe somebody can see something I&#8217;m doing wrong.</p>
<p>2) I upload products with 0 quantity in stock. I know that these items are automatically deactivated, but that is what I want and it seems to be the most straightfoward way to make sure that products that go out of stock in our stores are removed/deactivated from GoogleBase.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc90adf924c" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en">cheapercigars</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">hello,<br />
today in the morning I read that it may be a possibility that the file size is too big.<br />
I read it in google help pages.<br />
So, I divided my feed into two parts.<br />
But no luck, the same thing happens. You can see the products being inserted but the email mentions that No Products Inserted. Also, when I checked the &#8220;data quality&#8221; tab, it does not show the new products.<br />
So, if any of you get around it, please let me know on the thread. I am watching it.<br />
Thanks<br />
Mel</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc97924ca96" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">OK, so I think I am starting to narrow down the problem. Based on the idea from eimaj, I only kept the first 291 items in my data feed and eventually got back this email:</p>
<p>278 of 291 items inserted<br />
Uploaded at: July 28, 2009 11:33:31 AM CST<br />
Processed at: July 28, 2009 11:46:58 AM CST</p>
<p>And now a couple of hours later, I finally have 273 items &#8220;Published&#8230; searchable soon&#8221;. Between character encoding errors in description or quantity = 0, the missing items can all be accounted for. So, the problem seems to be somewhere in the content of my other 8369 items&#8230; Item # 292 has some Word HTML garbage &#8211; my current theory is that the source of the problem is with the HTML in some of the descriptions. I have figured out that some HTML is OK, because tables and bullet lists seem to make it through. One idea is that if any of the descriptions contain certain tags (&lt;head&gt;, &lt;title&gt;, &lt;style&gt;, &lt;script&gt;, etc.), then some final stage of data feed processing crashes and the entire feed ends up in the bit bucket.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fc9c5fa87a3" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en">cheapercigars</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">hello pjtpj<br />
i understand that you had some &#8220;html code&#8221; in one of the line.<br />
but my feed is strictly text, tab deliminated.<br />
i did check it before posting this reply.<br />
any more inputs will be appreciated.<br />
I am just hoping that google might have fixed this issue (if there was something wrong with them to begin with)<br />
Thanks<br />
Mel</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fcb32eb3577" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=00191705658441976237&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=00191705658441976237&amp;hl=en">username6</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Did you try to submit data feed without custom attributes? We have exactly same problem. All items items just disappeared from active items tab.</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fcbab59d51e" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=11941621134947891910&amp;hl=en">cheapercigars</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/28/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">yes we did<br />
but we really get high rankings when we have custom attributes.<br />
I just heard from couple of good sources that FTP does not work.<br />
This time I have tried to schedule the feed and let google fetch by itself.<br />
lets see how this works.<br />
i&#8217;ll keep it posted<br />
Thanks<br />
Mel</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fd7cdbbb0a2" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/29/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">The 291 items that successfully processed yesterday had custom attributes. You can see the custom attribute I&#8217;m using in the header from my data feed file I posted above.</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fd9267048fb" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=17206044014707673502&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=17206044014707673502&amp;hl=en">Kyle8</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/29/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Cheapercigars, if it&#8217;s the FTP that you&#8217;ve been hearing is down, do you know if the API is working? Anyone using the API just fine?</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fdfc23dada6" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/29/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">This morning, I created and uploaded a data feed file that avoided any product that had &lt;head &lt;title &lt;style &lt;script or &lt;meta in its description. That did not work. Now I have taken that data feed file and broken it into 4 parts. I am processing all 4 parts right now. Maybe 1 or more part will succeed and help me pinpoint the source of the problem.</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046fef4f16c413" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/30/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Yesterday, I worked it down to a data feed file with only 9 items that causes the problem. I have tried 3 different possible guesses as to what in the file is causing the problem, but I haven&#8217;t figured it out yet.</p>
<p>This morning, I got a fairly generic email response from GoogleBase Support:</p>
<p>Thank you for your email. I have reviewed your Google Base account and the<br />
reason few items your file are failing is because your feed contains<br />
unsupported characters. For example, certain white space characters, such<br />
as tabs, may not process correctly and will result in a feed failure.<span class="Apple-converted-space"> </span></p>
<p>To correct this error, please remove all unsupported characters like HTML<br />
tags etc from your feed and upload your file again.</p>
<p>Please let me know if you have any further questions or concerns.</p>
<p>Unfortunately, this response was not helpful. I already knew about the &#8220;few items&#8221; and, as mentioned here, I have submitted multiple data feed files that don&#8217;t have any of these issues, but still fail to update my GoogleBase items.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046ff2a9aa4505" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/30/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">I have finally narrowed this problem down to just 1 product/item. Here is a copy of the data feed file that will not process successfully:</p>
<p>description	id	upc	link	price	title	brand	product_type	image_link	weight	quantity	condition	color	size	c:frame_lens:string	c:flavor:string c:length:string	c:waist_x_inseam:string	c:zipper:string<br />
&#8220;&lt;ul&gt;<br />
&lt;li&gt;A multipurpose rescue/rappel rope.&lt;/li&gt;<br />
&lt;li&gt;100% nylon low stretch static.&lt;/li&gt;<br />
&lt;li&gt;Uniform sheath coverage for durability and gear compatibility .&lt;/li&gt;<br />
&lt;li&gt;Ideal for heavy duty alpine, big wall, and expedition fixing and haul lines.&lt;/li&gt;<br />
&lt;li&gt;Great for mountain rescue and industrial rope access.&lt;/li&gt;<br />
&lt;li&gt;Certified to NFPA 1983, 2006 edition for Life Safety Rope forlight use.&lt;/li&gt;<br />
&lt;/ul&gt;&#8221;	9995	 http://www.mountainhighoutfitters.com/Products/SuperStatic+7%252f16%2522+-+300ft.html	255.00	&#8220;Sterling Rope SuperStatic 7/16&#8243;&#8221; &#8211; 300ft&#8221;	Sterling Rope	&#8220;&#8221;&#8221;Gear &gt; Climbing &gt; Rope/Cord/Webbing&#8221;&#8221;&#8221;	http://mhoimages1-1.teztech.com/Products/7662.jpg	8.00 pounds 1	new</p>
<p>My current theory is that it is the URL that is tripping it up. This URL is valid (works in IE, FF and Chrome), but it does contain URL encoded characters ( / and &#8221; ) that could cause problems if unescaped. The other interesting thing about this product is that it was added to our database 14 May 2007, so it was working OK at some point (we were able to upload all our products to GoogleBase successfully in the past).</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046ff4276e7a0d" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="104490437722314418132-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/photos/public/AIbEiAIAAABDCNTPwuSSqs-oPiILdmNhcmRfcGhvdG8qKDdhOWY3ZGYzNzViOTI4ZTViZmM1OWJkZmJmYjViYWRjNjc3MTY5NDIwAfUYnj3Is12Zxk3YzmKRxOHc-SFm" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="104490437722314418132-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en">Celebird</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Top Contributor<br />
7/30/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">i would not include any html.</div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046ff8d5a2923a" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">I made a mistake in my last post. Actually, that data feed file in that post, even with the HTML and complex URL will process OK. Here is the file that will not process successfully:</p>
<p>description	id	upc	link	price	title	brand	product_type	image_link	weight	quantity	condition	color	size	c:frame_lens:string	c:flavor:string c:length:string	c:waist_x_inseam:string	c:zipper:string<br />
The Nose in a day, dogging your project for the painful 20th day, and everything in between, this 10.4mm rope handles all ends of the spectrum. Lightweight, it will never slow you down for a second and will always return day after day to handle the abuse your projects dish out. 39705	 http://www.mountainhighoutfitters.com/Products/Marathon+Sport+70m.html	224.00	Sterling Rope Marathon Sport 70m &#8211; 70m Sterling Rope	&#8220;&#8221;&#8221;Gear &gt; Climbing &gt; Rope/Cord/Webbing&#8221;&#8221;&#8221;	http://mhoimages1-2.teztech.com/Products/7661.jpg	7.00 pounds	2	new	 70m</p>
<p>There are no double quotes around the description because it shouldn&#8217;t need them.</p>
<p>I am going to submit this file again right now just to be sure.</p>
<p>PJ</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046ff930b1bba1" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="104490437722314418132-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/photos/public/AIbEiAIAAABDCNTPwuSSqs-oPiILdmNhcmRfcGhvdG8qKDdhOWY3ZGYzNzViOTI4ZTViZmM1OWJkZmJmYjViYWRjNjc3MTY5NDIwAfUYnj3Is12Zxk3YzmKRxOHc-SFm" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="104490437722314418132-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en">Celebird</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Top Contributor<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">not including html was more a policy recommendation not about formatting &#8211;<br />
but html can cause formatting issues as well so isn&#8217;t recommend at all.</p>
<p>quotes cannot be determined to be &#8220;needed&#8221; or &#8220;not needed&#8221;<br />
without knowing what the quoted-fields setting is for the feed &#8211;<br />
each feed can be set differently and effect quotation requirements.</p>
<p>without a url link to the file and knowing the settings for the registered-feed<br />
the copy-and-paste does not reflect what google-base is doing with the file &#8211;<br />
the same is true for issues such as encoding.</p>
<p>also, currently, only one product_type value is supported in tab-delimited feeds.</p>
</div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046ff9933cb33b" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">I haven&#8217;t seen anything that says if HTML is allowed or not. I have noticed that HTML seems to be stripped from my data feed, but is allowed for manually submitted items. I have not noticed that HTML prevents items from getting posted (or, as in my case, causes some internal problem with data feed file processing).</p>
<p>Tab and comma delimited files existed long before Google decided to allow their use for data feed files. My understanding has always been that, in these types of files, a field &#8220;needs&#8221; to have quotes around it if it contains the delimiter character or line feed. Here is what Google has to say about this subject: http://base.google.com/support/bin/answer.py?hl=en_US&amp;answer=25200. It is not explained how the use of quotes interacts with the  &#8220;Use Quoted Fields&#8221; setting, but I always set this to &#8220;Yes&#8221; under the assumption that &#8220;Yes&#8221; allows the use of quotes around fields (but does not require it). I have many successful runs that use the code I posted above, so I think, at least to some degree, GoogleBase also understands that fields within a tab delimited file may or may not have quotes around them, depending on if they are &#8220;needed&#8221; or not.<span class="Apple-converted-space"> </span></p>
<p>I am still working on this (and just hoping that maybe somebody else sees something obvious)&#8230; if I find out for sure that the data feed file I&#8217;m working on now with just a single product is causing the problem, then I will post the file for downloading. Here are the settings I use for all my data feeds:<span class="Apple-converted-space"> </span><br />
Feed format: googlebase, File format: text, Encoding: autodetect (detected as UTF-8), Delimiter: tab, Use Quoted Fields: Yes</p>
<p>Where did you read that only one product_type value is supported in tab-delimited feeds? This page seems to suggest that you can have more than one: http://base.google.com/support/bin/answer.py?hl=en&amp;answer=66818. Looking at the raw data feed file and some items that have gotten through, I figured out that I probably need to quote the comma separated product_type values individually rather than trying to quote the entire field (right now, all my product_type values end up with double-quotes around them). But this is a minor problem and I am failure sure it&#8217;s not the cause of whatever is keeping my big file from getting processed.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00046ff9e78ac031" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="104490437722314418132-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/photos/public/AIbEiAIAAABDCNTPwuSSqs-oPiILdmNhcmRfcGhvdG8qKDdhOWY3ZGYzNzViOTI4ZTViZmM1OWJkZmJmYjViYWRjNjc3MTY5NDIwAfUYnj3Is12Zxk3YzmKRxOHc-SFm" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="104490437722314418132-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en">Celebird</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Top Contributor<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">i wouldn&#8217;t include any html in feeds.</p>
<p>google-base feed quotes exist within the context of<br />
feed settings apart from any tab-delimited standards.</p>
<p>i believe use-quoted-fields set to &#8220;no&#8221; has always meant<br />
to turn-off the feature so quotations will be seen as part<br />
of the value &#8212; set to &#8220;yes&#8221; the feature is operational so<br />
quotations will be used as a field delimiter, not a value.</p>
<p>also, length is a google-base defined attribute so<br />
probably shouldn&#8217;t be redefined as a custom-attribute.</p>
<p>what exactly does the &#8216;view errors and suggestions&#8217; page display?</p>
<p>understood about the help information and the product_type attribute &#8212; see also:<br />
<a style="color: #551a8b;" rel="nofollow" href="http://www.google.com/support/forum/p/base/thread?tid=476189d91e13bdaa&amp;hl=en" target="_blank">http://www.google.com/support/forum/p/base/thread?tid=476189d91e13bdaa&amp;hl=en</a><br />
<a style="color: #551a8b;" rel="nofollow" href="http://www.google.com/support/forum/p/base/thread?tid=77a9e517542cee97&amp;hl=en" target="_blank">http://www.google.com/support/forum/p/base/thread?tid=77a9e517542cee97&amp;hl=en</a></p>
</div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae0004700209b85ae0" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">I&#8217;ve uploaded the same file (with only one product) twice in a row now with the same problem occurring, so I think I have it down to a repeatable test case. Here is a link to the file: http://teztech.com/files/GoogleBaseProducts4F1.txt. I uploaded the file in binary mode to make sure it was the same as what I am uploading to Google. After I upload the file and it is processed, here is what GoogleBase says when I login:</p>
<p>1 of 1 items inserted &#8211; Processed on Jul 31, 2009 7:20 am CST<span class="Apple-converted-space"> </span><br />
Detected encoding: US-ASCII<span class="Apple-converted-space"> </span><br />
Detected delimiter: Tab (\t)<span class="Apple-converted-space"> </span><br />
Detected file format: Text<span class="Apple-converted-space"> </span><br />
Feed Level Messages<br />
Warning: Missing recommended attribute: upc<br />
While items missing recommended attributes will process successfully, we recommend including relevant attributes if they are available.</p>
<p>And here is what the email from GoogleBase says:</p>
<p>No items inserted<br />
Uploaded at: July 31, 2009 6:33:37 AM CST<br />
Processed at: July 31, 2009 7:20:04 AM CST</p>
<p>The &#8220;No items inserted&#8221; email is how I determine that &#8220;the problem&#8221; has occurred. I have also noticed that it takes a relatively long time to process these files. I&#8217;m sure they go into a queue and the processing time depends on how busy the GoogleBase data feed servers are, etc., but I&#8217;ve been processing these files manually for 5 days in a row and I think an hour to process a 1 product data feed file is longer than usual.</p>
<p>The GoogleBase data feed documentation explains how to create tab delimited files by hand in Excel and OpenOffice Calc, so I would assume that, at least to some degree, the GoogleBase programmers had the output of these programs in mind when they created their import code.<span class="Apple-converted-space"> </span></p>
<p>Celebird, I agree that &#8220;length&#8221; probably shouldn&#8217;t be a custom attribute. Thanks for the second pair of eyes. I&#8217;m going to try making some changes to length and see what happens. Interestingly, the length in my data feed is the length of the product (a rope in this case) and not the length of the shipped package. I wonder which one Google means by &#8220;length&#8221;? If they can use length to calculate shipping charges, then it is the length of the shipped package. I&#8217;ll try and research this.</p>
<p>Thanks for the pointers to the product_type threads. I just received an email with &#8220;Our engineers are aware of this problem and are working to resolve it.&#8221; on my issue, so, unfortunately, this seems to be some kind of standard response.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00047006ee454f9d" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div class="wpcpiiCSS" style="margin: 0px 0px 10px; padding: 0px; position: relative;"><span class="wpcpscCSS" style="font-weight: bold;">1 person<span class="Apple-converted-space"> </span></span>says this answers the question:</div>
<p>Changing the name of my length field from c:length:string to c:product_length:string allowed the file with 1 product to be successfully processed. Now let&#8217;s see if I can process a real data feed file.</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae000470083e0958de" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=01760214187945953974&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=01760214187945953974&amp;hl=en">ajj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
7/31/09</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Hi, in case the products are still not showing try this:  I see you&#8217;re using multiple categories &#8211; hence the reason for my recommendation:</p>
<p>1. On the google base dashboard, click My items tab.  Then click Data feeds.  Next click the edit link adjacent to you data feed file so you can set or verify the base configuration.</p>
<p>2. You should be in the &#8220;Edit Data Feed&#8221; screen at this stage.  Verify the following (or adjust to have them)</p>
<p>File format:                     Text<br />
Encoding:                       Autodetect<br />
Delimiter:                        Tab<br />
Use Quoted Fields:          No</p>
<p>Note, the last item should a No and NOT Yes in your case.  Then resubmit.  Hope this helps</p>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00047015ad1c1f83" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="http://teztech.com/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
10:51 AM</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">Here is the source of my problem: GoogleBase processing crashes when I have a custom attribute named &#8220;c:length:string&#8221; and a value of &#8220;70m&#8221; (I assume other non-empty values cause problems as well). I changed my custom attribute name to &#8220;c:product_length:string&#8221; and now, the email I just got back from Google says: &#8220;8584 of 8606 items inserted&#8221;.</p>
<p>Some might say that this was an obvious problem, but our Internet store allows our end users to create their own attribute groups (color, size, style, etc.). When we create a data feed file, there is some code that matches our attribute groups to standard Google attributes (color, size). If there is not a match, then we automatically create a custom attribute for GoogleBase. In our case, &#8220;length&#8221; in our data base is the product length, not the shipping length, so using a custom attribute actually make sense.<span class="Apple-converted-space"> </span></p>
<p>In addition, I ran into other issues that caused a simple problem like this to take an entire week to work out:</p>
<p>- Even though GoogleBase processing was failing, the data feed message on the web site said &#8220;8660 of 8660 items inserted&#8221;. The GoogleBase data feed processing code was crashing on my data feed file, but apparently GoogleBase doesn&#8217;t code in place to trap these types of errors and provide useful diagnostics to outsiders like me.<span class="Apple-converted-space"> </span><br />
- In my 8660 product data feed file, only a few products caused the problem and there was no easy way to narrow down the source of the problem. I had to manually divide my file into parts, submit the parts manually, then wait on the &#8220;success&#8221; emails to arrive, then rinse and repeat.<br />
- There was nobody at GoogleBase support with the willingness or ability (not sure which) to help me troubleshoot this issue.<span class="Apple-converted-space"> </span><br />
- Documentation for data feeds is just vague and wrong enough to keep you guessing. The biggest documentation issue I see right now is with product_type and how it interacts with the Use Quoted Fields setting.<span class="Apple-converted-space"> </span></p>
<p>If you run into a similar problem, the first step is to make sure you are getting all the data feed emails. Only the email said &#8220;No items inserted&#8221;. Next, you must isolate the data that is causing the problem. I assume my problem with a custom attribute named &#8220;c:length:string&#8221; is pretty specific, but the technique I ended up using to isolate it is general (if slow and painful).</p>
</div>
</div>
</div>
</div>
<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px;"></p>
<div id="fid_53d06588cea8cdae0004701643dbde85" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="104490437722314418132-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/photos/public/AIbEiAIAAABDCNTPwuSSqs-oPiILdmNhcmRfcGhvdG8qKDdhOWY3ZGYzNzViOTI4ZTViZmM1OWJkZmJmYjViYWRjNjc3MTY5NDIwAfUYnj3Is12Zxk3YzmKRxOHc-SFm" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="104490437722314418132-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="/support/forum/p/base/user?userid=00988589074649750261&amp;hl=en">Celebird</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Top Contributor<br />
11:33 AM</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">
<div style="margin: 0px; padding: 0px; position: relative;" dir="ltr">these are many of the same similar reasons why it seemed a good idea<br />
to write a feed validation checker with an ever expanding set of checks &#8211;<br />
<a style="color: #0000cc;" rel="nofollow" href="http://celebird.googlepages.com/ckbase.htm" target="_blank">http://celebird.googlepages.com/ckbase.htm</a></p>
<p>also, 70m is proabably an invalid standard-length value &#8212; a valid length would be 70 m</p>
<p>&#8220;standard&#8221; attributes can be google-defined attributes but<br />
are in the context of an item-type; not all defined-attributes<br />
are allowed or are valid within the context of an item-type &#8211;<br />
an obvious example is location; item-type requirements are<br />
well-defined and i believe must be taken into account if any<br />
private-code is creating the final set of attributes and values.</p>
<p>google-base processing has always been more simple counts<br />
and basic formatting rather than robust validation; this is most<br />
evident with respect to encoding, quoted-attributes and other<br />
per-feed features &#8212; i believe this is one reason why the feed&#8217;s<br />
suggestions feature was introduced.</p></div>
</div>
</div>
</div>
<div id="fid_53d06588cea8cdae00047016c8108526" class="wpcpraCSS" style="border-top: 1px solid #ebeff9; margin: 10px 0px 0px; padding: 10px 0px 0px; position: relative; clear: both;">
<div class="wpcppCSS" style="margin: 0px; padding: 0px 0px 0px 10px; position: relative;">
<div class="wpcpwraCSS" style="margin: 0px; padding: 0px; position: relative;">
<table class="wpcpanCSS" style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; width: 160px; float: left;" border="0">
<tbody style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<tr style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px;">
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;" width="32"><span id="0-focus-hover" class="focus-hover"><a style="color: #0000cc;" href="/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en"><img class="fiCSS" style="border-style: none; display: inline; vertical-align: top; padding-right: 5px;" src="http://www.google.com/s2/static/images/NoPicture.gif" border="0" alt="" width="32" height="32" /></a></span></td>
<td style="margin: 0px; padding: 0px; position: relative; border-collapse: collapse; font-size: 13px; vertical-align: top;">
<div class="wpcpddCSS" style="margin: 0px; padding: 0px; overflow: hidden; position: relative; width: 120px;"><span id="0-focus-hover" class="focus-hover"><a class="lCSS" style="color: #7777cc;" href="/support/forum/p/base/user?userid=08580287527401879389&amp;hl=en">pjtpj</a></span></p>
<div class="wpcphdCSS" style="margin: 2px 0px 0px; padding: 0px; position: relative; color: gray; font-weight: normal; font-size: 11px;">Level 1<br />
12:10 PM</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="wpcpdCSS" style="margin: 0px 0px 0px 165px; padding: 0px; position: relative; min-height: 45px;">GoogleBase actually does an OK job of identifying some problems (with the suggestions feature). If GoogleBase would catch and report errors like mine that cause a complete crash (I assume) and include the data feed file line number at the time of the crash, that would be a big help.<span class="Apple-converted-space"> </span></p>
<p>Celebird, I appreciate the effort on both the checker and on this thread -it was your comment that led me to the solution. I didn&#8217;t know about your checker. I just now submitted my test file (http://teztech.com/files/GoogleBaseProducts4F1.txt) and it passed with warnings. You could add a test to check for custom attributes with the names of standard attributes. That test file also has lots of quotes within the product_type field&#8230; from my own tests and comments from others, it looks like if you want to use multiple categories, then you have to set &#8220;Use Quoted Fields&#8221; to &#8220;No&#8221; (which then won&#8217;t allow newline characters in the description because you can&#8217;t use quotes to delimit a field). You could add a check for this as well, but actually, I hope GoogleBase cleans up their act on defining and parsing this field. XML is such a waste, I really don&#8217;t want to switch file formats just for this, but I also admit that text files have their own problems.</p>
<p>Yes, it&#8217;s possible that &#8220;70 m&#8221; vs. &#8220;70m&#8221; could have fixed the problem as well. On my side, &#8220;length&#8221; is a attribute group defined by my customers and the values entered are free text strings (which makes sense for rock climbing ropes that come in 50m, 60m and 70m), so the safest course for me was to rename the field. At some point, I plan to add support for dimensional shipping. When I do that,I&#8217;ll go back and figure out what Google means by &#8220;length&#8221; and rework things accordingly.</p></div>
</div>
</div>
<p></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2009/08/01/googlebase-troubleshooing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Service for Document Conversion &#8211; an Odyssey</title>
		<link>http://blogs.teztech.com/2009/06/28/web-service-for-document-conversion-an-odyssey</link>
		<comments>http://blogs.teztech.com/2009/06/28/web-service-for-document-conversion-an-odyssey#comments</comments>
		<pubDate>Sun, 28 Jun 2009 18:02:25 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[T3city]]></category>

		<guid isPermaLink="false">http://teztech.com/?p=28</guid>
		<description><![CDATA[A couple of years ago, I needed a way to convert Microsoft Word documents to Pdf from a C# program. The application I was working on processed hundreds of documents and was run by the system scheduler every day at around 3am, so manual conversion was not an option. I wasn&#8217;t in control of the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://teztech.com/wp-content/uploads/2009/06/convertdemopdf.png"></a><a href="http://teztech.com/wp-content/uploads/2009/06/convertdemo.png"></a>A couple of years ago, I needed a way to convert Microsoft Word documents to Pdf from a C# program. The application I was working on processed hundreds of documents and was run by the system scheduler every day at around 3am, so manual conversion was not an option. I wasn&#8217;t in control of the source documents, so I had to accept the documents the way they were given to me. I needed to do additional processing on the documents, so I wanted to convert them into a universal format. I already had a <a href="http://itextsharp.sourceforge.net/">good library for reading Pdf files</a>.  After researching my options, I settled on using <a href="http://www.openoffice.org/">OpenOffice</a> to do the conversion. OpenOffice has a pretty good Word filter, the ability to create Pdfs and an automation interface accessible to all .Net languages, including C#, so it was a good fit. I know there are commercial solutions and ways to automate Microsoft Office, but the OpenOffice solution was free and fairly easy to use.</p>
<p>Recently, I upgraded my development system from OpenOffice 2.x to OpenOffice 3.1. I can&#8217;t remember now the main reason I upgraded, but I was looking forward to being able to add the ability to convert docx to pdf (Office Open XML support was added in OpenOffice 3.x). I figured the upgrade might require some minor changes to my document conversion code, but it turned out not to be so simple.<br />
<span id="more-28"></span></p>
<p style="text-align: center;"><a href="http://teztech.com/wp-content/uploads/2009/06/convertdemosmall.png"><img class="alignnone size-medium wp-image-31" title="Conversion Server Demo" src="http://teztech.com/wp-content/uploads/2009/06/convertdemosmall-300x196.png" alt="Conversion Server Demo" width="300" height="196" /></a><a href="http://teztech.com/wp-content/uploads/2009/06/convertdemopdf.png"><img class="alignnone size-medium wp-image-30" title="Converted Pdf" src="http://teztech.com/wp-content/uploads/2009/06/convertdemopdf-300x228.png" alt="" width="300" height="228" /></a></p>
<p>The first problem was that OpenOffice no longer showed up under &#8220;Add Reference&#8221; in Visual Studio. After some Google searches, I finally <a href="http://blog.nkadesign.com/2008/net-working-with-openoffice-3/">stumbled across a solution</a>.  OK, wow, digging though install cab files for DLLs, hacking the registry and manipulating the PATH is ugly, but it worked &#8211; at least once. Almost as soon as my test program ran successfully, Visual Studio locked up. The only way to get control back was to kill the Visual Studio process, then restart it. Every time I opened the solution file, after just a few seconds, Visual Studio would lock up again. Removing every trace of the OpenOffice DLL references would prevent the lockups, but without OpenOffice, I could not convert documents. I eventually figured out that the problem was that the library project that used OpenOffice was also included in my web site project. Because the web site uses the library, too, the OpenOffice reference is automatically copied to the web site project. Normally, this would be no big deal &#8211; just a couple of small DLL files in the web site bin folder that would not be used &#8211; but in this case, Visual Studio could not successfully build the web site project as long as the OpenOffice DLLs were referenced.</p>
<p>Now that using OpenOffice was no longer as simple as &#8220;Add Reference&#8221;, it was time to take a look at a way to decouple my application from the OpenOffice DLLs. The API my application needs is pretty simple: Given the bytes of a file in Doc (or .docx) format, return the bytes of the file in Pdf format. Also, there are security risks whenever you open a file in a complicated piece of software like OpenOffice. These two facts pointed me to turning the Pdf conversion into a web service. The client application and web service can be partitioned across computers, so, if I wanted to, I could run the Pdf conversion service on a virtual machine with its own install of OpenOffice and tight security and resource control. The web service API didn&#8217;t need fancy XML: Clients could post the Doc file via a standard HTTP MIME encoded form. The result would be a the PDF byte stream returned via HTTP. This would make the service easy to develop, test and use from clients on many platforms.</p>
<p>I typically develop my large web based applications in C# and Asp.Net. However, for small services like document conversion, I often use PHP. Simple PHP applications can be just a file or two and I can move a PHP based service over to any web server that supports PHP. So, my first attempt at a document conversion service was written in PHP and used the OpenOffice COM API. Using my earlier OpenOffice API code as a guide and some PHP sample code I found on the web, I was able to quickly create a command line PHP application that could perform Pdf conversions. With this proof of concept working, I coded up the PHP web service. But the web service wouldn&#8217;t work. I could see in Task Manager that the OpenOffice executables were launched, but any code running under the web server that tried to access the OpenOffice COM objects would freeze up.</p>
<p>I spent a lot of time trying different security settings for various files and DCOM. I even tried creating a dedicated user and configuring DCOM to run OpenOffice as the dedicated user when the OpenOffice COM objects were activated. I changed Windows event log settings to log all security violations. Nothing would work and I couldn&#8217;t see anything useful in Event Viewer. I tried coding up a simple Asp.Net application and got the same results under the .Net OpenOffice API. Under both PHP/COM and C#/.Net, OpenOffice could be automated by a command line program but would not run under IIS. Right now, I develop on Vista and deploy to Windows Server 2008, so one might think the problem was trying to use IIS 7, but OpenOffice 2 didn&#8217;t have similar problems.</p>
<p>Finally, I gave up trying to run OpenOffice directly under IIS. The problem was either some type of security issue or that OpenOffice was trying to pop up registration dialogs. In Windows, the simple way to run a program under a given user account is to run the program as a Windows Service. It turns out that it is <a href="http://www.codeproject.com/KB/system/WindowsService.aspx">pretty easy to create a Windows Service in C#</a>. The basic idea I came up is was:</p>
<ol>
<li>Install OpenOffice</li>
<li>Create a Windows user account dedicated to Pdf conversion.</li>
<li>Login as the Pdf conversion user and make sure that OpenOffice opens without prompting for registration, crash feedback, etc. (I suspect that the reason OpenOffice 3 won&#8217;t run properly under IIS is that it is prompting the user to register).</li>
<li>Create a Windows Service with a simple API to convert documents</li>
<li>Install the Windows Service and configure it to run as Pdf conversion user</li>
<li>Access the Windows Service from my document conversion Web Service</li>
</ol>
<p>Here is how the API calls flow: <em>Application -&gt; Web Service -&gt; Windows Service</em></p>
<p>As I mentioned earlier, the API between the application and the web service was standard a HTTP Post. Between the Web Service and the Windows Service, I originally planned to use a simple, proprietary TCP/IP protocol. As long as you aren&#8217;t try to get too fancy coding thread pools and asynchronous I/O, at least in C/C++, it&#8217;s pretty easy to open a TCP socket and communicate between client and server with a line oriented protocol (like HTTP, POP3, SMTP, etc.). But, since both the Web Service and the Windows Service were going to run on Windows (at least for now), I decided to take a look at .Net Remoting. The .Net remoting solution was easy to code and use so I ended up sticking with it.</p>
<p>Below is some code to show you how everything fits together:</p>
<p>The C# interface <em>IConverter</em> is compiled into a DLL. The DLL is referenced by the client (Web Service) and server (Windows Service).</p>
<p><!-- BEGIN IConverter --></p>
<pre class="csharpcode">
    <span class="kwrd">public</span> <span class="kwrd">class</span> ConverterEndpoints
    {
        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">int</span>    Port = 7047;
        <span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">string</span> Uri  = <span class="str">"DocumentToPdf"</span>;
    }

    <span class="kwrd">public</span> <span class="kwrd">interface</span> IConverter
    {
        <span class="kwrd">void</span> Convert(<span class="kwrd">string</span> srcDocument, <span class="kwrd">string</span> destPdf);
    }
</pre>
<p><!-- END IConverter --></p>
<p>The class <em>ConverterEndpoints</em> holds a couple of constants that the client and server use to setup the TCP port and service name. The code below demonstrates how <em>ConverterEndpoints</em> is used in the Windows Service. I&#8217;ve included code for the entire class so you can see how easy it is to program a Windows Service and access the Windows Event Log in C# &#8211; no 3rd party libraries are required.</p>
<p>The original version of this interface passed the files as simple byte[] variables. Theoretically, the files never need to be written to disk (input and output is via HTTP). But, I found that I could easily pass small byte[] variables across .Net remoting but large byte[] variables failed. Since the Web Service and the Windows Service run on the same machine and the file has to be written to disk for OpenOffice to do the conversion, I settled for creating temporary files and passing the names of the files between the Web Service and Windows Service.</p>
<p><!-- BEGIN WindowsService --></p>
<pre class="csharpcode">
   <span class="kwrd">class</span> WindowsService : ServiceBase
    {
        <span class="kwrd">protected</span> EventLog _log;
        <span class="kwrd">protected</span> TcpChannel _channel;

        <span class="kwrd">public</span> WindowsService()
        {
            ServiceName = <span class="str">"Teztech Document Conversion"</span>;
            EventLog.Source = <span class="str">"Teztech Document Conversion"</span>;
            EventLog.Log = <span class="str">"Application"</span>;
            
            <span class="rem">// These Flags set whether or not to handle that specific</span>
            <span class="rem">//  type of event. Set to true if you need it, false otherwise.</span>
            CanHandlePowerEvent = <span class="kwrd">false</span>;
            CanHandleSessionChangeEvent = <span class="kwrd">false</span>;
            CanPauseAndContinue = <span class="kwrd">true</span>;
            CanShutdown = <span class="kwrd">true</span>;
            CanStop = <span class="kwrd">true</span>;

            <span class="kwrd">if</span> (!EventLog.SourceExists(<span class="str">"Teztech Document Conversion"</span>))
                EventLog.CreateEventSource(<span class="str">"Teztech Document Conversion"</span>, <span class="str">"Application"</span>);

            _log = <span class="kwrd">new</span> EventLog();
            _log.Source = <span class="str">"Teztech Document Conversion"</span>;

            _channel = <span class="kwrd">new</span> TcpChannel(ConvertInterface.ConverterEndpoints.Port);
            ChannelServices.RegisterChannel(_channel, <span class="kwrd">false</span>);

            RemotingConfiguration.RegisterWellKnownServiceType(<span class="kwrd">typeof</span>(DocumentToPdf), ConvertInterface.ConverterEndpoints.Uri, WellKnownObjectMode.Singleton);
        }

        <span class="kwrd">static</span> <span class="kwrd">void</span> Main()
        {
            ServiceBase.Run(<span class="kwrd">new</span> WindowsService());
        }

        <span class="rem">/// &lt;summary&gt;</span>
        <span class="rem">/// Dispose of objects that need it here.</span>
        <span class="rem">/// &lt;/summary&gt;</span>
        <span class="rem">/// &lt;param name="disposing"&gt;Whether or not disposing is going on.&lt;/param&gt;</span>
        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Dispose(<span class="kwrd">bool</span> disposing)
        {
            <span class="kwrd">base</span>.Dispose(disposing);
        }

        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnStart(<span class="kwrd">string</span>[] args)
        {
            _log.WriteEntry(<span class="str">"Service Starting"</span>);

            _channel.StartListening(<span class="kwrd">null</span>);

            <span class="kwrd">base</span>.OnStart(args);

            _log.WriteEntry(<span class="str">"Service Running"</span>);
        }

        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnStop()
        {
            _log.WriteEntry(<span class="str">"Service Stopping"</span>);

            _channel.StopListening(<span class="kwrd">null</span>);

            <span class="kwrd">base</span>.OnStop();
        }

        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnPause()
        {
            _channel.StopListening(<span class="kwrd">null</span>);
            <span class="kwrd">base</span>.OnPause();
        }

        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnContinue()
        {
            _channel.StartListening(<span class="kwrd">null</span>);
            <span class="kwrd">base</span>.OnContinue();
        }
    }
</pre>
<p><!-- END WindowsService --></p>
<p>Below is the code behind file for the Web Service client. As you can see, .Net makes this type of Web Service easy to create.</p>
<p><!-- BEGIN PdfCodeBehind --></p>
<pre class="csharpcode">
<span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> Pdf : System.Web.UI.Page
{
    <span class="kwrd">protected</span> TcpChannel _channel;

    <span class="kwrd">protected</span> <span class="kwrd">void</span> Page_Load(<span class="kwrd">object</span> sender, EventArgs e)
    {
        <span class="kwrd">try</span>
        {
            <span class="kwrd">if</span> (Request[<span class="str">"Username"</span>] == <span class="kwrd">null</span> || Request[<span class="str">"Password"</span>] == <span class="kwrd">null</span>)
                <span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"Username and Password are required"</span>);

            HttpPostedFile postedFile = Request.Files[<span class="str">"InputFile"</span>];
            <span class="kwrd">if</span> (postedFile == <span class="kwrd">null</span> || postedFile.FileName == <span class="kwrd">null</span> || postedFile.FileName == <span class="str">""</span>)
                <span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"InputFile was not supplied or file name is empty."</span>);

            <span class="kwrd">string</span> inputFileExtension = Path.GetExtension(postedFile.FileName);
            <span class="kwrd">if</span> (inputFileExtension.Length &lt; 2)
                <span class="kwrd">throw</span> <span class="kwrd">new</span> ApplicationException(<span class="str">"InputFile does not have a valid file name extension."</span>);
            inputFileExtension = inputFileExtension.Substring(1);

            <span class="kwrd">string</span> outputFileName = Request[<span class="str">"OutputFileName"</span>];
            <span class="kwrd">if</span> (outputFileName == <span class="kwrd">null</span> || outputFileName == <span class="str">""</span>)
                outputFileName = Path.GetFileNameWithoutExtension(postedFile.FileName) + <span class="str">".pdf"</span>;

            DbRequest.CheckAuthorization(Request[<span class="str">"Username"</span>], Request[<span class="str">"Password"</span>]);

            <span class="kwrd">if</span> (_channel == <span class="kwrd">null</span>)
            {
                Dictionary&lt;<span class="kwrd">string</span>, <span class="kwrd">string</span>&gt; channelProperties = <span class="kwrd">new</span> Dictionary&lt;<span class="kwrd">string</span>,<span class="kwrd">string</span>&gt;();
                channelProperties[<span class="str">"name"</span>] = <span class="str">""</span>;
                _channel = <span class="kwrd">new</span> TcpChannel(channelProperties, <span class="kwrd">null</span>, <span class="kwrd">null</span>);
                ChannelServices.RegisterChannel(_channel, <span class="kwrd">false</span>);
            }

            <span class="kwrd">string</span> url = <span class="kwrd">string</span>.Format(<span class="str">"tcp://localhost:{0}/{1}"</span>, ConvertInterface.ConverterEndpoints.Port, ConvertInterface.ConverterEndpoints.Uri);

            ConvertInterface.IConverter converter = (ConvertInterface.IConverter)Activator.GetObject(<span class="kwrd">typeof</span>(ConvertInterface.IConverter), url);

            <span class="kwrd">string</span> path = MapPath(<span class="str">"."</span>);
            path = Path.Combine(Path.GetDirectoryName(path), <span class="str">"Temp"</span>);

            <span class="kwrd">using</span> (TempFileCollection tempFiles = <span class="kwrd">new</span> TempFileCollection(path))
            {
                <span class="kwrd">string</span> inputFile  = tempFiles.AddExtension(inputFileExtension);
                <span class="kwrd">string</span> outputFile = tempFiles.AddExtension(<span class="str">"pdf"</span>);

                postedFile.SaveAs(inputFile);
                converter.Convert(inputFile, outputFile);

                Response.Clear();
                Response.ContentType = <span class="str">"application/pdf"</span>;
                Response.AddHeader(<span class="str">"content-disposition"</span>, <span class="kwrd">string</span>.Format(<span class="str">"inline; filename={0}.pdf"</span>, <span class="str">"sample"</span>));

                <span class="kwrd">byte</span>[] pdfBytes = File.ReadAllBytes(outputFile);

                Response.OutputStream.Write(pdfBytes, 0, pdfBytes.Length);
            }
        }        
        <span class="kwrd">catch</span> (Exception ex)
        {
            Response.Clear();
            Response.Write(<span class="kwrd">string</span>.Format(<span class="str">"&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1&gt;Conversion Error&lt;/H1&gt;&lt;P&gt;{0}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;"</span>, ex.Message));
            Response.StatusCode = 500;
            Response.StatusDescription = ex.Message;
        }
    }
</pre>
<p><!-- END PdfCodeBehind --></p>
<p>For completeness, I have included the code for the actual Web Service&#8217;s .aspx file below. As you can see, it&#8217;s just standard .aspx. boilerplate &#8211; all HTTP output is generated in the code behind file&#8217;s Page_Load event (which will be invoked when the Web Service client posts to the page). This is quick and dirty, but it works.</p>
<p><!-- BEGIN Pdf.aspx --></p>
<pre class="csharpcode">
<span class="asp">&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Pdf.aspx.cs" Inherits="Pdf" EnableViewState="false" %&gt;</span>

<span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span> <span class="attr">PUBLIC</span> <span class="kwrd">"-//W3C//DTD XHTML 1.0 Transitional//EN"</span> <span class="kwrd">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span class="kwrd">&gt;</span>

<span class="kwrd">&lt;</span><span class="html">html</span> <span class="attr">xmlns</span><span class="kwrd">="http://www.w3.org/1999/xhtml"</span> <span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">head</span> <span class="attr">runat</span><span class="kwrd">="server"</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span>Untitled Page<span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">form</span> <span class="attr">id</span><span class="kwrd">="form1"</span> <span class="attr">runat</span><span class="kwrd">="server"</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>
    
    <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">form</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">html</span><span class="kwrd">&gt;</span>
</pre>
<p><!-- END Pdf.aspx --></p>
<p>Here And here is the code for a little PHP application I used to test my conversion Web Service:</p>
<p><!-- BEGIN demo.php --></p>
<pre class="csharpcode">
<span class="kwrd">&lt;?</span><span class="html">php</span> $<span class="attr">ErrorMessage</span> = <span class="kwrd">''</span>; ?<span class="kwrd">&gt;</span>

<span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span> <span class="attr">PUBLIC</span> <span class="kwrd">"-//W3C//DTD XHTML 1.0 Transitional//EN"</span> <span class="kwrd">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">html</span> <span class="attr">xmlns</span><span class="kwrd">="http://www.w3.org/1999/xhtml"</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span>
File Conversion Server Demo
<span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span>

<span class="kwrd">&lt;</span><span class="html">h1</span><span class="kwrd">&gt;</span>File Conversion Server Demo<span class="kwrd">&lt;/</span><span class="html">h1</span><span class="kwrd">&gt;</span>

<span class="kwrd">&lt;</span><span class="html">form</span> <span class="attr">name</span><span class="kwrd">="Demo"</span> <span class="attr">method</span><span class="kwrd">="POST"</span> <span class="attr">enctype</span><span class="kwrd">="multipart/form-data"</span> <span class="attr">action</span><span class="kwrd">="/demo.pdf"</span><span class="kwrd">&gt;</span>

    <span class="kwrd">&lt;?</span><span class="html">php</span> <span class="attr">if</span>($<span class="attr">ErrorMessage</span>)<span class="attr">:</span> ?<span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">p</span><span class="kwrd">&gt;&lt;</span><span class="html">font</span> <span class="attr">size</span><span class="kwrd">="5"</span> <span class="attr">color</span><span class="kwrd">="#008000"</span><span class="kwrd">&gt;&lt;?</span><span class="html">php</span> <span class="attr">echo</span> $<span class="attr">ErrorMessage</span>; ?<span class="kwrd">&gt;&lt;/</span><span class="html">font</span><span class="kwrd">&gt;&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;?</span><span class="html">php</span> <span class="attr">endif</span>; ?<span class="kwrd">&gt;</span>
    
    <span class="kwrd">&lt;</span><span class="html">table</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;&lt;</span><span class="html">b</span><span class="kwrd">&gt;</span>Username:<span class="kwrd">&lt;/</span><span class="html">b</span><span class="kwrd">&gt;&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;&lt;</span><span class="html">input</span> <span class="attr">name</span><span class="kwrd">="Username"</span> <span class="attr">value</span><span class="kwrd">=""</span><span class="kwrd">&gt;&lt;/</span><span class="html">input</span><span class="kwrd">&gt;&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;&lt;</span><span class="html">b</span><span class="kwrd">&gt;</span>Password:<span class="kwrd">&lt;/</span><span class="html">b</span><span class="kwrd">&gt;&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;&lt;</span><span class="html">input</span> <span class="attr">name</span><span class="kwrd">="Password"</span> <span class="attr">value</span><span class="kwrd">=""</span><span class="kwrd">&gt;&lt;/</span><span class="html">input</span><span class="kwrd">&gt;&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;&lt;</span><span class="html">b</span><span class="kwrd">&gt;</span>Input File:<span class="kwrd">&lt;/</span><span class="html">b</span><span class="kwrd">&gt;&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;&lt;</span><span class="html">input</span> <span class="attr">type</span><span class="kwrd">="file"</span> <span class="attr">name</span><span class="kwrd">="InputFile"</span><span class="kwrd">&gt;&lt;/</span><span class="html">input</span><span class="kwrd">&gt;</span> <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">table</span><span class="kwrd">&gt;</span>
    
    <span class="kwrd">&lt;</span><span class="html">input</span> <span class="attr">type</span><span class="kwrd">="submit"</span> <span class="attr">value</span><span class="kwrd">="Submit"</span><span class="kwrd">&gt;&lt;/</span><span class="html">input</span><span class="kwrd">&gt;</span> 
    
<span class="kwrd">&lt;/</span><span class="html">html</span><span class="kwrd">&gt;</span>
</pre>
<p><!-- END demo.php --></p>
<p>If you look the PHP form&#8217;s action tag, you&#8217;ll see I used /demo.pdf as the action. Using the very nice <a href="http://learn.iis.net/page.aspx/460/using-url-rewrite-module/">IIS7 URL Rewrite Module</a>, I map all *.pdf URLs to my conversion Web Service. OK, this might be a little overkill, but this way the URLs look nice and all end in .pdf (which is appropriate).</p>
<p>The final piece of the puzzle is a small wrapper class I created to access the conversion Web Service from within my C# application:</p>
<p><!-- BEGIN ConvertClient --></p>
<pre class="csharpcode">
    <span class="kwrd">public</span> <span class="kwrd">class</span> ConvertClient
    {
        <span class="kwrd">public</span> ConvertClient(<span class="kwrd">string</span> convertHost, <span class="kwrd">string</span> username, <span class="kwrd">string</span> password)
        {
            _ConvertHost = convertHost;
            _Username    = username;
            _Password    = password;
        }

        <span class="kwrd">protected</span> <span class="kwrd">string</span> _ConvertHost;
        <span class="kwrd">public</span> <span class="kwrd">string</span> ConvertHost { get { <span class="kwrd">return</span> _ConvertHost; } set { _ConvertHost = <span class="kwrd">value</span>; } }

        <span class="kwrd">protected</span> <span class="kwrd">string</span> _Username;
        <span class="kwrd">public</span> <span class="kwrd">string</span> Username { get { <span class="kwrd">return</span> _Username; } set { _Username = <span class="kwrd">value</span>; } }

        <span class="kwrd">protected</span> <span class="kwrd">string</span> _Password;
        <span class="kwrd">public</span> <span class="kwrd">string</span> Password { get { <span class="kwrd">return</span> _Password; } set { _Password = <span class="kwrd">value</span>; } }

        <span class="kwrd">protected</span> <span class="kwrd">string</span> _Response;
        <span class="kwrd">public</span> <span class="kwrd">string</span> Response { get { <span class="kwrd">return</span> _Response; } set { _Response = <span class="kwrd">value</span>; } }

        <span class="kwrd">protected</span> <span class="kwrd">int</span> _MaxConvertAttempts = 2;
        <span class="kwrd">public</span> <span class="kwrd">int</span> MaxConvertAttempts { get { <span class="kwrd">return</span> _MaxConvertAttempts; } set { _MaxConvertAttempts = <span class="kwrd">value</span>; } }

        <span class="kwrd">protected</span> <span class="kwrd">string</span> _ResponseCode;
        <span class="kwrd">public</span> <span class="kwrd">string</span> ResponseCode { get { <span class="kwrd">return</span> _ResponseCode; } set { _ResponseCode = <span class="kwrd">value</span>; } }

        <span class="kwrd">protected</span> <span class="kwrd">static</span> <span class="kwrd">string</span> _szBoundary    = <span class="str">"SEPARATORSTRINGTEZTECHDOTCOM1"</span>;
        <span class="kwrd">protected</span> <span class="kwrd">static</span> <span class="kwrd">string</span> _szBoundary2   = <span class="str">"\r\n--SEPARATORSTRINGTEZTECHDOTCOM1\r\n"</span>;
        <span class="kwrd">protected</span> <span class="kwrd">static</span> <span class="kwrd">string</span> _szBoundary3   = <span class="str">"\r\n--SEPARATORSTRINGTEZTECHDOTCOM1--"</span>;
        <span class="kwrd">protected</span> <span class="kwrd">static</span> <span class="kwrd">string</span> _szFileSizeHdr = <span class="str">"Content-Disposition: form-data; name=\"MAX_FILE_SIZE\"\r\n\r\n"</span>;
        <span class="kwrd">protected</span> <span class="kwrd">static</span> <span class="kwrd">string</span> _szFileHdrFmt  = <span class="str">"Content-Disposition: form-data; name=\"InputFile\"; filename=\"{0}\"\r\nContent-Type: application/octet-stream\r\n\r\n"</span>;

        <span class="kwrd">public</span> <span class="kwrd">byte</span>[] ConvertToPdf(<span class="kwrd">byte</span>[] inputFileBytes, <span class="kwrd">string</span> inputFileName, <span class="kwrd">string</span> outputFileName)
        {
            <span class="kwrd">string</span> url = <span class="kwrd">string</span>.Format(<span class="str">"http://{0}/{1}?Username={2}&amp;Password={3}"</span>, ConvertHost, outputFileName, Username, Password);

            <span class="rem">// Calculate upload data size</span>

            <span class="kwrd">string</span> szFileSizeData = <span class="kwrd">string</span>.Format(<span class="str">"{0}"</span>, inputFileBytes.Length + 50000);
            <span class="kwrd">string</span> szFileHdr      = <span class="kwrd">string</span>.Format(_szFileHdrFmt, inputFileName);

            ASCIIEncoding ascii = <span class="kwrd">new</span> ASCIIEncoding(); <span class="rem">// At this time, file names must be ascii</span>
            List&lt;<span class="kwrd">byte</span>&gt; header = <span class="kwrd">new</span> List&lt;<span class="kwrd">byte</span>&gt;(); 
            List&lt;<span class="kwrd">byte</span>&gt; footer = <span class="kwrd">new</span> List&lt;<span class="kwrd">byte</span>&gt;(); 

            header.AddRange(ascii.GetBytes(_szBoundary2));      <span class="rem">// MAX_FILE_SIZE field</span>
            header.AddRange(ascii.GetBytes(_szFileSizeHdr));
            header.AddRange(ascii.GetBytes(szFileSizeData));
            header.AddRange(ascii.GetBytes(_szBoundary2));      <span class="rem">// userfile field</span>
            header.AddRange(ascii.GetBytes(szFileHdr));

            footer.AddRange(ascii.GetBytes(_szBoundary3));
            
            <span class="kwrd">int</span> cbContent = header.Count + inputFileBytes.Length + footer.Count;

            <span class="kwrd">int</span> attempts = 0;

            <span class="kwrd">while</span> (<span class="kwrd">true</span>)
            {
                <span class="kwrd">try</span>
                {
                    attempts++;

                    HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
                    webRequest.Method        = <span class="str">"POST"</span>;
                    webRequest.ContentType   = <span class="kwrd">string</span>.Format(<span class="str">"multipart/form-data; boundary={0}\r\n"</span>, _szBoundary);
                    webRequest.ContentLength = cbContent;

                    <span class="kwrd">using</span> (Stream request = webRequest.GetRequestStream())
                    {
                        request.Write(header.ToArray(), 0, header.Count);
                        request.Write(inputFileBytes, 0, inputFileBytes.Length);
                        request.Write(footer.ToArray(), 0, footer.Count);
                    }

                    <span class="kwrd">using</span> (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
                    {
                        <span class="kwrd">using</span> (BinaryReader reader = <span class="kwrd">new</span> BinaryReader(webResponse.GetResponseStream()))
                        {
                            <span class="kwrd">byte</span>[] pdfBytes = reader.ReadBytes((<span class="kwrd">int</span>)webResponse.ContentLength);
                            <span class="kwrd">return</span> pdfBytes;
                        }
                    }
                }
                <span class="kwrd">catch</span>
                {
                    <span class="kwrd">if</span> (attempts &gt;= MaxConvertAttempts)
                        <span class="kwrd">throw</span>;
                }
            }
        }
    }
</pre>
<p><!-- END ConvertClient --></p>
<p>I didn&#8217;t see an easy way to build a MIME document in .Net, so I&#8217;m building up the MIME document (used in the HTTP Post) from scratch.</p>
<p>To debug the Windows Service, as shown in the code above, I added code to log to the Windows Event Viewer. In this case, I started with working document conversion code, so I didn&#8217;t end up needing to run the service under a debugger. But, one of the nice things about services running as a dedicated process (unlike Apache modules, ISAPI modules and Control Panel applets) is that, with just a simple change (adding a Main function), you can run the service as a regular command line application and attach the Visual Studio debugger to the running process.</p>
<p>To troubleshoot the Web Service, my first step was to disable &#8220;friendly errors&#8221;. With IIS7, you have to do it on <a href="http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx">both the web browser client and in IIS7</a>. Debugging is just a matter of attaching the IIS7 process in Visual Studio (as usual for any web application).</p>
<p>All our production Windows servers use the 64 bit edition of Windows 2008 Server. Right now, I happen to do most of my development on a 32 bit edition of Windows Vista. Both platforms run IIS7 and usually, the 32 vs. 64 bit doesn&#8217;t cause any problems. However, the Windows version of OpenOffice only comes in a 32 bit version. This version runs fine on 64 bit Windows, but when programming OpenOffice via .Net, you need a 32 bit application, so you have to <a href="http://stackoverflow.com/questions/41449/i-get-a-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-error-on-a">set the Target Platform in the Project Build Properties to X86</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2009/06/28/web-service-for-document-conversion-an-odyssey/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Year, New Projects Completed</title>
		<link>http://blogs.teztech.com/2009/03/26/new-year-new-projects-completed</link>
		<comments>http://blogs.teztech.com/2009/03/26/new-year-new-projects-completed#comments</comments>
		<pubDate>Fri, 27 Mar 2009 03:34:16 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[ListingsTech]]></category>
		<category><![CDATA[T3city]]></category>

		<guid isPermaLink="false">http://teztech.com/?p=27</guid>
		<description><![CDATA[Wow, this has been a busy few months. In addition to the usual flood of small projects, since November, we&#8217;ve published these brand new sites: http://www.lotterygold.com/ This was an interesting and very large project that recently went live. The application we created for this site is general purpose and can support many types of e-commerce. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Wow, this has been a busy few months. In addition to the usual flood of small projects, since November, we&#8217;ve published these brand new sites:</p>
<p><a class="moz-txt-link-freetext" href="http://www.lotterygold.com/"><strong>http://www.lotterygold.com/</strong></a> This was an interesting and very large project that recently went live. The application we created for this site is general purpose and can support many types of e-commerce. The backend of this site is very comprehensive and highly automated. Due to its sensitive nature, the there are multiple layers of security and a dedicated audit trail facility.</p>
<p><a class="moz-txt-link-freetext" href="http://www.mountainhighoutfitters.com/"><strong>http://www.mountainhighoutfitters.com/</strong></a><strong> </strong>This site is based on our very comprehensive and sophisticated online store engine. Our client&#8217;s goal is to compete head on with the likes of rei.com (who probably have spent hundreds of thousands if not millions of dollars on their online store). We have a very full featured marketing capabilities, integrated product catalog management (with lots of JavaScript to make it friendly and easy to use), integrated order fulfillment and automated integration with in-house store inventory. Since Google is the source of so much traffic (both paid and non-paid), we support every service that Google offers: Google Base (a.k.a. Google Products and Froogle), Google Site Maps, Google Adwords, Google Checkout and Google Analytics. We have some interesting payment solutions for vendors that want to sell to non-traditional markets (overseas). All our web applications support our standard skin and content management system (see below), so just about any look and feel can be created without any programming or database changes. There is a lot of power and flexibility under the hood that is probably best demonstrated in a meeting.</p>
<p><a href="http://www.hudhomeschattanooga.com/"><strong>http://www.hudhomeschattanooga.com/</strong></a> This is a standard ListingsTech site to market HUD homes in the metro Chattanooga, TN area. One interesting thing about this project is that we allow visitors to search across subsets of two different listings databases. We needed to do this because the databases contain all HUD listings for Georgia and Tennessee, but the site is only for Chattanooga. Another interesting idea here is the general approach of keeping the site as simple as possible &#8211; we are trying to get visitors to the information or service they want in as few clicks as possible&#8230; Want to see listings for Walker County? Click the search term on the left. Need to get prequalified for a loan? Click the link on the top of the page and fill out the form. Need more information about a listing? Click the &#8220;Contact Us for More Info&#8221; link and type your question.  </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2009/03/26/new-year-new-projects-completed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
