RequestProfil, userLanguage and SOAP Error

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
martinm
Posts: 4
Joined: Wed Mar 18, 2020 8:59 am

RequestProfil, userLanguage and SOAP Error

Post by martinm »

Hi!

I tried to read the directions in German from the directionDescriptionLanguage (ManeuverEvent).

According to the documentation, the userLanguage of the requestProfile must be set to "de". However, if I do that, I get an error:
Invalid content was found starting with element 's01:requestProfile'. One of '{requestProfile, geometryOptions, timeouts, userLogs, waypoints, routeOptions, resultFields}' is expected.

But the requestProfile form the RouteRequest is set as Type RequestProfile.

Look at the Documents:
soaplog_nok.txt -> the File with de requestProfile
soaplog_ok.txt -> the File without the requestProfile

Thnaks for help.

Martin.
Attachments
soaplog_nok.txt
soaplog_nok
(2.59 KiB) Downloaded 300 times
soaplog_ok.txt
soaplog_ok
(962.19 KiB) Downloaded 322 times
Last edited by martinm on Mon Apr 06, 2020 11:18 am, edited 1 time in total.
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: RequestProfil, userLanguage and SQL Error

Post by Bernd Welter »

Cheerio,

I checked your request. The problem is cause by the namespace reference:
malicious request...
malicious request...
How did you create it?

The following request works fine and by changing the "userLanguage" works like a charm...

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema' xmlns:types='http://xroute.xserver.ptvgroup.com'>
  <SOAP-ENV:Body><types:calculateRoute><request>
  <requestProfile xmlns:s01="http://service.xserver.ptvgroup.com" xmlns:s02="http://profile.xserver.ptvgroup.com" mapLanguage="de" userLanguage="de">
    <vehicleProfile xmlns:s03="http://vehicleprofile.xserver.ptvgroup.com">
      <weight emptyWeight="1000"></weight>
    </vehicleProfile>
  </requestProfile>
  <waypoints xsi:type="types:OnRoadWaypoint" name="WP1">
    <location xmlns:s01="http://routing.xserver.ptvgroup.com">
      <coordinate xmlns:s02="http://geometry.xserver.ptvgroup.com" x="15.539560261" y="46.778850533"></coordinate>
    </location>
  </waypoints>
  <waypoints xsi:type="types:OnRoadWaypoint" name="WP2">
    <location xmlns:s01="http://routing.xserver.ptvgroup.com">
      <coordinate xmlns:s02="http://geometry.xserver.ptvgroup.com" x="7.938059350535332" y="53.2525060679351"></coordinate>
    </location>
  </waypoints>
  <resultFields waypoints="true" nodes="true" polyline="true" guidedNavigationRoute="true">
    <legs enabled="true"></legs><eventTypes>MANEUVER_EVENT</eventTypes>
  </resultFields>
 </request>
</types:calculateRoute>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
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:
martinm
Posts: 4
Joined: Wed Mar 18, 2020 8:59 am

Re: RequestProfil, userLanguage and SOAP Error

Post by martinm »

Hi!

I spoke to our software manufacturer and I had to change the class structure a little and now the <s01: no longer comes. So everything works wonderfully.

Best regards
Martin
Post Reply