Java Client
-------------------------------------------------------
This contains the JAXB sample code for Routing Service.

Requirement:

This requires any Java IDE to run the project.

Steps to start:

src folder contains samples and lib contains all required jars to run samples.
Each individual class under package com.mapinfo.routing.service.client is a runable sample.

Change needed

1) Configure a routing data source in WebMC(http://<server>:<port>/managementconsole/#/databaseResourcesCreate) with name US, pointing to US Driving data. We have used the same name in the sample.
  The point used in client is of North-East region, make sure you add at least North-East region or change points accordingly.

2) In SOAPClientConstants Java classes, change the SERVICE_URL to point to the Routing service instance you want to run against
   If the client is run against RJS, it should be
		public final static String SERVICE_URL = "http://<server>:<port>/<context>/services/RoutingService?wsdl";
   If the client is run against Spectrum, it should be
		public final static String SERVICE_URL = "http://<server>:<port>/soap/RoutingService?wsdl";

3) By default sample is configured to run against Spectrum's Token based security. To run against basic security, comment the call to function named setSpectrumTokenAuthCredentials(...) and uncomment the
   call to function setBasicAuthCredentials(...) in GetTravelBoundaryClient.java.   

   Note: If you are running against RJS, both these lines should be commented.
//////////////////////////////////////////////////////////

.Net Client
----------------------------------------------------------
This contains the c# sample code for Routing Service

Requirement:

This requires visual studio 8 or above with .NET framework 3.5 or above.

steps to start:
1) In Spectrum server, Configure a routing data source in WebMC(http://<server>:<port>/managementconsole/#/databaseResourcesCreate) with name US, pointing to US North East Driving data. We have used the same name in the sample.
2) Open the .sln file with visual studio.
3) Open 'Configure Service Reference' by right clicking serviceReference1/2, change the endpoint address property to point to the Routing service instance you want to run against and click OK.
   
   If the client is run against RJS, the endpoint address is 
	For ServiceReference1,	http://<server>:<port>/<routing_war_name_deployed>/services/RoutingService
		
   If the client is run against Spectrum:  
	The endpoint address should be updated accordingly:
		For ServiceReference1,  http://<server>:<port>/soap/RoutingService
		For ServiceReference2,	http://<server>:<port>/security/TokenManagerService

	In C# "TokenManager.cs" file, change the DEFAULT_SERVICE_URL to point to the Routing service instance you want to run against
		public final static String DEFAULT_SERVICE_URL = "http://<server>:<port>/soap/RoutingService?wsdl";

4)  Once service references are updated in step 3, in 'app.config' change <binding name="RoutingServiceBinding" > to look as below.
	It is required for running samples against basic authentication of spectrum.
    <binding name="RoutingServiceBinding" >
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Basic" realm="" />
          </security>
    </binding>

5) By default sample is configured to run against Spectrum's Token based security. To run against basic security, 

   Comment the below  line
		RoutingServiceInterfaceClient client = TokenManager.getRoutingClient();
		
   and Uncomment the below line
		RoutingServiceInterfaceClient client = ClientHelper.getRoutingClient();

   NOTE: If you are running against RJS, you need to comment the below line 
		RoutingServiceInterfaceClient client = TokenManager.getRoutingClient();
	and uncomment below
		//RoutingServiceInterfaceClient client = ClientHelper.getRoutingClient();
	in GetTravelBoundaryClient.cs and GetTravelCostMatrixClient.cs.

6) Finally, User have to set which service client he wants to execute. Select 'SoapServiceClients' in solution explorer, open it's properties and select the service from 'startup object' list. Save the changes.
	
Rebuild the code in the solution and run it.
Each individual file is a runnable sample.