Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
jwatt222  
#1 Posted : Tuesday, June 30, 2020 10:53:16 PM(UTC)
jwatt222

Rank: Advanced Member

Groups: Registered
Joined: 5/23/2016(UTC)
Posts: 117
United States
Location: Virginia

Thanks: 20 times
I am trying to connect to the attached Service Endpoint from zipcodes.com

On the attached WebBrowser it works fine. I have setup the attached request. However, when run in the attached simulation, I get the error message that access is denied. However talking to the technician for Zip Codes, he assure me that the error is not on his end. I've even given him access to my computer but he couldn't solve it either.

I've also attached the reported execution that shows everything should have worked just fine.

Need help with determining if I have set this up correctly and whether the access denied error being reported is acually on their end or a problem with the setup.

Would greatly appreciate that if my setup is wrong that the correct setup is shown.

Thanks,
jwatt222 attached the following image(s):
ENDPOINT.PNG
WEBBROWSER.PNG
REQUEST.PNG
SIMULATION.PNG
EXECUTION.PNG
AFC  
#2 Posted : Wednesday, July 1, 2020 2:38:52 PM(UTC)
AFC

Rank: Administration

Groups: Registered, Administrators
Joined: 9/15/2014(UTC)
Posts: 107
Austria

Was thanked: 14 time(s) in 14 post(s)
Hi!

It seems you specify the parameters twice: once in the URL and once in the parameter list.

So either
*) you specify them in the URL (without any parameter list), i.e.
Quote:
http://api.zip-codes.com/ZipCodesAPI.svc/1.0/FindZipCodesInRadius?zipcode=23954&maximumradius=50&minimumradius=0&key=XXXXXXXXXXXX

*) or you specify the URL without parameters and declare them seperately:
Quote:
http://api.zip-codes.com/ZipCodesAPI.svc/1.0/FindZipCodesInRadius
zipcode=23954
maximumradius=50
minimumradius=0
key=XXXXXXXXXXXX

This way, you should get a response from the server.

BUT: you will get parsing errors since the returned json contains a byte order mark (BOM) at the beginning of the response.
According to https://tools.ietf.org/html/rfc8259#section-8.1 this is not allowed:
Quote:
8.1. Character Encoding

JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [RFC3629].

Previous specifications of JSON have not required the use of UTF-8 when transmitting JSON text. However, the vast majority of JSON- based software implementations have chosen to use the UTF-8 encoding, to the extent that it is the only encoding that achieves interoperability.

Implementations MUST NOT add a byte order mark (U+FEFF) to the beginning of a networked-transmitted JSON text. In the interests of interoperability, implementations that parse JSON texts MAY ignore the presence of a byte order mark rather than treating it as an error.


We will try to find a workaround for this for the next version of MobileTogether, but maybe you want to ask the technician of Zip Codes, why they return a BOM, in the meantime!?

thanks 1 user thanked AFC for this useful post.
jwatt222 on 7/1/2020(UTC)
jwatt222  
#3 Posted : Wednesday, July 1, 2020 3:00:54 PM(UTC)
jwatt222

Rank: Advanced Member

Groups: Registered
Joined: 5/23/2016(UTC)
Posts: 117
United States
Location: Virginia

Thanks: 20 times
Thanks AFC for the quick response. I get errors either way. the only way to get any response at all is the way that I did before. I will get back to ZipCodes reference the BOM and update you on the response.

Thanks again as this is the only thing holding me up on releasing a new app.
jwatt222 attached the following image(s):
withparameters.PNG
withOUTparameters.PNG
jwatt222  
#4 Posted : Wednesday, July 1, 2020 7:28:15 PM(UTC)
jwatt222

Rank: Advanced Member

Groups: Registered
Joined: 5/23/2016(UTC)
Posts: 117
United States
Location: Virginia

Thanks: 20 times
AFC, James the technician took care of that and everything is working fine. Thank You so much for taking the time to help. God Bless!
AFC  
#5 Posted : Thursday, July 2, 2020 7:30:18 AM(UTC)
AFC

Rank: Administration

Groups: Registered, Administrators
Joined: 9/15/2014(UTC)
Posts: 107
Austria

Was thanked: 14 time(s) in 14 post(s)
Hello jwatt222,

Cool, that this works for you now!

For completeness and in respect to
Quote:
In the interests of interoperability, implementations that parse JSON texts MAY ignore the presence of a byte order mark rather than treating it as an error.

from above, the next version of MobileTogether will just ignore UTF8 BOMs in json responses.
jwatt222  
#6 Posted : Thursday, July 2, 2020 7:50:29 AM(UTC)
jwatt222

Rank: Advanced Member

Groups: Registered
Joined: 5/23/2016(UTC)
Posts: 117
United States
Location: Virginia

Thanks: 20 times
Awesome! Love the way you guys are making the software better on each update. It's allowing me to provide more and more functionality to my users. After 4 years with you I don't want to use any other. Thanks!
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.