Search found 74 matches

by tsupartono
Wed Jul 03, 2019 3:07 pm
Forum: Questions & Answers
Topic: Retrieving API request body
Replies: 6
Views: 322

Re: Retrieving API request body

Yes - the upcoming EPC 142060 should fix the issue.
by tsupartono
Wed Jul 03, 2019 12:55 pm
Forum: Questions & Answers
Topic: Retrieving API request body
Replies: 6
Views: 322

Re: Retrieving API request body

Your #Document.RootNode is an array, so you can just iterate through it

Code: Select all

For Each(#Child) In(#Document.RootNode)
	#STD_INT := #Child<'id'>.AsInt32
Endfor
by tsupartono
Wed Jul 03, 2019 12:48 pm
Forum: Questions & Answers
Topic: XPRIM_HttpRequest
Replies: 1
Views: 134

Re: XPRIM_HttpRequest

The original code I provided was not correct - my apology for that. Providing the path when calling AsFile is the culprit as that stops the auto delete from doing its job. Can you change the #TempFile type to #PRIM_ALPH Define_Com Class(#PRIM_ALPH) Name(#TempFile) And change the AsFile invocation li...
by tsupartono
Wed Jul 03, 2019 11:42 am
Forum: Questions & Answers
Topic: Getting a Windows username
Replies: 5
Views: 295

Re: Getting a Windows username

Not sure it there are other ways, but an easy way would be to read from environment variables. Below code will get the username, domain, and home directory of the currently logged-in user. Define_Com Class(#XPRIM_OSUtil) Name(#OSUtil) Define_Com Class(#PRIM_BOLN) Name(#Found) #USERNAME := #OSUtil.Ge...
by tsupartono
Fri Jun 28, 2019 5:07 pm
Forum: Questions & Answers
Topic: Mobile Dataset Question
Replies: 5
Views: 280

Re: Mobile Dataset Question

The RDML components, samples, and the Database Schema Editor can be installed using the LANSA Package Manager that comes with the upcoming EPC 142060 . For early access, follow this guide below, but please bear in mind that it's a pre-release software. https://blogs.developer.lansa.com/docs/vl/insta...
by tsupartono
Thu Jun 27, 2019 10:46 am
Forum: Questions & Answers
Topic: Mobile Dataset Question
Replies: 5
Views: 280

Re: Mobile Dataset Question

LANSA Mobile does have support for SQLite local database.

I believe this has been used in a service work for a customer - hopefully I can get the consultant involved in the work to share their experience in this forum.
by tsupartono
Mon Jun 24, 2019 3:21 pm
Forum: Product Announcements
Topic: Google 64-bit app requirement for LANSA Mobile (Custom Version)
Replies: 0
Views: 114

Google 64-bit app requirement for LANSA Mobile (Custom Version)

If you have a LANSA Mobile custom version subscription with Android support, you may get an email from Google indicating that from August 2019, new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play. LAN...
by tsupartono
Fri Jun 21, 2019 11:48 am
Forum: Questions & Answers
Topic: Retrieving element name from JSON Message
Replies: 4
Views: 288

Re: Retrieving element name from JSON Message

You can play around with it now, there won't be any change in the API itself. The upcoming EPC142060 corrects some issues in PRIM_JSON.Document : LoadFromString does not take unicode string LoadFromFile missing path parameter Getting decimal value throws an error Also, if you use the publishing web ...
by tsupartono
Fri Jun 14, 2019 4:38 pm
Forum: Questions & Answers
Topic: Retrieving element name from JSON Message
Replies: 4
Views: 288

Re: Retrieving element name from JSON Message

I'm assuming you are going to do this on your server-side code (server module). The best way right now is to use PRIM_JSON.Reader See https://apps.lansa.com/lansav14sp2/dem/xdemow_12.html for usage example. Have a look at this forum post as well: https://forum.developer.lansa.com/viewtopic.php?f=3&t...
by tsupartono
Tue Jun 11, 2019 11:16 am
Forum: Questions & Answers
Topic: listen for a http post
Replies: 1
Views: 166

Re: listen for a http post

You can create an RDML server module that's exposed as web services. Have a look at this guide for details on publishing web services: https://apps.lansa.com/lansav14sp2/dem/xdemow_12.html The guide explains how to create service endpoints (URLs from where the service can be accessed), and how to ex...
by tsupartono
Fri May 17, 2019 9:37 am
Forum: Questions & Answers
Topic: Retrieve the device name of iOS device
Replies: 2
Views: 235

Re: Retrieve the device name of iOS device

If it’s running in LANSA Mobile, then yes, otherwise no.
by tsupartono
Thu May 09, 2019 5:25 pm
Forum: Questions & Answers
Topic: CORS policy and HttpRequest
Replies: 4
Views: 305

Re: CORS policy and HttpRequest

Yes you can definitely do it server-side using XPRIM_HttpRequest or Integrator.

Most HTTP request contains secret information such as API keys/credentials anyway, so generally they must be done from the server (as the browser is not a secure environment).
by tsupartono
Thu May 09, 2019 4:56 pm
Forum: Questions & Answers
Topic: CORS policy and HttpRequest
Replies: 4
Views: 305

Re: CORS policy and HttpRequest

It's the destination website that needs to set the Access-Control-Allow-Origin header, not your RDML code.
The error basically is saying that the destination website does not allow your web app to use its resource.
Do you have control over the destination server? Can you make a change to it?
by tsupartono
Tue Apr 09, 2019 11:16 am
Forum: Questions & Answers
Topic: encoding & sha-1
Replies: 2
Views: 4771

Re: encoding & sha-1

We can add SHA-1 algorithm to XPRIM_CryptoHash. It will be included in the next EPC - which will be released in the next month or so.
If you need it urgently, we can provide a pre-release package for you.
Contact LANSA Support to log the request.
by tsupartono
Thu Mar 28, 2019 5:00 pm
Forum: Tips and Techniques
Topic: Reading huge JSON data in web service invocation....
Replies: 3
Views: 7445

Re: Reading huge JSON data in web service invocation....

Jim, A couple of comments. The RDML Extended Library (XPRIM components) was created so that new & experimental features can be released faster to customers. Some components will, in due time, be made into proper VL PRIMs (such as the JSON reader). The price to pay however is that the XPRIM component...
by tsupartono
Tue Mar 26, 2019 11:29 am
Forum: Questions & Answers
Topic: LANSA Mobile for Windows 7
Replies: 7
Views: 7482

Re: LANSA Mobile for Windows 7

Have a look at this one - this should work on Chrome. https://developers.google.com/web/fundamentals/media/capturing-images/ You would need to write a widget. Once you have the picture on a canvas, you can pass the Base64 encoded picture to VL web, convert it to BLOB, and send it to the server. And ...
by tsupartono
Tue Mar 26, 2019 11:15 am
Forum: Questions & Answers
Topic: LANSA Mobile for Windows 7
Replies: 7
Views: 7482

Re: LANSA Mobile for Windows 7

When you say save it as a BLOB, you mean as a file on the Windows file system?
by tsupartono
Tue Mar 26, 2019 10:27 am
Forum: Questions & Answers
Topic: LANSA Mobile for Windows 7
Replies: 7
Views: 7482

Re: LANSA Mobile for Windows 7

You may not need LANSA Mobile.

Can you tell us a bit more what you are trying to do with the picture once taken?
by tsupartono
Mon Mar 25, 2019 5:53 pm
Forum: Tips and Techniques
Topic: Reading huge JSON data in web service invocation....
Replies: 3
Views: 7445

Reading huge JSON data in web service invocation....

The XPRIM_JsonReader (and XPRIM_RandomAccessJsonReader ), which is part of the RDMLX Extended Library , does not perform well when reading large amount of JSON data, as it's an RDML library , as opposed to a native VL feature . Also, performance on the IBM i is definitely worse than on Windows . If ...