xServer / Token
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
xServer / Token
Hey there,
last question for this year;)
How to include the token (e.g. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) into the URL, so I do not always have to enter it manually?
URL:
https://xserver2.cloud.ptvgroup.com/ser ... s/XLocate/
Many thanks in advance & Happy new year to all of you!
Max
last question for this year;)
How to include the token (e.g. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) into the URL, so I do not always have to enter it manually?
URL:
https://xserver2.cloud.ptvgroup.com/ser ... s/XLocate/
Many thanks in advance & Happy new year to all of you!
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- Bernd Welter
- Site Admin
- Posts: 2584
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: xServer / Token
Hi Max,
welcome in 2023!
Please add &xtok=yourToken to the URL of the REST call.
Is that what you've been looking for?
Best regards,
Bernd
welcome in 2023!
Please add &xtok=yourToken to the URL of the REST call.
Is that what you've been looking for?
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...
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...
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xServer / Token
Hi Bernd,
Welcome,too
Thanks for your reply > I gave it a try.
For the local xServer, the following code works for me:
For xServer internet, the following code raises an error for me (No Service found):
Do you see my fault?
PS: The Token-Test is successful.
Best regards
Max
Welcome,too
Thanks for your reply > I gave it a try.
For the local xServer, the following code works for me:
Code: Select all
Req.Open "Post", "http://msomap4:50000/services/ws/XLocate", False
Code: Select all
Req.Open "Post", "https://xserver2.cloud.ptvgroup.com/services/ws/XLocate/&xtok=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", False
PS: The Token-Test is successful.
Best regards
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- felix.glueck
- Posts: 4
- Joined: Fri Apr 22, 2022 7:34 am
Re: xServer / Token
Hi Max,
authentication via the url only works with REST(Representational state transfer) endpoints.
For example:
https://xserver2-test.cloud.ptvgroup.co ... XXXXXXXXXX
should work if you paste in your token.
For JSON and SOAP Endpoints you will have to provide your token via Basic access authentication in the http header.
An example of this can be found on the attached screenshot from Postman.
Greetings,
Felix
authentication via the url only works with REST(Representational state transfer) endpoints.
For example:
https://xserver2-test.cloud.ptvgroup.co ... XXXXXXXXXX
should work if you paste in your token.
For JSON and SOAP Endpoints you will have to provide your token via Basic access authentication in the http header.
An example of this can be found on the attached screenshot from Postman.
Greetings,
Felix
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xServer / Token
Hi Felix,
thanks for your reply.
Sorry, I need your help here.
I took one example of the raw request runner, see Screenshot.
How to add the header including Username (xtok) and Token (123x-456y-789z)?
Best regards
Max
thanks for your reply.
Sorry, I need your help here.
I took one example of the raw request runner, see Screenshot.
How to add the header including Username (xtok) and Token (123x-456y-789z)?
Code: Select all
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://xlocate.xserver.ptvgroup.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<xs:searchLocations>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://xlocate.xserver.ptvgroup.com" xsi:type="ns3:SearchByAddressRequest" scope="globalscope" storedProfile="default" coordinateFormat="EPSG:4326">
<searchOptions outputCountryType="ISO_3166_1_ALPHA_3"/>
<address city="Garnich"/>
</request>
</xs:searchLocations>
</soap:Body>
</soap:Envelope>
Best regards
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xServer / Token
Hi there
Is the question clear? Or do you need more information?
I tried so many things > but have no clue/ideas anymore how to make it work.
Glad if we can work it out.
Best regards
Max
Is the question clear? Or do you need more information?
I tried so many things > but have no clue/ideas anymore how to make it work.
Glad if we can work it out.
Best regards
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- felix.glueck
- Posts: 4
- Joined: Fri Apr 22, 2022 7:34 am
Re: xServer / Token
Hey Max,
sorry for the late reply.
You can access the header of the raw request runner by pressing the little letter icon at the top of the raw request runner. There you can provide information for the header of your request. But I do not know if this is useful for your intent. Because this information is not saved when downloading the request from the raw request runner.
If you just want to speed up entering your credentials when using the raw request runner, you can try saving them in your browser.
The individual steps differ depending on the web browser. For chrome you have to go to options ->password manager --> Add password --> "Website": https://xserver2-dashboard.cloud.ptvgroup.com ; username: "xtok"; password: "123x-456y-789z".
After that, the credentials should be saved and filled in by your browser everytime you use the raw request runner. Hope this helps!
sorry for the late reply.
You can access the header of the raw request runner by pressing the little letter icon at the top of the raw request runner. There you can provide information for the header of your request. But I do not know if this is useful for your intent. Because this information is not saved when downloading the request from the raw request runner.
If you just want to speed up entering your credentials when using the raw request runner, you can try saving them in your browser.
The individual steps differ depending on the web browser. For chrome you have to go to options ->password manager --> Add password --> "Website": https://xserver2-dashboard.cloud.ptvgroup.com ; username: "xtok"; password: "123x-456y-789z".
After that, the credentials should be saved and filled in by your browser everytime you use the raw request runner. Hope this helps!
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xServer / Token
Good morning Felix,
thanks for your reply.
I took the location-code from the RawRequestRunner for purpose of an example.
Please consider the question independently of the use of RawRequestRunner. Sorry for confusion
As far as I understood you correctly, the following code needs a header - that is needed for authorization- including Username (xtok) and Token (123x-456y-789z).
My question:
How to add the missing authorization-information within the code?
Best regards
Max
thanks for your reply.
I took the location-code from the RawRequestRunner for purpose of an example.
Please consider the question independently of the use of RawRequestRunner. Sorry for confusion
As far as I understood you correctly, the following code needs a header - that is needed for authorization- including Username (xtok) and Token (123x-456y-789z).
My question:
How to add the missing authorization-information within the code?
Code: Select all
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://xlocate.xserver.ptvgroup.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<xs:searchLocations>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://xlocate.xserver.ptvgroup.com" xsi:type="ns3:SearchByAddressRequest" scope="globalscope" storedProfile="default" coordinateFormat="EPSG:4326">
<searchOptions outputCountryType="ISO_3166_1_ALPHA_3"/>
<address city="Garnich"/>
</request>
</xs:searchLocations>
</soap:Body>
</soap:Envelope>
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- felix.glueck
- Posts: 4
- Joined: Fri Apr 22, 2022 7:34 am
Re: xServer / Token
Hi Max,
thanks for the clarification
In your screenshot I can only see the body of the message to be transmitted. The header is part of the HTTP protocol and is usually set independently from the body of the message. What programming language, client, library or program are you using to send the message?
thanks for the clarification
In your screenshot I can only see the body of the message to be transmitted. The header is part of the HTTP protocol and is usually set independently from the body of the message. What programming language, client, library or program are you using to send the message?
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xServer / Token
Hello Felix,
thank you for your answer!
I use Excel-Vba.
With your help the solution was found!
I could fill in the username and password within the Req:
Dim Req As Object
Set Req = CreateObject("MSXML2.XMLHTTP")
Req.Open "Post", "https://xserver2.cloud.ptvgroup.com/services/ws/XLocate", False, "xtok", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
Maaaany thanks for your help
Best regards
Max
thank you for your answer!
I use Excel-Vba.
With your help the solution was found!
I could fill in the username and password within the Req:
Dim Req As Object
Set Req = CreateObject("MSXML2.XMLHTTP")
Req.Open "Post", "https://xserver2.cloud.ptvgroup.com/services/ws/XLocate", False, "xtok", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
Maaaany thanks for your help
Best regards
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics