Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having problem with <cfobject>...

Status
Not open for further replies.

robvelton

Programmer
Jun 29, 2004
2
0
0
US
Right now the server is running Windows 2000 and CF Server 5.0

Here is the code that I am having trouble with:

<cfobject type="com" action="create" class="MapQuest.Exec" name="MapClient">
<cfset MapClient.ServerName = "map.access.mapquest.com">
<cfset MapClient.ServerPath = "mq">
<cfset MapClient.ServerPort = "80">
<cfset MapClient.ClientId = "SOMEID">
<cfset MapClient.Password = "SOMEPASS">
<cfobject type="com" action="create" class="MapQuest.Exec" name="GeocodeClient">
<cfset GeocodeClient.ServerName = "geocode.access.mapquest.com">
<cfset GeocodeClient.ServerPath = "mq">
<cfset GeocodeClient.ServerPort = "80">
<cfset GeocodeClient.ClientId = "SOMEID">
<cfset GeocodeClient.Password = "SOMEPASS">
<cfobject type="com" action="create" class="MapQuest.Exec" name="RouteClient">
<cfset RouteClient.ServerName = "route.access.mapquest.com">
<cfset RouteClient.ServerPath = "mq">
<cfset RouteClient.ServerPort = "80">
<cfset RouteClient.ClientId = "SOMEID">
<cfset RouteClient.Password = "SOMEPASS">

<cfobject type="com" action="create" class="MapQuest.Address" name="OriginAddress">
<cfset result = OriginAddress.Init()>
<cfset OriginAddress.Street = OriginStreet>
<cfset OriginAddress.City = OriginCity>
<cfset OriginAddress.State = OriginState>
<cfset OriginAddress.PostalCode = OriginZip>
<cfset OriginAddress.Country = OriginCountry>
<cfobject type="com" action="create" class="MapQuest.Address" name="DestAddress">
<cfset result = DestAddress.Init()>
<cfset DestAddress.Street = DestStreet>
<cfset DestAddress.City = DestCity>
<cfset DestAddress.State = DestState>
<cfset DestAddress.PostalCode = DestZip>
<cfset DestAddress.Country = DestCountry>

<cfobject type="com" action="create" class="MapQuest.GeocodeOptionsCollection" name="OriginOptions">
<cfset result = OriginOptions.Init()>
<cfobject type="com" action="create" class="MapQuest.LocationCollection" name="OriginResults">
<cfset result = OriginResults.Init()>
<cfset result = GeocodeClient.Geocode(OriginAddress,OriginResults,OriginOptions)>


Now the problem occurs towards the bottom on the GeocodeClient.Geocode

Here is the error that I get:

Unable to resolve this varaible using provided runtime information.

Error building an argument list for: GEOCODE

If anyone has any idea or suggestions please let me know. This is getting very frusterating and I am starting to see the limits of cold fusion. :(
 
Here is what Geocode is expecting:

HRESULT Geocode ([in]IAddress *pAddress,[in, out]VARIANT *pResults,[in, optional]VARIANT pGeocodeOptions)

Possibly erroring because it is expecting a pointer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top