You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2015/09/10 12:54:27 UTC
JAX-RS JS client frontend
Hi Benson
Hope you are reading it,
I've had this plan for a while, and given you did a JS WS frontend
(sorry if my memory is wrong here :-)), I'd just like to ask for some
ideas on how a similar RS frontend can be created.
The longer term plan is to weave Web Crypto into that somehow but first
it would be good to have a plain RS JS frontend available. Perhaps I can
even hope you can prototype something :-) ?
Cheers, Sergey
Re: JAX-RS JS client frontend
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
I am not like hierahical interface generated by wadl-client
in Example wadl
https://github.com/rbelouin/wadl-client/blob/master/spec/swagger.js
with path segments (/test/dynamic/{param}) it leads to non-intuitive call
like
var res = client.test.dynamic._.get().withParams(["12345"]).send();
also looking on current version, it has major rewrite since, now it does
not uses promises to dispatch results, but baconjs, which is doubtful
dependency
2015-09-10 16:48 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
> Thanks for a link, this is quite interesting, having WADL XML converted
> into Swagger JSON, no problems there except that I'm not sure if it can
> cope with converting the XMLSchema grammars into JSON schemas, probably
> unlikely ?
> I linked to it from JIRA, but noted CXF can also optionally offer its own
> WADL JSON representation - which keeps the same structure as WADL XML,
> except that it expects equivalent JSON schemas be available as server
> resources...
> Either way, looks like if this frontend would work with WADL then we can
> get that WADL processed as needed for JS client to operate
>
Re: JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Thanks for a link, this is quite interesting, having WADL XML converted
into Swagger JSON, no problems there except that I'm not sure if it can
cope with converting the XMLSchema grammars into JSON schemas, probably
unlikely ?
I linked to it from JIRA, but noted CXF can also optionally offer its
own WADL JSON representation - which keeps the same structure as WADL
XML, except that it expects equivalent JSON schemas be available as
server resources...
Either way, looks like if this frontend would work with WADL then we can
get that WADL processed as needed for JS client to operate
Sergey
On 10/09/15 13:11, Vjacheslav V. Borisov wrote:
> 2015-09-10 15:50 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
>>
>> Thanks, I wish we did it earlier :-). I believe RestEasy did it awhile
>> back (though not sure what exactly it offers), though the idea of having of
>> a JS frontend in CXF is not new given that it is available for WS.
>>
>
> We are using for a while https://github.com/rbelouin/wadl-client
> altough it interface is differs from what jax-rs does, istead of plain
> jax-rs resource with many functions it offers hierarchical interface
> It also uses custom json wadl format, but recently there is converter from
> wadl avaliable https://github.com/rbelouin/wadl2json
> <https://github.com/rbelouin/wadl2json>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS JS client frontend
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
2015-09-10 15:50 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
> Thanks, I wish we did it earlier :-). I believe RestEasy did it awhile
> back (though not sure what exactly it offers), though the idea of having of
> a JS frontend in CXF is not new given that it is available for WS.
>
We are using for a while https://github.com/rbelouin/wadl-client
altough it interface is differs from what jax-rs does, istead of plain
jax-rs resource with many functions it offers hierarchical interface
It also uses custom json wadl format, but recently there is converter from
wadl avaliable https://github.com/rbelouin/wadl2json
<https://github.com/rbelouin/wadl2json>
Re: JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco
Thanks, I wish we did it earlier :-). I believe RestEasy did it awhile
back (though not sure what exactly it offers), though the idea of having
of a JS frontend in CXF is not new given that it is available for WS.
What really interests me here is the possibility to indicate (via WADL
extensions for example) that this given payload needs to be signed with
a given crypto algo and then the JS client will somehow link it with
WebCrypto API and sign, and the CXF server will use its JWS code (or
even JCS - on the map) to validate, and all is cool, the problem is
WebCrypto API is apparently not yet well supported by all browsers, but
I hope by the time we are ready to address enhancing our would be JS RS
client to do WebCrypto the browsers will be ready :-)
Cheers, SErgey
On 10/09/15 12:31, Francesco Chicchiriccò wrote:
> On 10/09/2015 13:15, Sergey Beryozkin wrote:
>> Hi
>> On 10/09/15 11:59, Benson Margulies wrote:
>>> Serge, I'm here.
>>>
>>> The question is, does the wadl data model have enough in it to
>>> generate code in the form of a js function that sets up the right
>>> call.
>>
>> Definitely (I think so :-)), we have Java client code working with the
>> proxies generated by Wadl-to-Java. Swagger descriptions may also be
>> optionally provided.
>>
>>>
>>> I'm a bit swamped at the moment, but I can subscribe to dev and write
>>> up at least some notes on how to adapt the existing code in the
>>> direction you're looking for.
>>
>> Sounds good, I've opened
>> https://issues.apache.org/jira/browse/CXF-6589
>>
>> This is something which is definitely not urgent, so please share some
>> ideas at the dev or CXF-6589 whenever you have some time.
>
> This looks very cool, I don't have enough knowledge to contribute, but I
> am very interested anyway.
> Borderless CXF :-)
>
> Regards.
>
>>> On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin
>>> <sb...@gmail.com> wrote:
>>>> Hi Benson
>>>>
>>>> Hope you are reading it,
>>>> I've had this plan for a while, and given you did a JS WS frontend
>>>> (sorry if
>>>> my memory is wrong here :-)), I'd just like to ask for some ideas on
>>>> how a
>>>> similar RS frontend can be created.
>>>> The longer term plan is to weave Web Crypto into that somehow but
>>>> first it
>>>> would be good to have a plain RS JS frontend available. Perhaps I
>>>> can even
>>>> hope you can prototype something :-) ?
>>>>
>>>> Cheers, Sergey
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS JS client frontend
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 10/09/2015 13:15, Sergey Beryozkin wrote:
> Hi
> On 10/09/15 11:59, Benson Margulies wrote:
>> Serge, I'm here.
>>
>> The question is, does the wadl data model have enough in it to
>> generate code in the form of a js function that sets up the right
>> call.
>
> Definitely (I think so :-)), we have Java client code working with the
> proxies generated by Wadl-to-Java. Swagger descriptions may also be
> optionally provided.
>
>>
>> I'm a bit swamped at the moment, but I can subscribe to dev and write
>> up at least some notes on how to adapt the existing code in the
>> direction you're looking for.
>
> Sounds good, I've opened
> https://issues.apache.org/jira/browse/CXF-6589
>
> This is something which is definitely not urgent, so please share some
> ideas at the dev or CXF-6589 whenever you have some time.
This looks very cool, I don't have enough knowledge to contribute, but I
am very interested anyway.
Borderless CXF :-)
Regards.
>> On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin
>> <sb...@gmail.com> wrote:
>>> Hi Benson
>>>
>>> Hope you are reading it,
>>> I've had this plan for a while, and given you did a JS WS frontend
>>> (sorry if
>>> my memory is wrong here :-)), I'd just like to ask for some ideas on
>>> how a
>>> similar RS frontend can be created.
>>> The longer term plan is to weave Web Crypto into that somehow but
>>> first it
>>> would be good to have a plain RS JS frontend available. Perhaps I
>>> can even
>>> hope you can prototype something :-) ?
>>>
>>> Cheers, Sergey
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/
Re: JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 10/09/15 11:59, Benson Margulies wrote:
> Serge, I'm here.
>
> The question is, does the wadl data model have enough in it to
> generate code in the form of a js function that sets up the right
> call.
Definitely (I think so :-)), we have Java client code working with the
proxies generated by Wadl-to-Java. Swagger descriptions may also be
optionally provided.
>
> I'm a bit swamped at the moment, but I can subscribe to dev and write
> up at least some notes on how to adapt the existing code in the
> direction you're looking for.
Sounds good, I've opened
https://issues.apache.org/jira/browse/CXF-6589
This is something which is definitely not urgent, so please share some
ideas at the dev or CXF-6589 whenever you have some time.
Cheers, Sergey
>
>
> On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> Hi Benson
>>
>> Hope you are reading it,
>> I've had this plan for a while, and given you did a JS WS frontend (sorry if
>> my memory is wrong here :-)), I'd just like to ask for some ideas on how a
>> similar RS frontend can be created.
>> The longer term plan is to weave Web Crypto into that somehow but first it
>> would be good to have a plain RS JS frontend available. Perhaps I can even
>> hope you can prototype something :-) ?
>>
>> Cheers, Sergey
Re: JAX-RS JS client frontend
Posted by Benson Margulies <be...@basistech.com>.
Serge, I'm here.
The question is, does the wadl data model have enough in it to
generate code in the form of a js function that sets up the right
call.
I'm a bit swamped at the moment, but I can subscribe to dev and write
up at least some notes on how to adapt the existing code in the
direction you're looking for.
On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi Benson
>
> Hope you are reading it,
> I've had this plan for a while, and given you did a JS WS frontend (sorry if
> my memory is wrong here :-)), I'd just like to ask for some ideas on how a
> similar RS frontend can be created.
> The longer term plan is to weave Web Crypto into that somehow but first it
> would be good to have a plain RS JS frontend available. Perhaps I can even
> hope you can prototype something :-) ?
>
> Cheers, Sergey