Select to view content in your preferred language

Create a Webservice for Routing

1244
4
07-28-2011 10:26 AM
ChanduAndhe
Emerging Contributor
Hi,

I am trying to create a webservice which can take in orders and give a string which contains rounte information. I am able to use the sample code available to look at how to add the address, but not able to see how to understand how to get the information out regarding the route.

We are using ArcLogistics 9.3.

Would you please help.

Thanks,
C
0 Kudos
4 Replies
JeffWickstrom
Esri Contributor
Hello,

Perhaps have a look at the ExportToArcLogisticsNavigator sample for some code related to iterating routes and stops.  CheckTripRequests also does something similar.

Creating a routing web service violates the single user desktop license.  Sorry if that is a surprise.  For this sort of thing you should have a look at ArcGIS Server and the Network Analyst extension.  ArcLogistics uses the same underlying technology.

FYI in ArcGIS 10.1 there are new functions specifically designed for server that make fleet routing easier and faster.  Perhaps you can sign up for the 10.1 beta.  10.1 also includes web services to do routing which you may want to use directly instead of hosting your own.  

Jeff
0 Kudos
ChanduAndhe
Emerging Contributor
Jeff,

Thanks for the reply, I am looking into the 10.1 and also the online Tasks as possible solutions.

Meanwhile, I am looking at the 9.3 samples as you have mentioned. I looked into the CheckTripRequests, and exporttoNavigator samples. I am unable to get what I am looking for. I am pretty new to ArcLogistics.

The bottom line of what I am trying to do is:

1) Create a windows form solution where I can call the ALApplication and add some orders/Addresses.
2) Get a Route based on the addresses.

What would be the best way to achieve this thing in 9.3.

Thanks,
Chandu
0 Kudos
JeffWickstrom
Esri Contributor
Hello Chandu,

Being new to ArcLogistics, I suggest learning how to use the application first.  Run through a few tutorials, make some routes of your own, etc.  What you see in the API directly reflects everything you see in the UI.

If all you need to do is make one route that visits multiple addresses, ArcLogistics is not going to be the best tool for this.  The API does not make that task easy.  Sort of like trimming your roses with a chain saw.

I would start by making a new project that has your locations(s), vehicle(s), and route(s).  Perhaps add a routing folder so you don't need to do that bit in code.  Now have a look at a plugin sample like ExternalAddData which shows geocoding a new order and adding it. Once your code can do that, call IALRoutingFolder.BuildRoutes() to route the orders.  Open the project in ArcLogistics to check that you indeed have route(s).  From here, other samples like the ExportToNavigator are a good start at looking through the results. 

IALRoutingFolder.ExportToNALayer() may also be a "convenient" way to consume the result.  This is a Network Analyst (ArcGIS) layer and there is much doc and examples about these. 

Jeff
0 Kudos
ChanduAndhe
Emerging Contributor
Jeff,

Thanks for the quick reply. I will go through the steps you have mentioned and see how it goes.

Chandu
0 Kudos