ok - I've got my GoogleTest client running, and it can make a soap request to
google, and I can use tcpmon to see the xml returned. Of course, when I run

String ret = (String) call.invoke( params );

I get an exception after the XML is returned from api.google.com:

- Exception:
org.xml.sax.SAXException: Deserializing parameter 'return':  could not find
deserializer for type {urn:GoogleSearch}GoogleSearchResult

So, does this mean I HAVE to write a java class (deserialiser?) to deal with the
soap response? Can't I just get back the payload in some generic SoapResponse
class, and query it? 

My previous SOAP experience involves cocoon with XSP/stylsheets, so this was as
simple as:

...
<xsl:apply-templates select="search-results"/>
...
<xsl:template match="item">
    <li>
        <a>
        <xsl:attribute name="href">
        <xsl:value-of select="URL"/>
        </xsl:attribute>
        <xsl:value-of select="title"/>
        </a>
        <br/>
        <xsl:value-of select="snippet"/>
    </li>
</xsl:template>

So how do I process results in java? SOmething like this?

                                // register the GoogleSearchResult class
//                               QName gsrqn = new QName("urn:GoogleSearch",
//                                                                              
"GoogleSearchResult");
//                               Class cls = GoogleSearchResult.class;
//                               call.registerTypeMapping(cls, gsrqn, 
BeanSerializerFactory.class,
BeanDeserializerFactory.class);

?

thanks,
Scott

Reply via email to