Differences between REST, JSON and SOAP

Deals with generic topics such as logging, framework and so on. If you are not sure where to place your topic just put it here.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Differences between REST, JSON and SOAP

Post by Bernd Welter »

Hi there,

it happens every once in a while that a player wants to access an extended feature during a call with the REST API knowing that PTV is able to fullfill his functional requirement but the developer doesn't find the required parameter in the xServer2 API documentation.

For example I was asked recently how to
- perform a routing which avoids specific countries
- set vehicle dimensions and then consider PTV_TruckAttributes

Here's some valuable info about this:

1. REST vs SOAP/JSON: we offer various protocols such as REST, JSON and SOAP. While the SOAP and JSON interfaces cover 100% of the servers API capabilities the REST API is much easier to use but also limited in the access to parameters. From my perspective REST is useful for a simple but also less flexible access to features. If you need access to all available parameters in the framework I recommend to evaluate the JSON API (most important protocol) or SOAP.

2. RequestBase: often a developer identifies the JSON/SOAP method he wants to call (e.g. xRoute.calculateRoute or xLocate.searchLocations). He then looks for parameters which enable him to control the call and he looks for them "below" the documentation of the method. The thing is that some of these parameters (e.g. "vehicle dimensions" or "routing parameters") are part of the generic RequestBase which is the super class of all individual requests. At least I have witnessed several players who didn't see this link between parametrizing and API documentation.
https://xserver2-europe-eu-test.cloud.p ... equestBase

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply