<?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 &#187; .Net</title>
	<atom:link href="http://blogs.teztech.com/category/net/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>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>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>PHP IDEs</title>
		<link>http://blogs.teztech.com/2009/03/26/php-ides</link>
		<comments>http://blogs.teztech.com/2009/03/26/php-ides#comments</comments>
		<pubDate>Fri, 27 Mar 2009 03:06:21 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://teztech.com/?p=21</guid>
		<description><![CDATA[What is an Integrated Development Environment (IDE)? For sure &#8220;IDE&#8221; means different things to different programmers. Some probably think an integrated GUI form editor or WYSIWYG HTML editor is critical. Others may think that the most important parts of an IDE are the text editor and code browser. Others still judge IDEs by their code [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>What is an Integrated Development Environment (IDE)? For sure &#8220;IDE&#8221; means different things to different programmers. Some probably think an integrated GUI form editor or WYSIWYG HTML editor is critical. Others may think that the most important parts of an IDE are the text editor and code browser. Others still judge IDEs by their code &#8220;refactoring&#8221; tools.</p>
<p>For me, the IDE goes back to the days of Borland&#8217;s Turbo Pascal and Turbo C. They didn&#8217;t have GUIs much less GUI form editors, HTML wasn&#8217;t yet invented and I don&#8217;t remember the text editor being anything special. What turned them into IDEs was the super efficient work flow&#8230; A typical &#8220;Hello World&#8221; program was mostly a matter of typing in some code and pressing the Run key. If you wanted to debug, you would set your breakpoints right in the editor, then press the Debug key to start your program under the integrated debugger. <span id="more-21"></span>When your program expanded to more than one file, IDEs had simple project facilities that did a good job of bridging the gap between &#8220;Hello World&#8221; and tools for large projects like &#8220;make&#8221; and &#8220;nmake&#8221;. Later, when the GUI APIs got so big that nobody could keep them all their head, integrated documentation became critical to a smooth workflow. For better or worse, I&#8217;ve become addicted to code completion. It doesn&#8217;t work as well for dynamic languages like PHP, but some code completion is better than none.</p>
<p>So, when I think IDE, I think of an all purpose application that makes a programmer&#8217;s day-to-day workflow smooth and efficient&#8230; I find that anything I can do that cuts down my &#8220;cycle&#8221; time improves my productivity (and my mood).</p>
<p>Every since the days of Microsoft C 6, Microsoft has always had the best IDEs for C/C++ and Windows development. Their documentation is better and better integrated, their compilers are way, way faster and the general work flow is always the smoothest. Visual Studio continues this trend for C/C++ and now C# development &#8211; it sure is easy to crank up a new C# web application and start debugging.</p>
<p>As as web host, I end up working on a lot of different sites. These days, there is a lot of PHP code out there and I end up spending a fair amount of time working on PHP projects. For most my really big projects, I typically use C# and Asp.Net, so I have Visual Studio handy. With a few registry tweaks to syntax highly PHP code, Visual Studio works OK as a text editor for PHP, but I wouldn&#8217;t call it a true PHP IDE. For one thing, there is no integrated debugging support. You can kind of get project file support (PHP files can be listed), but the only integrated documentation is for HTML and JavaScript (and sadly, the Microsoft documentation on these frequently referenced topics is IE centric).</p>
<p>So, several times, I&#8217;ve set out on a mission to find a IDE for PHP programming. Last time around, I gave up and stuck it out using Visual Studio as a text editor. After this last round of reviews, I ended up buying NuSphere&#8217;s PhpED.</p>
<p>When you are in the world of &#8220;free&#8221; software, it is tempting to stick only to &#8220;free&#8221; tools. However, in the case of IDEs, I just couldn&#8217;t find a free one that worked well enough to be better than Visual Studio.</p>
<p>One area where PHP needs a lot of work is support for debugging. The basics are there, but having to fiddle with various debugging DLLs is a hassle &#8211; debugging information has been standard for binary programs for years &#8211; how hard could it be to figure out a standard debugging API for IDEs to use?  Having to use query strings to initiate a debugging session is a serious design mistake. With all the rewriting and other things going on, fiddling with URLs just doesn&#8217;t make sense. Visual Studio is able to attach a debugger to server code in just about any situation &#8211; PHP and its IDEs should make this as easy.</p>
<p>The ability to automatically reformatting HTML in both blocks and full pages is very handy&#8230; plenty of tools (like content management systems) make a real mess of HTML. And, for better or worse, you end up using some of these tools over and over so it&#8217;s not like you can fix the code just once and be done with it.</p>
<p>Below are some notes I made as I tried out various PHP IDEs:</p>
<h2>Eclipse PHP</h2>
<p>No cost and open source</p>
<p>Cross-platform (Java)</p>
<p>Attractive</p>
<p>Amazingly slow and memory hungry &#8211; based on Java and requires a Java Runtime to be installed.</p>
<p>Integrated PHP reference uses the php.net web site so, it requires Internet access and is slow.</p>
<p>No integrated CSS, HTML, JavaScript or DOM reference</p>
<p>No WYSIWYG HTML editor, no integrated page preview, either</p>
<p>HTML reformat is weak and not customizable</p>
<p>Go to definition doesn&#8217;t work reliably</p>
<p>Code completion doesn&#8217;t work reliably</p>
<p>Code completion doesn&#8217;t work in CSS files.</p>
<p>HTML code completion uses upper case for tags and attributes.</p>
<p>Subversion integration is slow and shows incorrect status</p>
<p>Crashes frequently</p>
<p>Debugger worked for a simple page, but did not work in a real project</p>
<h2>Komodo IDE</h2>
<p>Attractive </p>
<p>Cross-platform &#8211; interesting choice of Firefox engine</p>
<p>Reasonable performance and memory usage</p>
<p>Subversion integration is quick and accurate</p>
<p>Once configured, PHP syntax checking is very handy</p>
<p>No WYSIWYG HTML editor, but the integrated page preview is well done</p>
<p>Go to definition doesn&#8217;t work reliably</p>
<p>Code completion doesn&#8217;t work reliable (does not seem to follow include paths).</p>
<p>No integrated PHP, CSS, HTML, JavaScript, DOM or MySQL reference</p>
<p>Copy and paste of files in Projects tree fails with no error message</p>
<p>Deluxe syntax PHP + HTML syntax highlighting.</p>
<p>View unsaved changes off File menus is a great idea! The integration of this feature with the recovery of unsaved changes after a crash is nice, too.</p>
<p>Extremely annoying rendering bugs in the text editor</p>
<p>Code completion for CSS and HTML</p>
<p>CSS code completion is not very good. For example, once you type &#8220;margin:&#8221;, you get a drop list of choices instead of a description of the arguments for the margin style.</p>
<p>HTML code completion is annoying because it defaults to upper-case tags (is anyone still NOT using xhtml for new code?)  and does a poor job of suggesting closing tag (typing &#8220;&lt;/&#8221; does not give a drop list of closing tags).</p>
<h2>PHPEdit</h2>
<p>Attractive</p>
<p>Reasonable performance and memory usage</p>
<p>Subversion integration does not work out of the box.</p>
<p>Integrated PHP and MySQL reference is nice, no integrated CSS, HTML, JavaScript or DOM reference.</p>
<p>The ultra-deluxe syntax highlighting changes the highlighting rules depending on where the caret is placed &#8211; very handy for files with integrated HTML, PHP, CSS and JavaScript!.</p>
<p>No code reformat for any language other than PHP.</p>
<p>No code completion for any language other than PHP (CSS and HTML would be nice).</p>
<p>Go to definition (&#8220;Jump to declaration&#8221;) doesn&#8217;t work across files.</p>
<p>Cannot right click to open a file via a simple require() declaration.</p>
<p>No heroics to resolve PHP include paths for code completion.</p>
<p>DB Explorer is an interesting idea, but I think the most important thing about a database to a programmer is the column definitions (names, types, lengths) and, other than seeing the column names in the DB Explorer tree, there is no way see the column definitions for a table. Manually inputing a &#8220;show columns from&#8221; query into the SQL tab didn&#8217;t work &#8211; you end up with an &#8220;Invalid SELECT statement&#8221; error message in a message box.</p>
<p>Non-standard Alt+Tab behavior is not very useful.</p>
<h2>PhpED</h2>
<p>The debugger actually works! But, it&#8217;s a lot more hassle than it should be.</p>
<p>CSS code completion is OK, but Visual Studio is still the best.</p>
<p>PHP code completion is reasonable and follows include paths in some cases.</p>
<p>Integrated documentation for CVS, CSS, HTML, JavaScript, MySQL, PHP, PostgreSQL  and Smarty &#8211; very nice!</p>
<p>The project system works OK for PHP projects, but it is cumbersome and has odd limitations (you can&#8217;t copy and paste files and folders, for example). </p>
<p>Non-standard Alt+Tab behavior is not very useful.</p>
<p>No Subversion integration</p>
<p>No integrated code reformatting (help provides a good explanation of how to integrate 3rd party tools, but these don&#8217;t seem to work well, either).</p>
<p>One of the real selling</p>
<p>The ability to edit files via FTP or SSH file transfer is nice.</p>
<p>Integrated support for SSH terminals is nice (but why, oh why is copy and paste so difficult?)</p>
<h2>Other Suggestions</h2>
<p>A lot of people use Dreamweaver to edit PHP code. I guess if you come from the design world, this makes sense. Syntax highlighting for PHP is pretty poor, but I will say that Dreamweaver has the best support for code reformatting.</p>
<p>Notepad++ has a good syntax highlighting of many languages and there are add-ons to support FTP and integrated spell check.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2009/03/26/php-ides/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Page Layouts: Flow (fluid/liquid) vs. Fixed</title>
		<link>http://blogs.teztech.com/2007/08/23/web-page-layouts-flow-fluidliquid-vs-fixed</link>
		<comments>http://blogs.teztech.com/2007/08/23/web-page-layouts-flow-fluidliquid-vs-fixed#comments</comments>
		<pubDate>Thu, 23 Aug 2007 11:23:50 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://teztech.com/2007/08/23/web-page-layouts-flow-fluidliquid-vs-fixed</guid>
		<description><![CDATA[For web site designs, I like a simple, clean look. I also favor a flow (also called fluid or liquid) page layout with no big margins wasting space around the edges. These things make sense to me on a technical basis and I like the aesthetics and usability of these kinds of sites. However, they don&#8217;t [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>For web site designs, I like a simple, clean look. I also favor a flow (also called <a href="http://www.webmasterworld.com/forum83/928.htm">fluid</a> or <a href="http://www.webmasterworld.com/forum21/3450.htm">liquid</a>) page layout with no big margins wasting space around the edges. These things make sense to me on a technical basis and I like the aesthetics and usability of <a href="http://www.inspirationbit.com/spark-your-imagination-with-16-stunning-bits-of-liquid-design/">these kinds of sites</a>. However, they don&#8217;t always lead to the most pleasing look for some tastes.</p>
<p>Here is an article I found interesting: <a href="http://politics.slashdot.org/article.pl?sid=07/02/25/1935215">http://politics.slashdot.org/article.pl?sid=07/02/25/1935215</a></p>
<p>Notice how the high brow, traditional designers favor fixed width layouts with lots of wasted space in the margins. Every single one of these sites is fixed width. Most have top and bottom margins &#8211; a waste of valuable screen real estate, IMO<br />
<span id="more-17"></span></p>
<p>So why do traditional designers favor these kinds of layouts? I&#8217;ve seen <a href="http://www.google.com/search?hl=en&amp;q=fluid+vs+fixed&amp;btnG=Google+Search">lots of arguments</a>, some lame and some worthwhile, but who cares what the designers prefer? Most designers are as much a part of the &#8220;typical audience&#8221; as I am &#8211; no part at all. The job of the web site to please it&#8217;s audience, not it&#8217;s designers. That is easy to say, but how do we really figure out how to best please the &#8220;the audience&#8221;? It&#8217;s something I&#8217;m still working on. Listening carefully to the client is one idea &#8211; often they have spent years working with <em>their </em>clients. Over those years, they have built up instincts about what will and won&#8217;t work. For interactive sites, I&#8217;ve got a stack of books that explain, in painful detail, how to create user interfaces that function well. These books are backed up with actual studies of end user actives. But web sites need to be <em>both</em> functional and pleasing to the eye.</p>
<p>Another related thing I&#8217;ve realized: Designers prefer smallish fonts. I guess, to their tastes, small fonts look better in the layouts. However, over and over again I&#8217;ve found that most end users (well, the ones that actually read the content) prefer larger font sizes. If you ever want to be a hero for a day, find an office with lots of 17&#8243; 1280&#215;1024 LCD monitors and switch everybody from &#8220;Small Fonts&#8221; to &#8220;Large Fonts&#8221; (under the Windows, it&#8217;s under Advanced Display Properties). They&#8217;ll be cheering you as you walk out the door! Overall, I find flow layouts work better with larger font sizes. With a small font size, you can cram lots of stuff into small layout boxes. Flow layouts and larger fonts force you to work out other solutions. Flow layouts also allow you to support the brower&#8217;s ability to change font sizes (<a href="http://developer.yahoo.com/yui/fonts/">YUI fonts</a> has nice support for this). This is a great way to easily accomidate low vision and older users.</p>
<p>Most designers probably don&#8217;t know how to make flow layouts, so they think they are too hard. Once you learn the skills, flow layouts really aren&#8217;t so much harder than the tricks you have to use to brow beat your HTML into a cross-browser fixed layout. They&#8217;ll also make translating your site into other languages a whole lot easier, if you think this might ever occur.</p>
<p>I&#8217;ve also read that fixed layouts have to be done to get content to fit properly into the boxes in the layouts. For busy sites, like the presidential candidate site home pages and sites with paid advertising, the need for a fixed layout makes some sense, but I&#8217;m not sure it&#8217;s something that can&#8217;t be worked around with a different design philosophy.  Advertisers expect their ads to appear in certain locations. However, <a href="http://www.google.com/">Google</a>, <a href="http://slashdot.org">Slashdot</a> and many other sites run on ad revenue have showed us that ads don&#8217;t <em>have </em>to be flash or bitmaps or be fixed at a pixel precise location. &#8220;We have to direct the reader&#8217;s attention&#8221; is a common cry. &#8220;Focus them on the buy button&#8221;, they say, as if a clever graphic design could really fool somebody into buying something. And as if <a href="http://www.amazon.com/">amazon.com</a> has not been showing us how to do this properly in a fluid design for the last 10 years.</p>
<p>Yes, a flow layout won&#8217;t look like a printed brochure, but so what? Only us geezers and designers that lived through the days of printed sales literature find comfort in layouts with portrait style proportions. Look at the proportions of your monitor &#8211; wider than tall, yes? New wide screen TVs and monitors are even wider. My teenage kids spend way more time looking at at the wide, fluid web pages of their favorite interactive web sites than narrow, glossy sales slicks. What do you think they will prefer when they grow up and get jobs (and the money and power to buy things)?</p>
<p>I&#8217;ve heard it said that columns of text need to be kept narrow because &#8220;wide columns of text are hard to read&#8221;. This is just a weak excuse. If I ever find a web page uncomfortable to read because it&#8217;s too wide, I&#8217;ll just make my browser window narrower. Power to the people, I guess. I&#8217;ve heard lame excuses about how users don&#8217;t know how to resize browser windows. Maybe users with 800&#215;600 screens don&#8217;t know how, but flow layouts (and worries about too wide columns of text) aren&#8217;t for them, anyway.</p>
<p>When you design software user interfaces, you have to trade off between first time users and users of intermediate ability. Research shows, for a typical application, there will be far more users of intermediate ability (users that might, for example, know how to resize a window). But the proper audience to design for really depends on the application. For a presidential candidate web site, I could argue either way: Sure, you have the obvious sales brochure aspect of the site, but a <em>good </em>presidential candidate web site will truly be devoted to interactive activities such as volunteer sign up, forums and polls. For a web site that is just a slick brochure with limited interactivity, I can almost grasp the argument that users might not know how to resize their browser windows. Thus, we need to force a width to keep the columns comfortable to read. However, in the particular case of presidential web sites, aren&#8217;t the candidates hoping to draw you into the interactive part of their site? Interactive sites are much better with flow layouts. What type of layout is used behind the home page of your <a href="http://computers.ebay.com/">favorite</a> <a href="http://www.slashdot.org">interactive</a> <a href="http://www.webmasterworld.com/forum21/3450.htm">site</a>?</p>
<p>A final consideration I&#8217;ll leave you with: What happens when your site is viewed on a device like the iPhone (or a Sony PS3, XBox360 or Nintendo Wii)? In the limited space available, it&#8217;s important to make the most of screen real estate. Only a fluid design can accomplish this (without having a site dedicated to each device). My brother has an iPhone. I was interested to find out that he uses it often to do the kind of web surfing that I associate with sitting at a desk. His iPhone lets him web surf in a lot of situations where I would be reading a book or magazine. It&#8217;s interesting to consider my web sites viewed this way. Fluid designs work now and have the benefit of being ready for the future. </p>
<p>When I get a chance, I&#8217;ll post some pictures of flow sites that I&#8217;ve worked on running on the my daughter&#8217;s Wii and my brother&#8217;s iPhone.  They look great ( considering the limited resolution available).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2007/08/23/web-page-layouts-flow-fluidliquid-vs-fixed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Tracing and Logging for Asp.Net and .Net Command Line Applications</title>
		<link>http://blogs.teztech.com/2007/08/18/simple-tracing-and-logging-for-aspnet-and-net-command-line-applications</link>
		<comments>http://blogs.teztech.com/2007/08/18/simple-tracing-and-logging-for-aspnet-and-net-command-line-applications#comments</comments>
		<pubDate>Sat, 18 Aug 2007 04:51:38 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://teztech.com/2007/08/18/simple-tracing-and-logging-for-aspnet-and-net-command-line-applications</guid>
		<description><![CDATA[From time to time, I need some quick and dirty logging in my .Net applications.  I don&#8217;t always have time or energy to worry about the ideal logging API. The MSDN documentation and all the examples I found for the built-in .Net logging facilities were confusing and, it turns out, overkill. Logging in Asp.Net Logging [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>From time to time, I need some quick and dirty logging in my .Net applications.  I don&#8217;t always have time or energy to worry about the <a href="http://teztech.com/2007/08/18/logging-for-services-gui-and-command-line-applications">ideal logging API</a>. The MSDN documentation and all the examples I found for the built-in .Net logging facilities were confusing and, it turns out, overkill.</p>
<h2>Logging in Asp.Net</h2>
<p>Logging in Asp.Net is confusing because Microsoft uses the word &#8220;trace&#8221; in two different contexts:<span id="more-23"></span></p>
<p>When a page is rendered and HTML generated, you can have the Asp.Net engine add a bunch of additional page state information to the generated HTML. In your application&#8217;s web.config file, this is the tracing that is controlled by<br />
&lt;trace&gt;&lt;/trace&gt; under &lt;web.config&gt;&lt;/web.config&gt;. In practice, I don&#8217;t often find this kind of tracing helpful, but when I do,  I put the following tags in web.config to make it easy to turn on or off:<br />
<code><br />
&lt;system.web&gt;<br />
  &lt;customErrors mode="Off"/&gt;<br />
  &lt;trace enabled="false" requestLimit="10" pageOutput="true" traceMode="SortByTime" localOnly="true" /&gt;<br />
  &lt;!-- ... --&gt;<br />
&lt;/system.web&gt;</code></p>
<p>With these tag in place, you can enable and disable page state tracing (more like a dump if you ask me) by changing enabled=&#8221;false&#8221; to enabled=&#8221;true&#8221;.</p>
<p>The other use of the word &#8220;trace&#8221; is related to the more traditional form of logging via .Net Debug.Write and Trace.Write. Essentially, under Asp.Net, you use Debug.Write and Trace.Write as usual. Contrary to the MSDN documentation, the default compiler options for Asp.Net web applications allow Debug.Write output in Debug builds and allow Trace.Write output in both Debug and Release builds. If you run your Asp.Net application under the Visual Studio debugger, you will see that Debug and Trace output is redirected to the debug output window without any additional configuration.  As with any use of .Net logging, you can setup tracing to various outputs either in code or via your application&#8217;s configuration file. To configure your Asp.Net web application to log trace output to a file (for use with <a href="http://unxutils.sourceforge.net/">other tools</a>), place the following into your web.config:<br />
<code><br />
&lt;system.diagnostics&gt;  <br />
  &lt;trace autoflush="true"&gt;    <br />
  &lt;listeners&gt;    <br />
  &lt;add name="MyApplicationTracer" type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" initializeData="MyApplicationTrace.log" /&gt;<br />
  &lt;/listeners&gt;<br />
  &lt;/trace&gt;<br />
&lt;/system.diagnostics&gt;</code></p>
<p>This will result in debug (in debug builds) and trace output going into a file named MyApplicaitonTrace.log in your web site&#8217;s root folder.</p>
<h2>Logging in .Net Command Line Applications</h2>
<p>Since .Net applications are easy to create and fairly expressive, I often write small command line utilities that, on other platforms, I might create as shell scripts.  Here are some handy code snips that I use to handle simple logging for these applications:<br />
<code><br />
namespace Program1<br />
{<br />
 ///<br />
<summary></summary>
<p> /// Prepends each output line with the time<br />
 ///<br />
 public class TextWriterTraceListenerWithTime : TextWriterTraceListener<br />
 {<br />
  public TextWriterTraceListenerWithTime()<br />
  : base()<br />
  {<br />
  }</code><code>public TextWriterTraceListenerWithTime(Stream stream)<br />
  : base(stream)<br />
  {<br />
  }</code><code>public TextWriterTraceListenerWithTime(string path)<br />
  : base(path)<br />
  {<br />
  }</code><code>public TextWriterTraceListenerWithTime(TextWriter writer)<br />
  : base(writer)<br />
  {<br />
  }</code><code>public TextWriterTraceListenerWithTime(Stream stream, string name)<br />
  : base(stream, name)<br />
  {<br />
  }</p>
<p>public TextWriterTraceListenerWithTime(string path, string name)<br />
  : base(path, name)<br />
  {<br />
  }</p>
<p>public TextWriterTraceListenerWithTime(TextWriter writer, string name)<br />
  : base(writer, name)<br />
  {<br />
  }</p>
<p>public override void WriteLine(string message)<br />
  {<br />
  base.Write(DateTime.Now.ToString());<br />
  base.Write(" ");<br />
  base.WriteLine(message);<br />
  }<br />
 }</p>
<p>class Program<br />
 {</p>
<p>static void Main(string[] commandLineArgs)<br />
  {<br />
  MemoryStream messageStream = null;<br />
  TextWriterTraceListenerWithTime messageWriter = null;</p>
<p>try<br />
  {<br />
  messageStream = new MemoryStream();<br />
  messageWriter = new TextWriterTraceListenerWithTime(messageStream);<br />
  Trace.Listeners.Add(messageWriter);<br />
  Trace.Listeners.Add(new ConsoleTraceListener());</p>
<p>Trace.WriteLine("This is an example message");<br />
  messageWriter.Flush();</p>
<p>// ...</p>
<p>messageWriter.Flush();<br />
  messageWriter = null;<br />
  }<br />
  catch (Exception e)<br />
  {<br />
  Trace.Write(string.Format("ERROR: A fatal exception occured: {0}: {1}", e.GetType().Name, e.Message));<br />
  if (e.InnerException != null)<br />
  Trace.Write(string.Format(" ({0}: {1})", e.InnerException.GetType().Name, e.InnerException.Message));<br />
  Trace.WriteLine("");</p>
<p>if (messageWriter != null)<br />
  {<br />
  messageWriter.Flush();<br />
  messageStream.Seek(0, SeekOrigin.Begin);<br />
  StreamReader messageReader = new StreamReader(messageStream);<br />
  DbRequest.Singleton.Alert(messageReader.ReadToEnd()); // Send alert message via email<br />
  }<br />
  }<br />
  }<br />
 }<br />
}</p>
<p>Hopefully, you get the idea from the example code above.</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2007/08/18/simple-tracing-and-logging-for-aspnet-and-net-command-line-applications/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Logging for Services, GUI and Command Line Applications</title>
		<link>http://blogs.teztech.com/2007/08/18/logging-for-services-gui-and-command-line-applications</link>
		<comments>http://blogs.teztech.com/2007/08/18/logging-for-services-gui-and-command-line-applications#comments</comments>
		<pubDate>Sat, 18 Aug 2007 04:50:29 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://teztech.com/2007/08/18/logging-for-services-gui-and-command-line-applications</guid>
		<description><![CDATA[This is the first is a series of articles about logging. In this first article, I will describe what I believe is a simple, yet useful logging API. In later articles, I&#8217;ll give some hands on practical advise. As I continue the series, I&#8217;ll add links to the new articles here: Simple Tracing and Logging for Asp.Net and .Net [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This is the first is a series of articles about logging. In this first article, I will describe what I believe is a simple, yet useful logging API. In later articles, I&#8217;ll give some hands on practical advise. As I continue the series, I&#8217;ll add links to the new articles here:</p>
<ul>
<li><a href="http://teztech.com/2007/08/18/simple-tracing-and-logging-for-aspnet-and-net-command-line-applications">Simple Tracing and Logging for Asp.Net and .Net Command Line Applications</a></li>
</ul>
<p>Wow, some programmers go crazy about logging.  Do a <a href="http://www.google.com/search?hl=en&amp;q=.net+logging">Google search for &#8220;.net logging&#8221;</a> and you&#8217;ll see what I mean. Some of these libraries are huge.  While some applications may really need all the complexity these libraries offer, I have seen it severely abused on more than one occasion. Crank up a copy of <a href="http://teztech.com/2007/02/09/enterprise-overly-complex-and-slow">Blackberry Enterprise Server</a> (BES) and let it run for a week or two. You&#8217;ll find your Windows Event Viewer overflowing with all types of mysterious, confusing and generally useless messages.  In addition to the constant Event Viewer spew, if you let BES run unattended, you&#8217;ll eventually find that your BES hard drive is literally overflowing with many different log files all with obscure names and even more obscure contents.  Exchange Server has a similar problem where some logging is done in Event Viewer, other logging is done to text files. And none of the Exchange Server logging options ever seems to enable the simple email flow messages you need for common day to day administration tasks that I take for granted on our Linux email servers.</p>
<p>Is all this really necessary? <span id="more-22"></span>After 20 years of programming, I&#8217;ve found that the following simple API is more than enough for all my needs:</p>
<p>LogMessage(<em>componentName</em>, <em>severity</em>, <em>format</em>[, <em>formatArg1</em>, <em>formatArg2</em>, ...])</p>
<p>Depending on your programming language and coding standards,  this simple function may need to be wrapped in a class. You might also wrap the function call in a macro to allow for conditional compilation and to keep from having to pass the same <em>componentName</em> over and over.</p>
<p>With this API in mind, you also need a fairly simple configuration system to automatically prefix the messages with time, date, and thread ID and direct messages to some combination of syslog, Windows Event Log, a text file (just 1, please!), console, system debugger, email (for Alerts &#8211; see below)  and user defined functions.</p>
<p>The <em>componentName</em> argument is best handled as a single string determined by the programmer. This keeps things simple, yet gives the programmer a lot of flexibility in both the presentation of messages and the ability to filter messages.</p>
<p>There is no sense in going overboard with adding lots of flexibility for the <em>severity</em> argument. It&#8217;s best to spell things out and keep them simple. You&#8217;re never going to get a group of programmers and system administrators to agree on the difference between &#8220;error&#8221;, &#8220;critical&#8221; and &#8220;alert&#8221;. I use an enumerated type with the following values:</p>
<ul>
<li><strong>Debug</strong> &#8211; Low level messages of interest only to programmers. It should be easy to enable and disable output of debug messages. The only reason a user would enable debug messages is to create a log file to be sent to a programmer. Information messages may be sent to log files and/or UI elements, but they should never be sent to system facilities (such as syslog or the Windows Event Log).</li>
<li><strong>Information</strong> &#8211; Messages that let users know the program is doing what it supposed to do. Information messages are of most value for services where there is no interactive UI to demonstrate that the program is working properly. However, interactive programs can trap Information messages to display status messages during length operations. Information messages may be sent to log files and/or UI elements, but they should never be sent to system facilities.</li>
<li><strong>Warning</strong> &#8211; Messages to let the user know the program encountered a problem, but the problem is not completely unexpected. The program should be able to work around problems that result in warnings (possibly by retrying at a later time).  Warnings should be sent to all log files and system facilities.</li>
<li><strong>Error</strong> &#8211; Messages that need the user&#8217;s attention.  Errors should be sent to all log files and system facilities.</li>
<li><strong>Alert</strong> &#8211; Messages that need the user&#8217;s immediate attention.  The user should be woken from bed. Alerts should be sent to all log files and system facilities.</li>
</ul>
<p>I&#8217;ve found that the most difficult choice is between Error and Alert. For example, at an ISP, email server problems are almost always Alert messages, while for home users or small businesses, email problem can wait until morning. If it&#8217;s not obvious, make everything an Error and assume the administrator will have some way to filter the messages to decide for himself which Errors are really Alerts.</p>
<p>The data type for the <em>format</em> argument depends on your programming language and I8N requirements and tools. For ease of programming, I much prefer to use String.Format style format strings (printf strings in C++ and PHP code).  </p>
<p>I could write an entire article about choosing the best method for formatting strings for output, but quickly:</p>
<p>For production applications, use formatting rather than composition:</p>
<ul>
<li><strong>Do use</strong>: string output = string.Format(&#8220;A = &#8216;{0}&#8217;&#8221;, a)</li>
<li><strong>Do not use</strong>: string output = &#8220;A = &#8216;&#8221; +  a + &#8220;&#8216;&#8221;;</li>
</ul>
<p>As much as I love C++ and <a href="http://www.research.att.com/~bs/C++.html">Bjarne Stroustrup</a> (and understand the arguments for the ability to format user defined types in a safe and type safe manner), favoring formatting over composition leads to programs that are easier to write, easier to read and easier to translate.</p>
<p>If you need to translate your program into other languages, there are two schools of thought for handling literal strings that need to be translated:  </p>
<ul>
<li><strong>In the Windows/Mac style system</strong>, each string is manually assigned a unique integer identifier and all strings are stored in a database of some kind (typically application resources). When the you need a string, you program a call to the database API, passing it the unique integer ID of the string to be retrieved as a lookup key. </li>
<li><strong>In the gettext style system</strong> (UNIX like platforms),  translated versions of the strings are still stored in an external database (though typically in simple text files). However, the original strings created by the programmer (often English) remain in the code. The original strings are used as the lookup key to retrieve the translated string.</li>
</ul>
<p>Kind of like the difference between using raw char* vs. a string class for low level string operations, the Windows style system is the most resource efficient. The gettext system is less tedious to program with and, for better or worse, more tolerant of errors. You can find tools to retrofit your old code for either style. Also, there are various kinds of tools for both systems that allow translators to translate application strings without access to program source code.</p>
<p>Since my API is a lowest common denominator, mapping my simple API to syslog and the Windows Event Log is fairly straightforward.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2007/08/18/logging-for-services-gui-and-command-line-applications/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Switching from PayflowPro to PayPal Website Payments Pro</title>
		<link>http://blogs.teztech.com/2007/03/13/switching-from-payflowpro-to-paypal-website-payments-pro</link>
		<comments>http://blogs.teztech.com/2007/03/13/switching-from-payflowpro-to-paypal-website-payments-pro#comments</comments>
		<pubDate>Wed, 14 Mar 2007 02:32:41 +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/2007/03/13/switching-from-payflowpro-to-paypal-website-payments-pro</guid>
		<description><![CDATA[Way back in 1996 I created an e-commerce web site for a small software company I owned. The system allowed customers to purchase and download software our web site. To make the system appealing and easy to use for buyers, we processed credit cards automatically. Back then, there were no Internet credit card processing gateways, but [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Way back in 1996 I created an e-commerce web site for a small software company I owned. The system allowed customers to purchase and download software our web site. To make the system appealing and easy to use for buyers, we processed credit cards automatically. Back then, there were no Internet credit card processing gateways, but I was able to purchase some rather expensive software that allowed my computer to emulate a credit card terminal. The software used the computer&#8217;s modem to call a modem bank at the credit card processor and complete the transaction. There was a way to automate the software via text files and command lines and that&#8217;s what I did. It was slow, but it worked.</p>
<p>Eventually, my credit card processor teamed up with one of the first companies to offer an Internet credit card processing gateway, Cybercash. I hopped on board as one of the first customers. <span id="more-18"></span>As with a lot of APIs created by hurried teams of inexperienced programmers, Cybercash was much more complex than was necessary to accomplish the simple task at hand. Credit card processing can be really simple: Pass the credit card processor a list of required fields and get back an Boolean success code and an error message.  HTTPS is a fine protocol for this type of stateless transaction that must occur over a secure channel. Input fields can be passed as a URL encoded query string. The error code and error message could be returned an HTTP response code or via a URL encoded fields in the response body. The modern, fancy name for this type of transaction protocol is <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>. Under the hood of its overly complex API, Cybercash used the simple REST protocol I described earlier. Liked a lot of other Cybercash programmers, I eventually figured this out on my own and bypassed the complex and cumbersome API to use the simple REST protocol.</p>
<p>Time passed on and Verisign bought up all kinds of important technology related to e-commerce. They purchased Cybercash and started promoting their own gateway API, PayflowPro. Several times, we researched the fees and APIs offered by the various vendors. PayflowPro was the best and <a href="https://www.t3city.com/SupportFAQ.aspx?FAQID=10">the one we used and recommended</a>. The PayflowPro API was a tad bit easier to use than the official Cybercash API &#8211; easy enough that instead of bypassing the API for the REST protocol, I used the actual PayflowPro API function calls.</p>
<p>When the time came to automate the billing for T3city, I started out with PayflowPro. However when it came time to get a new merchant account, I took some time to review my options. On paper, PayPal Website Payments Pro looked pretty good &#8211; they have a nice and simple fee structure (unlike PayflowPro with all sorts of fees billed out at different times) and the fees are competitive if you can get your volume over $3,000/month (and not too bad if you can&#8217;t). The sign-up process was all online. I figured it couldn&#8217;t be too hard to change gateway APIs &#8211; I&#8217;d already used several others &#8211; so I made the switch.</p>
<p>Well, I was wrong about the difficulty level associated with switching from PayflowPro to PayPal. The PayPal API is much more complex. First, there is the fact that the API is <a href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> based. In addition to the more complex SOAP protocol, the PayPal programming examples use another layer on top of the native SOAP API. Why they add this extra layer, I really don&#8217;t know &#8211; maybe it&#8217;s just a fact that every junior programmer feels like an extra layer or two will make things simpler. It doesn&#8217;t make the API any easier to use. In fact, I found the differences between the new layer and the documentation for the base SOAP protocol very confusing. In the end, I elected to ditch the PayPal examples and use PayPalSvc.wsdl and .Net&#8217;s SOAP support tools to generate my own SOAP client for the PayPal API. The resulting API is a little awkward is spots (mostly due to PalPals not so hot API design), but at least it matches the detailed and fairly comprehensive PayPal SOAP protocol documentation.</p>
<p>Once you get over the base complexity of the PayPal SOAP based API, then you have to deal with the stateful nature of PayPal. Credit card processing is normally a simple transaction, but the PayPal Website Payments Pro program requires that you offer your customers the option to pay via PayPal. And, what the heck, allowing payments by PayPal is not such a bad idea.  However, unlike a simple credit card transaction, payments with PayPal naturally flow over a series of pages, some on your site and some on PayPal&#8217;s site. Information such as billing and shipping addresses and invoice line items have to be exchanged in a delicate dance. Assuming you are willing to tackle the complexity of proper error handling, avoiding browser complaints about HTTPS redirects and giving the user the ability to cancel cleanly, getting PayPal transactions to flow smoothly turns out to be a fairly complex.</p>
<p>Is the extra complexity worth it? Consider these points:</p>
<ul>
<li>Both gateways are very reliable. </li>
<li>PayPal fee structure is simpler, clearly specified on their web site and may be less expensive &#8211; YMMV. Traditional store fronts may be able to get better rates from their current processors with a different gateway API.</li>
<li>PayPal charges the same fees for all types of credit cards. AMEX fees are usually higher, so this may save you some money, but, again, YMMV.</li>
<li>PayPal does not require any type of term or volume commitment</li>
<li>Accepting PayPal is nice &#8211; giving customers more ways to pay you is a good thing!</li>
<li>Implementing PayPal Website Payments Pro is a good deal harder than using PayflowPro. Depending on your web site/application, adding stateful credit card / PayPal transaction processing may require adding new database fields, new screens and other large scale programming changes.</li>
<li>Under .Net, PayPal Website Payments Pro does not require any native (non .Net) code. To use PayflowPro in .Net, I load and make native function calls into the native PayflowPro DLL.</li>
<li>PayPal Website Payments Pro requires full names for states (not the typical 2 letter codes) and proper ISO country codes for every transaction. If you don&#8217;t already have validation in place and tables to translate state codes into state names (users <em>will </em>use 2 letter state codes if you let them), this support will require additional programming work.</li>
<li>With PayPal Website Payments Pro, you have to perform an additional step to transfer money from your PayPal account into your bank account.  Funds from credit card purchases show up in your PayPal account immediately, but transfers to your bank account take multiple business days (similar to the delay you&#8217;ll have with a traditional merchant service provider and PayflowPro). In theory, you can use funds in your PayPal account immediately for purchases via PayPal, but you would need a careful strategy to ensure proper accounting.</li>
<li>To credit a customer via PayPal, you must create a new credit transaction that references a special code from the original sale transaction. Unlike PayflowPro, you cannot void a transaction and you cannot change a sale transaction to a credit transaction.</li>
<li>PayPal has different and likely much more strict fraud protection measures. Overall, I like this capability, but it did cause some pain during our switch when credit cards on file from long term customers no longer worked because of mismatched a CVV number, a mistyped expiration date, etc..</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2007/03/13/switching-from-payflowpro-to-paypal-website-payments-pro/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>readme.txt vs. readme.html</title>
		<link>http://blogs.teztech.com/2007/02/16/readmetxt-vs-readmehtml</link>
		<comments>http://blogs.teztech.com/2007/02/16/readmetxt-vs-readmehtml#comments</comments>
		<pubDate>Fri, 16 Feb 2007 22:53:55 +0000</pubDate>
		<dc:creator><![CDATA[pj]]></dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://teztech.com/2007/02/16/readmetxt-vs-readmehtml</guid>
		<description><![CDATA[I&#8217;m mulling over the idea of publishing some of the development tools I&#8217;ve created. For right now, I&#8217;m just looking for a simple way to allow &#8220;friends and family&#8221; to see my notes and source code for a few key projects. I don&#8217;t think many people on my list will have the time and energy to download [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m mulling over the idea of publishing some of the development tools I&#8217;ve created. For right now, I&#8217;m just looking for a simple way to allow &#8220;friends and family&#8221; to see my notes and source code for a few key projects. I don&#8217;t think many people on my list will have the time and energy to download and compile stuff (unless it&#8217;s something they happen to need right away). I personally like to kick the tires of interesting projects around a bit first by browsing the source code.  So, what I have in mind is a <a href="http://websvn.tigris.org/">web interface to a Subversion source code control repository</a>. The idea of browsing my project folders via the web brings up the idea of using readme.html files. I&#8217;ve considered this idea more than once in the past.<span id="more-16"></span></p>
<p>Most of my projects have a <em>readme.txt</em> file. Typically, a readme file will include an overview of the project and, if it is a code library, a few key source code samples ready to copy and paste. In the past, I have considered using .html files or even .doc files instead of .txt files. I&#8217;ve stuck with readme.txt for two reasons: One, I&#8217;m mostly working in a programmer&#8217;s editor. True, many IDEs have built-in HTML editors, but they are usually slow to load. Two, all the worrying about fonts and styles can be distracting. Overall, both these problems introduce what I&#8217;m going to call <em>friction</em> for lack of a better term. When you&#8217;ve built up some coding momentum (and this is important to do for reasons I may one day get around to writing about), friction slows you down. Some types of friction are important to the overall goals of a project and just can&#8217;t be avoided, but if friction is avoidable, then I say avoid it and gain some coding efficiency. Over time, the overviews and code samples in a readme.txt file can be pretty important to a project.  HTML (or Word) formatting is pretty, but it increases friction for no practical benefit that I can see. Thus, readme.txt instead of readme.html.</p>
<p>So, returning to the subject of browsing a source repository. I started thinking that maybe readme.html was not such a bad idea after all. All you really need, is &lt;h1&gt;, &lt;h2&gt;, &lt;p&gt; and &lt;pre&gt; tags. How much hassle could that be? Tables can be handy, right? So, first I started thinking about getting a global style sheet in place, next I started thinking about creating a template I could use to create a new readme.html.  Then, I started to think about how much friction I was going to add to day-to-day development and what the benefits will be. It&#8217;s a tougher choice than it was in the past, but, for now, I&#8217;m sticking with readme.txt.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.teztech.com/2007/02/16/readmetxt-vs-readmehtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
