Upgrading API versions |
If you wrote applications using a prior version of the API, you can update your projects to the current API by following the instructions below.
This topic contains the following sections:
The SOAP Web Service version 2 portion of Data Exchange by Verizon Connect (TDE) provides a way to access the legacy Fleet Customer API. Note that version 3 is replacing this legacy support with a new interface that is fully native to TDE.
Support for the legacy Customer API through TDE is achieved through two services:
Together, these services provide the same functionality as version 1 of the Fleet Customer API.
If you have applications that still use version 1 of the Fleet Customer API, these steps are needed to transition to version 2.
https://<customer>.api.telogis.com/v2/<customer>/wsdl
TelogisService (for logging in)
LegacyTelogisService (for all other services)
The following examples demonstrate how to upgrade.
Where in version 1 your code looked like the following:
Fleet.ServiceSoapClient service = new Fleet.ServiceSoapClient(); string sessionId = service.Login(m_customer, m_user, m_password); Fleet.AuthenticationHeader header = new Fleet.AuthenticationHeader(); header.SessionID = sessionId; // header is passed as the first argument to web methods
Now your code should look like the following:
Fleet.TelogisServiceClient telogisClient = new Fleet.TelogisServiceClient(); string authToken = telogisClient.Login( string.Format("{0}:{1}", m_customer, m_user), m_password); Fleet.LegacyTelogisServiceClient service = new Fleet.LegacyTelogisServiceClient(); Fleet.AuthenticationHeader header = new Fleet.AuthenticationHeader(); header.SessionID = authToken; // header is passed as the first argument to web methods
Where in version 1 your code looked like the following:
Fleet.Service service = new Fleet.Service(); string sessionId = service.Login(m_customer, m_user, m_password) Fleet.AuthenticationHeader header = new AuthenticationHeader(); header.SessionID = sessionId; service.AuthenticationHeaderValue = header;
Now your code should look like the following:
Fleet.TelogisService telogisService = new Fleet.TelogisService(); string authToken = telogisService.Login( string.Format("{0}:{1}", m_customer, m_user), m_password); Fleet.LegacyTelogisService service = new Fleet.LegacyTelogisService(); Fleet.AuthenticationHeader header = new Fleet.AuthenticationHeader(); header.SessionID = authToken; service.AuthenticationHeaderValue = header;