openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Minto van der Sluis <>
Subject Re: Are Java actions first class citizens?
Date Wed, 13 Sep 2017 15:43:34 GMT
Thanks for your reply Ben.

I added a remark to issue 2466 referring to my attempt and the the 
issues I run into.

A possible way out is  to modify the swagger template to cope with 
untyped properties. I will look into this once I have some time ;-)



On 13-09-17 14:49, Ben Browning wrote:
> Is there a bug for the KeyValue class being generated incorrectly from the
> Swagger spec? That's something we should be able to fix to make generating
> clients in other languages, like Java, easier. At a glance it looks like
> perhaps the type of the value property should be defined as object which
> translates to java.lang.Object (so anything) in generated Java client code.
> I'll take a look and add some comments on issue 2590 to help you get the
> changes tested.
> Ben
> On Mon, Sep 11, 2017 at 4:15 PM, Minto van der Sluis <> wrote:
>> Hi,
>> I have been scratching the surface of Openwhisk and I like it a lot. But
>> since Java is the eco system (language + tooling) I am most comfortable
>> with, I would like to create my actions in java. Luckily Openwhisk supports
>> Java.
>> Unfortunately diving a bit deeper somehow gives me the impression that
>> Java is not really a first class citizen. Why do I get this impression?
>> There are a number of reasons:
>> 1) Examples
>> I can hardly find any decent Java based examples beyond hello world. In
>> particular how to invoke other actions from within a Java action.
>> Seaching on Github with "Openwhisk java" results in only 4 projects :-(
>> and one of them is mine (see 2)
>> 2) Openwhisk java client API
>> Searching for Openwhisk client libraries results in libraries for
>> javascript, swift, go and python. Unfortunately none for java. There is
>> however a feature request:
>> bator-openwhisk/issues/2466
>> I had a little go at it myself. The API is mostly generated from the
>> swagger file. Unfortunately the Swagger code generator generates unusable
>> code for one the most important data structures, KeyValue.
>> My Openwhisk Java API can be found at:
>> isk-client-java
>> Yes it desperately needs some additional documentation, but first I want
>> to fix the KeyValue issue. And example of using the library from outside
>> openwhisk can be found in the code at:
>> isk-client-java/blob/master/openwhisk-api-client-retrofit/
>> src/test/java/
>> 3) Fully qualified method name does not work for Java action handlers
>> (see: wsk action create --main)
>> For this I already created an issue:
>> bator-openwhisk/issues/2590
>> I even tried solving this one myself, have a look at my fork at:
>> Fixing the issue was easy, but testing it seems to be much more complex.
>> Maybe I need a little help here to be able to complete this one.
>> All this gives me the impression that the focus for Openwhisk is on a lot
>> of languages but not on Java. Or am I totally wrong here?
>> Please share your thoughts.
>> Kind regards,
>> misl
>> PS 1: For the interested I might have another project worth taking a look
>> at. Openwhisk Package and Action annotations -
>> . It includes a script
>> to quickly upload the generated Jar file. This one is also still needs
>> documentation, but to see how it works have a look at the examples.
>> PS 2: Oh by the way, If any of these projects are of interest, I am
>> willing to donate.

View raw message