Interfacing with XServer APIs

Within this forum we want to offer discussions all around our .NET based Map control including all .Net-language specific questions concerning calls of the xServer-API. Attention: xServer-relevant concepts can be found in further forums such as xRoute or xTour.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Interfacing with XServer APIs

Post by Bernd Welter »

Hi there,

A customer approached me these days with som,e questions about interfacing. He wants to connect to xServer2 APIs and started with the clients we provide with the setup. He has some questions about versions and maybe we can exchange some details in this space:
I downloaded client classes from the PTV xServer environmentand found the xserver-client-bundle-2.30.0.zip archive.These classes are connecting to via the Open API protocol. A first Unit test connect with https://xserver2-test.cloud.ptvgroup.com was succsessful.

Playing around with the classes raised some questions:
  • The generated API is based on the Microsoft.Rest library which is seen as "deprecated vom Microsoft.
  • The generated API is based on the NewtonSoft library for serialization / deserialization of JSON
My questions:
  • Is the correct API / client bundle I am supposed to use?
  • Is there an alternative approach provided by PTV which does not require Microsoft.Rest?
  • Is there an API approach which uses the standard Microsoft JSON serializer / deserializer System.Text.Json?
And here's some instant feedback from Oliver:
xserver-2 supports both SOAP and OpenAPI (v2) protocols. Depending on the protocol, the client classes can either be generated using the VS-tools (SOAP) or autorest (OpenAPI) https://github.com/Azure/autorest.

The code contained in the bundled classes was generated using WCF and autorest respectively DSC_UsingWithDotnet.htm

We only guarantee the compatibility of the OpenAPI-spec with autorest generator. If you want to be in control of the dependencies, one option would be to write your own proxy stub, as discussed here .
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