cancel
Showing results for 
Search instead for 
Did you mean: 

Appeon (mobile) call webservice

tobias
Explorer
0 Kudos

Hello folks!

Just a short question: Can anyone tell me how to call a webservice from an appeon-app which is giving back a byte-array?

Thanks,

Tobias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Tobias;

  I have not tried this but ....

  Typically, PB and/or Appeon wants to treat any returned array of data as an ANSI Result Set. Thus, I would suspect that you would need to convert the byte data to an any array of CHAR to get it passed through OK - then convert it back to byte at the client side.

Regards ... Chris

PS: I pass back & forth arrays of standard data types in PB & Appeon all the time.

tobias
Explorer
0 Kudos

Hello Chris,

well, going the PB-way with soapconnection will not work.

So I gave the appeon-control "appeonwebservicecomponent" (from appeon_workarounds.pbl) a chance, but there is only a function returning int-datatype.

At the moment I no way to accomplish this.

Regards,

Tobias

Former Member
0 Kudos

What data are you actually trying to pass as BYTE?

tobias
Explorer
0 Kudos

Input-parameter of the webservice is a string, output-parameter is a pdf-Document. This comes as byte-array.

Former Member
0 Kudos

Yes, even BLOB would not work from the PB/Appeon side as its expecting a standard ANSI result set format. I will let the Appeon guys answer this from the "work Around" side. I''m just starting a project that will need to do this but have not coded anything yet - so I cannot help you much further here.

However ... if you are in control of the WS:

1) How about writing the PDF to a temporary table and then have the WS pass back the DBKey to Appeon. Then let the PB/Appeon component go after the PDF with a SelectBlob ( ).

2) The WS could also write the PDF document to the Web Server - then pass back its URL to the caller. Then the PB/Appeon component could use the iNET object to go after the URL to get the PDF document back to the application that way.

Food for thought.

HTH

Regards ... Chris

tobias
Explorer
0 Kudos

Hello Chis,

well, the WS is used at several places, so changing it is not an oppertunity. We could just build a wrapper arround it, saving the data to a blob-column.

But, I really do not like this kind of implementation. A lot of workarounds...

So, I think I have to contact the appeon-guys and ask them for oppertunites - maybe there is a way keeping my perfect world alive. 😉

Thanks,

Tobias

Former Member
0 Kudos

Hi Tobias;

   Yes, please contact Appeon. I think that would be prudent as they may have some other suggestions / workarounds as well other than what I suggested.

  Please share any information you receive back from Appeon as I will be needing this functionality in my next Appeon application that I will be actually starting to code next week.

Many thanks in advance!

Regards ... Chris

tobias
Explorer
0 Kudos

I got an answer from the appeon-guys:


Sorry to inform you that the byte array return value of webservice is not supported, ...


If you want to read/write the PDF file, please use Appeon file server solution by following up the steps below.

  1. Install the Appeon File Server.
  2. Upload the PDF file that needs to be downloaded to the Appeon File Server.
  3. Add the appeon_workarounds.pbl to the mobile App, and call the function of_appeondownload of the appeonfileservice to download the PDF file to the mobile device thus this file will be automatically saved to the directory appeongetcachedir()+"/plugin".
  4. You can access the PDF file via appeongetcachedir()+"/plugin/"+%filename% in your Mobile app.

Regarding how to configure and use the Appeon File Server please refer to the help documentation at:

http://www.appeon.com/support/documents/appeon_online_help/2.0/workarounds_and_api_guide/ch01s03s04....

HTH,

Tobias

Former Member
0 Kudos

Hi Tobias;

  Nice .. that's a variation on my suggestion to use the iNet object to send the web server a URL request to download the PDF to the client workstation. Either avenue should work but still requires you to change your WS to save the PDF file in a known location for the web server to find the resource.

Good luck!

Regards ... Chris

Answers (0)