This content has been marked as final. Show 3 replies
Bumping this post because it first went out just before the Thanksgiving holiday. I've pursued this: http://www.codenotes.com/cnp/baseAction.aspx?cnp=CG000003 and was able to get the java part working easily, but ran into a wall trying to get CF7 to work with it.
Then I found this: http://tjordahl.blogspot.com/2007/03/apache-axis-and-commons-httpclient.html and it seems like I might be getting somewhere with it, but no big breakthrough yet.
Is anyone getting MapPoint web service to work with CF7?
So here's what I needed to do to get this to work with CF7:
1. Edit wwwroot/WEB-INF/client-config.wsdd to use CommonsHTTPSender per the Tom Jordahl blog post ( http://tjordahl.blogspot.com/2007/03/apache-axis-and-commons-httpclient.html).
2. Put commons-httpclient-3.1.jar and commons-codec-1.3.jar into CFusionMX7/lib. These jars are available from the Apache Commons project ( http://commons.apache.org/).
3. Add a web service entry in the CF Administrator. For the sample code to work, use the name MapPoint. The URL is the normal staging wsdl ( http://staging.mappoint.net/standard-30/mappoint.wsdl), and the username and password are the ones issued by Microsoft for your mappoint account.
The CF application service needs to be restarted to pick up the apache commons jars. At this point, the sample code should be runnable. It displays an input field which you can type an address into (e.g. "1 microsoft way, redmond, wa"), and displays a map when submitted. The code is fairly simplified and ignores things like the possibility of multiple find results.
Since this is entirely done in CFML, some of the helper objects used as function inputs need to be built up as CF structs mirroring the data members of the java objects. This is problematic in creating a MapView object because there's no way to indicate which of the derived classes (ViewByHeightWidth, ViewByScale, etc) you intend. My workaround was to use a view object returned by GetBestMapView().
Hope this will be helpful to somebody.
Thanks for posting the final code James!