Hi Guys, I'm really stuck on this problem and I am hoping somone has a quick fix, only because I'll have to write my own hack if required. So, what I'm doing is simply calling the google web service. I've been stuck on this problem for a while. I receive a "Specified Cast Exception". When I investigate further, the type returned is an XmlTreeNode, where it should be a GoogleSearchResult. I programmed a seperate .NET application that calls the web service and it works no problem. My application dynamically loads an assembly which invokes the Google web service proxy. What I have done is captured the SOAP calls, the following is what happens when I call it from my test application:
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Cache-control: private Transfer-Encoding: chunked Date: Mon, 07 Jun 2004 14:13:21 GMT Server: GFE/1.3 2b00 <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP- ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="ns1:GoogleSearchResult"> <directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory[0]"> </directoryCategories> <documentFiltering xsi:type="xsd:boolean">false</documentFiltering> <endIndex xsi:type="xsd:int">10</endIndex> <estimateIsExact xsi:type="xsd:boolean">false</estimateIsExact> <estimatedTotalResultsCount xsi:type="xsd:int">9180</estimatedTotalResultsCount> <resultElements xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement[10]"> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.comdig.org/hawking.php</URL> <cachedSize xsi:type="xsd:string">4k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string">&quot;I think the next century will be the century of <b>complexity</b>.&quot;. Stephen<br> <b>Hawking</b>. Source: SAN JOSE MERCURY NEWS &#39;UNIFIED THEORY&#39; IS <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"><b>Complexity</b> Digest: <b>Hawking</b> Quote</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.comdig.org/resource.php? source1=Warns+Hawking%2C+Guardian</URL> <cachedSize xsi:type="xsd:string">6k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string">ComDig Resources Warns <b>Hawking</b>, Guardian. First <b>...</b> Page. Quote url: http://www.comdig.com/resource.php? source1=Warns+<b>Hawking</b>%2C+Guardian <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"><b>Complexity</b> Digest Resources: Warns <b>Hawking</b>, Guardian</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.hawking.org.uk/lectures/dice.html</URL> <cachedSize xsi:type="xsd:string">15k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> audience. But the trouble is, Laplace was rather like Prewst, in that<br> he wrote sentences of inordinate length and <b>complexity</b>. So <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Professor Stephen <b>Hawking</b></title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.hawking.org.uk/text/public/dice.html</URL> <cachedSize xsi:type="xsd:string">27k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> audience. But the trouble is, Laplace was rather like Prewst, in that<br> he wrote sentences of inordinate length and <b>complexity</b>. So <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Professor Stephen <b>Hawking</b></title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://clinton4.nara.gov/Initiatives/Millennium/shawk ing.html</URL> <cachedSize xsi:type="xsd:string">31k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> Science in the Next Millennium Remarks by Stephen <b>Hawking</b>. <b>...</b> The ultimate theory will<br> place no limit on the <b>complexity</b> of systems that we can produce and it is in <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Stephen <b>Hawking</b></title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://clinton4.nara.gov/textonly/Initiatives/Millenn ium/shawking.html</URL> <cachedSize xsi:type="xsd:string">24k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> Instead, I expect <b>complexity</b> to increase at a rapid rate, both in<br> the biological and electronic spheres. <b>...</b> Q&amp;As at <b>Hawking</b> Lecture. <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Stephen <b>Hawking</b></title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://agelesslearner.com/intros/complexity.html</URL > <cachedSize xsi:type="xsd:string">36k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> I think the next century will be the century of <b>complexity</b>.&quot; ...Stephen<br> <b>Hawking</b>. &quot;Ideas thus made up of several simple ones put <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Learn about <b>Complexity</b> :: Ageless Learner</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.complexity- society.com/digest.htm</URL> <cachedSize xsi:type="xsd:string">101k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> resguide/comdig/ (Chinese GB-Code). &quot;I think the next century will<br> be the century of <b>complexity</b>.&quot; Stephen <b>Hawking</b>. 9 February 2004. <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"><b>Complexity</b> Society Digest 2004</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://vlad-home- page.fcpages.com/UWS/MAchaos.html</URL> <cachedSize xsi:type="xsd:string">22k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string">&quot;I think the 21st century will be the century of <b>complexity</b>. &quot; Stephen<br> <b>Hawking</b>. <b>COMPLEXITY</b>, CHAOS and CREATIVITY. Masters Program <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"><b>Complexity</b> and Chaos</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.lns.cornell.edu/spr/2001- 06/msg0033443.html</URL> <cachedSize xsi:type="xsd:string">6k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"> <b>...</b> that <b>Hawking</b> assigned Laflamme is outlined in the book about the movie about the<br> book. Regards, George: References: Re: Universe/Entropy/<b>Complexity</b> (again): From <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Re: Universe/Entropy/<b>Complexity</b> (again)</title> </item> </resultElements> <searchComments xsi:type="xsd:string"></searchComments> <searchQuery xsi:type="xsd:string">Complexity Hawking</searchQuery> <searchTime xsi:type="xsd:double">0.216859</searchTime> <searchTips xsi:type="xsd:string"></searchTips> <startIndex xsi:type="xsd:int">1</startIndex> </return> </ns1:doGoogleSearchResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 0 This is a successful find, so all is good. How ever, I use my application where I use exact web proxy, all I do is change the user agent name: HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Cache-control: private Transfer-Encoding: chunked Date: Mon, 07 Jun 2004 14:22:18 GMT Server: GFE/1.3 8ea <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP- ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="ns1:GoogleSearchResult"> <directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory[0]"> </directoryCategories> <documentFiltering xsi:type="xsd:boolean">false</documentFiltering> <endIndex xsi:type="xsd:int">1</endIndex> <estimateIsExact xsi:type="xsd:boolean">false</estimateIsExact> <estimatedTotalResultsCount xsi:type="xsd:int">9250</estimatedTotalResultsCount> <resultElements xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement[1]"> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.comdig.org/hawking.php</URL> <cachedSize xsi:type="xsd:string">4k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string">&quot;I think the next century will be the century of <b>complexity</b>.&quot;. Stephen<br> <b>Hawking</b>. Source: SAN JOSE MERCURY NEWS &#39;UNIFIED THEORY&#39; IS <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"><b>Complexity</b> Digest: <b>Hawking</b> Quote</title> </item> </resultElements> <searchComments xsi:type="xsd:string"></searchComments> <searchQuery xsi:type="xsd:string">Complexity Hawking</searchQuery> <searchTime xsi:type="xsd:double">0.389783</searchTime> <searchTips xsi:type="xsd:string"></searchTips> <startIndex xsi:type="xsd:int">1</startIndex> </return> </ns1:doGoogleSearchResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 0 This example shows that they are exactly the same. Now, the first one worked and the second one didn't. Why, your guess is as good as mine. However, what I have noticed is that there is no content length attatched, which leaved the soap proxy guessing when the call is finished. However, it manages the first call ok but falls over on the second one. Is this possibly something to do with threading? Is there a thread waiting and it never fires back? I've notified Google, but I don't think they really care since everyone else is ok. Any quick fixes??? =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com