Function TestWebServiceCall() As String
'Set the Web Service URL - (JUST A WEB SERVICE I FOUND FOR TESTING PURPOSES)
webServiceURL = "http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA "
'Set Attributes
webTransfer = CreateObject("roUrlTransfer")
webTransfer.SetPort(CreateObject("roMessagePort"))
webTransfer.SetUrl(webServiceURL)
webTransfer.AddHeader("Content-Type","application/x-www-form-urlencoded")
??????????
XmlTransfer = webTransfer.GetToString()
Return XmlTransfer
End Function
xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://api.example.com/someMethod")
result = xfer.GetToString()
"RokuChris" wrote:
Depending on the level of control you need over the transfer, there are several different ways to do this. roURLTransfer is documented in the Component Reference document in the SDK. The simplest way to fetch the contents of a URL would look like this:xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://api.example.com/someMethod")
result = xfer.GetToString()
Function TestWebServiceCall_2() As String
xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA ")
result = xfer.GetToString()
Return result
End Function
Print(TestWebServiceCall_2())
"jkard" wrote:
So I built the following, and it's not returning anything, even though I can see the web service works. What should I be expecting from this, should I see the XML string? Right now, nothing isFunction TestWebServiceCall_2() As String
xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA ")
result = xfer.GetToString()
Return result
End Function
Print(TestWebServiceCall_2())
Function TestWebServiceCall_2() As String
xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA")
result = xfer.GetToString()
Return result
End Function
Sub Main()
Print(TestWebServiceCall_2())
end Sub
"jkard" wrote:
So the next question would be, now that I have the XML in a string, can I pass it to a XML object for parsing?