Monday, July 27, 2009

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown

I have some development experience in SharePoint OM. I programmed on web parts, features, events etc. Now it’s time to do SharePoint program by using SharePoint web services.

In my last post, I made a solution to display positions and other information of vessels in SharePoint. In this solution, BizTalk gets GPS text data from the vendor through FTP, converts to xml and then updates Vessel lists in several Vessel Pool sites. Finally the Google Map web part displays the vessels’ information.

I got this error when I worked on BizTalk side to call the SharePoint web service: “Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown”. This happened when I tried to get the list items in vessel list. This is because the URL I used to call the web service is TopSite + "/_vti_bin/Lists.asmx". The web service in SharePoint is scope based, which means I can only call the web services which are in the same site I’m operating. So I change the URL to SubSite + "/_vti_bin/Lists.asmx", and it works!

Tuesday, July 7, 2009

A Solution to Display Vessels’ Information on the Google Map

Currently I’m working for a shipping company which operates about 180 vessels. These vessels belong to different vessel pools, and each pool has a SharePoint site which contains shared documents, lists, and minutes and so on. What the users want is to display the vessels’ information, especially the position information on a map in their site. A vendor is providing geographic information now. It uploads a text file through FTP twice per day. The text file contains the following information: Call sign, IMO (International Marine Organization) No., Vessel name, Polling time, Latitude, Longitude, Ship speed, Ship direction. So the question is how to update vessels’ information automatically in a map in SharePoint site.

My solution is to use BizTalk to update data and create a Google Map web part to display the vessels’ information.

First I created a list called Vessels in each pool site. The list has all the columns in the text file plus some additional columns. A BizTalk application was created to monitor the FTP folder, pick up the text file and parse it to xml. A map, an orchestration and a SharePoint adapter send port were created to update list Vessels in each pool site. So the lists keep updated.

Then I created a Google Map web part which gets positions’ information from list Vessels. I customized the Icon and the InforWindow so they can contain more information about vessels. It looks perfect.

So far so good except for one issue. The pool sites are shared between our employees and customers. The customers access the pool sites through VPN and the URLs are different from the ones our employees use. The Google Map API key I generated from Google is based on one URL, and it doesn’t work in another URL!