Hi all,
Hope someone can assist here...
I am trying to make use of a very basic rest service as described in the documentation below:
https://dashboard.clearbit.com/docs#logo-api
You simply send it a url and it returns a PNG file. (Logo of the associate URL).
In my AIM app I have configured (see below) the response as a image/PNG but when I request the service I get the error "Nonexistent attribute:
LogoDOCTYPE"
I tried it with Postman and it returns the image as expected.
Any suggestions?[
How to store images returned by REST service
Re: How to store images returned by REST service
See below postman result:
Re: How to store images returned by REST service
karelh,
I am not sure this is possible with AwareIM out of the box.
I expose a web service that allows users to send us a picture, and the data for that picture needs to be in a certain format.
See forum post: https://www.awareim.com/forum/viewtopic.php?f=1&t=11766
I am exposing a web service and you are consuming a web service, but I assume the data for the image you are getting back needs to be in a similar format as what I needed. I doubt the web service you are consuming is returning the data in the AwareIM required format.
I am not sure this is possible with AwareIM out of the box.
I expose a web service that allows users to send us a picture, and the data for that picture needs to be in a certain format.
See forum post: https://www.awareim.com/forum/viewtopic.php?f=1&t=11766
I am exposing a web service and you are consuming a web service, but I assume the data for the image you are getting back needs to be in a similar format as what I needed. I doubt the web service you are consuming is returning the data in the AwareIM required format.
Bob
Re: How to store images returned by REST service
So what if you receive the image into a plain text field.
And then did an assignment statement in a rule concatenating the file name and the “hash” in front of that text string into picture field.
I wonder what would happen
And then did an assignment statement in a rule concatenating the file name and the “hash” in front of that text string into picture field.
I wonder what would happen
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: How to store images returned by REST service
If you can at least get it into that text field, then you are very close from a very small Java function to set that data into the picture field, in the event that the assignment I spoke of prior, doesn’t work because of syntax.
ThePic = myfunc(filename, base64data)
ThePic = myfunc(filename, base64data)
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: How to store images returned by REST service
HI guys,
Thanks for the ideas and response.
Yeah I have tried that but it does not work either. So from the postman response headers I can confirm that the content returned is image/PNG and when I select this as the content type in AIM a have to select a PICTURE type attribute. See below:
If I do select a text field, I need to change the content type and if I do I get the below response.
Thanks for the ideas and response.
Yeah I have tried that but it does not work either. So from the postman response headers I can confirm that the content returned is image/PNG and when I select this as the content type in AIM a have to select a PICTURE type attribute. See below:
If I do select a text field, I need to change the content type and if I do I get the below response.
-
- Posts: 1463
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: How to store images returned by REST service
That error message is suggesting that Customer.LogoBase is not an attribute of type Picture.
Re: How to store images returned by REST service
Hi PointsWell,
Thanks and that is what I also assumed but if I select the correct content type and picture attribute I still get an error "Nonexistant attribute: LogoDOCTYPE"
I also tried moving that picture attribute to the disk instead of the DB but no luck.
Thanks and that is what I also assumed but if I select the correct content type and picture attribute I still get an error "Nonexistant attribute: LogoDOCTYPE"
I also tried moving that picture attribute to the disk instead of the DB but no luck.
-
- Posts: 7532
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: How to store images returned by REST service
Could you please send us a BSV for testing and describe how to reproduce the problem in this BSV?
Aware IM Support Team
-
- Posts: 7532
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: How to store images returned by REST service
Please retest this in build 3125
Aware IM Support Team
Re: How to store images returned by REST service
HI support,
Do you still need a sample BSV or should we just wait for version 3125?
Do you still need a sample BSV or should we just wait for version 3125?
-
- Posts: 1463
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
-
- Posts: 7532
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: How to store images returned by REST service
This build is out, so please test the problem in that build.
Aware IM Support Team
Re: How to store images returned by REST service
Hi support,
I installed the new version but now get the following error when the API is called.
com.bas.basserver.executionengine.ExecutionException: Service provider returned the following error: Internal error. Error writing attribute (conn=25564) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '[B@1dd8fa37 WHERE ID=8249' at line 1
I installed the new version but now get the following error when the API is called.
com.bas.basserver.executionengine.ExecutionException: Service provider returned the following error: Internal error. Error writing attribute (conn=25564) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '[B@1dd8fa37 WHERE ID=8249' at line 1
-
- Posts: 7532
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: How to store images returned by REST service
Can you please send us the BSV to test?
Aware IM Support Team