Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Mon, 08 Oct 2007 01:00:37 -0000,    group: microsoft.public.xml.soap        back       


Yahoo SOAP search in VBA   
Hi all,

I am very new to SOAP, so hope someone can help me.  I am trying to do
an internet search in Access using VBA.

Here is what I have been trying for code:
    Dim objSoapClient As SoapClient30
    Dim strSearch As String
    Const YahooAPI As String = "http://api.search.yahoo.com/
WebSearchService/V1/webSearch?query="
    Const YahooKey As String = "&appid=MyID"

    If IsNull(txtSearch.Value) Then
        MsgBox "Nothing to search for.", vbInformation, "Nothing
entered"
        Exit Sub
    End If
    Let strSearch = YahooAPI & Replace(txtSearch.Value, " ", "+") &
"&results=2" & YahooKey
    Debug.Print strSearch
    Set objSoapClient = New SoapClient30
    objSoapClient.MSSoapInit (strSearch)
    Let lblResults.Caption = client.result.summary

I get an error message on the line:  objSoapClient.MSSoapInit
(strSearch)

Run Time Error '-2147024809 (80070057)':+
WSDLReader:Could not find '/definitions' inside the default WSDL
namespace HRESULT=0x80004005: Unspecified error
 - WSDLReader:Loading of the WSDL file failed HRESULT=0x80004005:
Unspecified error
 - Client:One of the parameters supplied is invalid.
HRESULT=0x80070057: The parameter is incorrect.

I have a reference set to Microsoft Soap Type Library v3.0 &
Microsoft XML, v4.0

I get the error message even with the references set.  By the way, if
I paste strSearch into the address bar of an internet browser, I do
get XML for the results I am looking for.
date: Mon, 08 Oct 2007 01:00:37 -0000   author:   Kerry

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us