GWT + Open API

554 views
Skip to first unread message

Irek Szczesniak

unread,
Mar 20, 2017, 9:06:08 AM3/20/17
to GWT Users
Hi,

I need to develop a web client with GWT, which consumes a web service defined with Open API (formerly Swagger).

I wonder whether someone could offer some advice on how to do it best with GWT.


Thanks,
Irek

Rogelio Flores

unread,
Mar 20, 2017, 1:24:41 PM3/20/17
to GWT Users
We use RestyGWT to consume a swagger REST API and are very pleased with it:

Ignacio Baca Moreno-Torres

unread,
Mar 20, 2017, 7:01:23 PM3/20/17
to GWT Users
JsInterop and XMLHttpRequest is a good option too, aka. autorest ;)... this WIP generator reads openapi from apisguru and generates the GWT JsInterop spec.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Ireneusz Szcześniak

unread,
Mar 21, 2017, 1:32:41 AM3/21/17
to google-we...@googlegroups.com
Thank you, Rogelio, for your info.

But I guess no code is generated automatically, you have to develop it
yourself. Is this right?

I'm not fully for code generation (such code is usually messy and hard
to read), but generating some bits, like a model of the data
structures could be useful.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.
> To post to this group, send email to
> google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com>.

Ireneusz Szcześniak

unread,
Mar 21, 2017, 2:08:59 AM3/21/17
to google-we...@googlegroups.com
Thank you, Ignacio, for your input.

What's cool in your solution is that it uses the JsInterop provided by
GWT.

I wonder what are the pro and cons of the JsInterop approach versus
the RestyGWT approach.

On 21.03.2017 00:00, Ignacio Baca Moreno-Torres wrote:
> JsInterop and XMLHttpRequest is a good option too, aka. autorest ;)...
> this WIP generator reads openapi from apisguru and generates the GWT
> JsInterop spec.
>
> On Mon, Mar 20, 2017 at 6:24 PM Rogelio Flores
> <rogelio...@gmail.com <mailto:rogelio...@gmail.com>> wrote:
>
> We use RestyGWT to consume a swagger REST API and are very pleased
> with it:
>
> https://resty-gwt.github.io/index.html
>
>
>
> On Monday, March 20, 2017 at 7:06:08 AM UTC-6, Irek Szczesniak wrote:
>
> Hi,
>
> I need to develop a web client with GWT, which consumes a web
> service defined with Open API (formerly Swagger).
>
> I wonder whether someone could offer some advice on how to do
> it best with GWT.
>
>
> Thanks,
> Irek
>
> --
> You received this message because you are subscribed to the Google
> Groups "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.
> To post to this group, send email to
> google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com>.
> Visit this group at
> https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.
> To post to this group, send email to
> google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com>.

Jens

unread,
Mar 21, 2017, 5:43:40 AM3/21/17
to GWT Users
Swagger itself has also a code generator that already can output JavaScript so you could wrap it using JsInterop. You could also write a custom plugin for Swagger's code generator that outputs GWT compatible Java code directly.

Just open your swagger JSON in http://editor.swagger.io/#!/ and download the generated code if you want to take a look at the generated JavaScript output.


-- J.

Ireneusz Szcześniak

unread,
Mar 21, 2017, 6:01:01 AM3/21/17
to google-we...@googlegroups.com
Thanks, Jens! This sounds interesting.

Are there some examples on how to do that? I guess, the problem is
not how to use JsInterop, but how to handle asynchronous HTTP requests
with the generated data model.


Best,
Irek

Ignacio Baca Moreno-Torres

unread,
Mar 21, 2017, 3:47:15 PM3/21/17
to GWT Users
Accessing REST apis using JsInterop is easy and natural. RestyGWT add almost nothing if you use JsInterop so you better use XMLHttpRequest directly (RequestBuilder is easier, and is a thin wrapper around XMLHttpRequest). If you want a bit of code-organization, you might use AutoREST, but this do not add more than a template to define each endpoint, actually enforces you to use JAX-RS, which might just block you in some cases. You really should try to map a few endpoints with a few models using JsInterop and com.google.gwt.http.client.RequestBuilder to feel how easy and clean it is. Do it progressively mapping each endpoint you need to use. If you have any doubt just ask for the specific endpoint or model you have a problem with.
>     To post to this group, send email to
>     google-we...@googlegroups.com
>     <mailto:google-we...@googlegroups.com>.
>     Visit this group at
>     https://groups.google.com/group/google-web-toolkit.
>     For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Rogelio Flores

unread,
Mar 21, 2017, 3:50:16 PM3/21/17
to GWT Users
We do auto-generate Java source code out of the swagger api (including a GWT module). That allows us to use the Models on both client and server side. So we don't have to write much code. Basically all we do is specify some options for RestyGWT and specify the endpoints. 

Ireneusz Szcześniak

unread,
Mar 22, 2017, 12:20:55 AM3/22/17
to google-we...@googlegroups.com
Thanks, Ignacio! Your description sounds very convincing. If
JsInterop + RequestBuilder do the trick (out of the GWT box), then
that's awsome! I'll give it a try. Thanks again!
> > <rogelio...@gmail.com <javascript:> <mailto:rogelio...@gmail.com
> <javascript:>>> wrote:
> >
> > We use RestyGWT to consume a swagger REST API and are very
> pleased
> > with it:
> >
> > https://resty-gwt.github.io/index.html
> <https://resty-gwt.github.io/index.html>
> >
> >
> >
> > On Monday, March 20, 2017 at 7:06:08 AM UTC-6, Irek
> Szczesniak wrote:
> >
> > Hi,
> >
> > I need to develop a web client with GWT, which consumes
> a web
> > service defined with Open API (formerly Swagger).
> >
> > I wonder whether someone could offer some advice on how
> to do
> > it best with GWT.
> >
> >
> > Thanks,
> > Irek
> >
> > --
> > You received this message because you are subscribed to the
> Google
> > Groups "GWT Users" group.
> > To unsubscribe from this group and stop receiving emails
> from it,
> > send an email to
> google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
> > To unsubscribe from this group and all its topics, send an email to
> > google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.

Ireneusz Szcześniak

unread,
Mar 22, 2017, 12:39:09 AM3/22/17
to google-we...@googlegroups.com
Thanks, Rogelio!

When you auto-generate Java source code, do you use swagger-codegen to
generate Java client code, so that you get Java classes implementing
the types from the OpenAPI #/definitions?
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
> > To unsubscribe from this group and all its topics, send an email to
> > google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.

Rogelio Flores

unread,
Mar 22, 2017, 6:51:25 PM3/22/17
to GWT Users
Yes, those are the Models I was referring to.

I can't compare my approach to JsInterop + RequestBuilder/XMLHttpRequest because I haven't tried it, but having used RequestBuilder (and direct XMLHttpRequest) before, I can't see how you will write less code using that approach. A benefit of doing things in Java is that GWT will optimize the resulting javascript (Java classes/methods from the generated api that don't get used aren't included).

>     <javascript:>>.
>     > To post to this group, send email to
>     > google-we...@googlegroups.com <javascript:>
>     > <mailto:google-we...@googlegroups.com <javascript:>>.
>     > Visit this group at
>     https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>.
>     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Ireneusz Szcześniak

unread,
Mar 23, 2017, 7:16:58 AM3/23/17
to google-we...@googlegroups.com
Thank you, Rogelio, for your input.

I like the idea of generating the data model from the OpenAPI
specification, because I will not have to write some boring
error-prone code. I also like the optimization of the GWT compiler.

The swagger-codegen can output Jaxrs Cxf Client, which has the API
interface defined with JAX-RS annotations. So it seems that even the
interfaces could be auto-generated. You only have to modify them so
that they extend RestService, required by RestyGWT.

Have you tried auto-generating the API interfaces with Jaxrs Cxf Client?

In your previous message you wrote that you auto-generate a GWT
module. What do you specifically mean by a module here? Do you use
some publicly-available tools, or do you have something home-grown?
> > > google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > > <mailto:google-web-tool...@googlegroups.com
> <javascript:>
> > <javascript:>>.
> > > To post to this group, send email to
> > > google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>.
> > > Visit this group at
> > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> > google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> > Visit this group at
> https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.

Ignacio Baca Moreno-Torres

unread,
Mar 23, 2017, 12:05:29 PM3/23/17
to google-we...@googlegroups.com

Just curious, the API is internal or external, the swagger spec is public?


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

Rogelio Flores

unread,
Mar 23, 2017, 5:56:44 PM3/23/17
to GWT Users
No, I have not tried generating API interfaces for a CXF client. I don't remember even seeing that option when we first created the api (more than a year ago). I might try that out.

To create our GWT "Models" module, we simply add a gwt module file with these 3 lines:

<module rename-to='Models'>
   <source path="model" />

</module>


to the generated Java source code, package it into a jar file, and we can import and use that module on any GWT app (and also on the server side along with the rest of the generated files, so we can call the same api programmatically).

Our API is externally available (to customers that buy our enterprise product) so that customers can request/manipulate the data with their own RESTful clients if they choose to.
>     >     > google-web-toolkit+unsub...@googlegroups.com
>     <javascript:> <javascript:>
>     >     > <mailto:google-web-toolkit+unsub...@googlegroups.com
>     <javascript:>
>     >     <javascript:>>.
>     >     > To post to this group, send email to
>     >     > google-we...@googlegroups.com <javascript:>
>     >     > <mailto:google-we...@googlegroups.com <javascript:>>.
>     >     > Visit this group at
>     >     https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>
>     >     <https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>>.
>     >     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>
>     >     <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>>.
>     >
>     > --
>     > You received this message because you are subscribed to a topic
>     in the
>     > Google Groups "GWT Users" group.
>     > To unsubscribe from this topic, visit
>     >
>     https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
>     <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
>     > To unsubscribe from this group and all its topics, send an email to
>     <javascript:>>.
>     > To post to this group, send email to
>     > google-we...@googlegroups.com <javascript:>
>     > <mailto:google-we...@googlegroups.com <javascript:>>.
>     > Visit this group at
>     https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>.
>     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Ireneusz Szcześniak

unread,
Mar 24, 2017, 3:11:59 PM3/24/17
to google-we...@googlegroups.com
It's public. Does it make some difference?

On 23.03.2017 17:04, Ignacio Baca Moreno-Torres wrote:
> Just curious, the API is internal or external, the swagger spec is
> public?
>
>
> El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak
> <irek.sz...@gmail.com <mailto:irek.sz...@gmail.com>> escribió:
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
> > <javascript:> <javascript:>
> > > >
> <mailto:google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
> > <javascript:>
> > > <javascript:>>.
> > > > To post to this group, send email to
> > > > google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com> <javascript:>
> > > > <mailto:google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com> <javascript:>>.
> > > > Visit this group at
> > > https://groups.google.com/group/google-web-toolkit
> > <https://groups.google.com/group/google-web-toolkit>
> > > <https://groups.google.com/group/google-web-toolkit
> > <https://groups.google.com/group/google-web-toolkit>>.
> > > > For more options, visit
> https://groups.google.com/d/optout
> > <https://groups.google.com/d/optout>
> > > <https://groups.google.com/d/optout
> > <https://groups.google.com/d/optout>>.
> > >
> > > --
> > > You received this message because you are subscribed to a
> topic
> > in the
> > > Google Groups "GWT Users" group.
> > > To unsubscribe from this topic, visit
> > >
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> >
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
> >
> > > To unsubscribe from this group and all its topics, send an
> email to
> > > google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
> <javascript:>
> > > <mailto:google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
> > <javascript:>>.
> > > To post to this group, send email to
> > > google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com> <javascript:>
> > > <mailto:google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com> <javascript:>>.
> > > Visit this group at
> > https://groups.google.com/group/google-web-toolkit
> > <https://groups.google.com/group/google-web-toolkit>.
> > > For more options, visit https://groups.google.com/d/optout
> > <https://groups.google.com/d/optout>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
> > <mailto:google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com>
> > <mailto:google-we...@googlegroups.com
> <mailto:google-we...@googlegroups.com>>.
> > Visit this group at
> https://groups.google.com/group/google-web-toolkit.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to google-web-tool...@googlegroups.com
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>.

Ignacio Baca Moreno-Torres

unread,
Mar 25, 2017, 4:46:47 AM3/25/17
to GWT Users
No :), just to see the complexity of the API and what happens if I add it to my generator.
>     >     >     > google-web-toolkit+unsub...@googlegroups.com
>     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
>     >     <javascript:> <javascript:>
>     >     >     >
>     <mailto:google-web-toolkit+unsub...@googlegroups.com
>     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>
>     >     <javascript:>>.
>     >     > To post to this group, send email to
>     >     > google-we...@googlegroups.com
>     <mailto:google-we...@googlegroups.com> <javascript:>
>     >     > <mailto:google-we...@googlegroups.com
>     <mailto:google-we...@googlegroups.com> <javascript:>>.
>     >     > Visit this group at
>     >     https://groups.google.com/group/google-web-toolkit
>     >     <https://groups.google.com/group/google-web-toolkit>.
>     >     > For more options, visit https://groups.google.com/d/optout
>     >     <https://groups.google.com/d/optout>.
>     >
>     > --
>     > You received this message because you are subscribed to a topic
>     in the
>     > Google Groups "GWT Users" group.
>     > To unsubscribe from this topic, visit
>     >
>     https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
>     > To unsubscribe from this group and all its topics, send an email to
>     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>>.
>     > To post to this group, send email to
>     > google-we...@googlegroups.com
>     <mailto:google-we...@googlegroups.com>
>     > <mailto:google-we...@googlegroups.com
>     <mailto:google-we...@googlegroups.com>>.
>     > Visit this group at
>     https://groups.google.com/group/google-web-toolkit.
>     > For more options, visit https://groups.google.com/d/optout.
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "GWT Users" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com>.
>     To post to this group, send email to
>     google-we...@googlegroups.com
>     <mailto:google-we...@googlegroups.com>.
>     Visit this group at
>     https://groups.google.com/group/google-web-toolkit.
>     For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Ireneusz Szcześniak

unread,
Mar 25, 2017, 3:57:29 PM3/25/17
to google-we...@googlegroups.com
I'm preparing laboratory exercises for students, and we're using the
Swagger's Pet Store:

http://petstore.swagger.io/v2/swagger.json

On 25.03.2017 09:46, Ignacio Baca Moreno-Torres wrote:
> No :), just to see the complexity of the API and what happens if I add
> it to my generator.
>
> On Friday, March 24, 2017 at 8:11:59 PM UTC+1, Irek Szczesniak wrote:
>
> It's public. Does it make some difference?
>
> On 23.03.2017 17:04, Ignacio Baca Moreno-Torres wrote:
> > Just curious, the API is internal or external, the swagger spec is
> > public?
> >
> >
> > El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak
> > <irek.sz...@gmail.com <javascript:> <mailto:irek.sz...@gmail.com
> <javascript:>>> escribió:
> google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>>
> > > <javascript:> <javascript:>
> > > > >
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>
> > <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>>
> > > > google-web-tool...@googlegroups.com
> <javascript:>
> > <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>>
> > <javascript:>
> > > >
> <mailto:google-web-tool...@googlegroups.com <javascript:>
> > > google-web-tool...@googlegroups.com <javascript:>
> <javascript:>
> > <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>>>.
> > > To post to this group, send email to
> > > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>
> > > <mailto:google-we...@googlegroups.com <javascript:>
> > You received this message because you are subscribed to the
> Google
> > Groups "GWT Users" group.
> > To unsubscribe from this group and stop receiving emails
> from it,
> > send an email to
> google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> > Visit this group at
> > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> > google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> > Visit this group at
> https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.

Ireneusz Szcześniak

unread,
Mar 25, 2017, 4:32:09 PM3/25/17
to google-we...@googlegroups.com
Thanks, Rogelio, for your instructions.

I'm working on this now. I'll report on the progress later.

On 23.03.2017 22:56, Rogelio Flores wrote:
> No, I have not tried generating API interfaces for a CXF client. I
> don't remember even seeing that option when we first created the api
> (more than a year ago). I might try that out.
>
> To create our GWT "Models" module, we simply add a gwt module file
> with these 3 lines:
>
> |
>
> <modulerename-to='Models'>
> <sourcepath="model"/>
> > > > google-web-tool...@googlegroups.com
> <javascript:>
> > <javascript:> <javascript:>
> > > >
> <mailto:google-web-tool...@googlegroups.com <javascript:>
> > > google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > > <mailto:google-web-tool...@googlegroups.com
> <javascript:>
> > <javascript:>>.
> > > To post to this group, send email to
> > > google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>.
> > > Visit this group at
> > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
> > To unsubscribe from this group and all its topics, send an email to
> > google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> > Visit this group at
> https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.

Ignacio Baca Moreno-Torres

unread,
Mar 26, 2017, 4:45:36 PM3/26/17
to GWT Users
I have applied my generator to the swagger petstore api, hehe it is pretty unstable, but after some NPE fixes and minor improvements I have generated the API Interface and models. Demo project here https://github.com/ibaca/petstore-client-gwt, uploaded with sourceMaps at https://ibaca.github.io/petstore-client-gwt/, ups, bud sadly github forces https but swagger petstore is not exposed in https so a mixed content exception is thrown. Just download locally and use 'mvn gwt:devmode' to try it out.
>     >     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
>     <javascript:>>
>     >     >     <javascript:> <javascript:>
>     >     >     >     >
>     <javascript:>
>     >     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
>     <javascript:>>
>     >     <javascript:>
>     >     >     >
>     <mailto:google-web-toolkit+unsub...@googlegroups.com <javascript:>
>     >     > google-web-toolkit+unsub...@googlegroups.com <javascript:>
>     >     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
>     <javascript:>>
>     >     > <mailto:google-web-toolkit+unsub...@googlegroups.com
>     <javascript:>
>     >     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
>     <javascript:>>>.
>     >     > To post to this group, send email to
>     >     > google-we...@googlegroups.com <javascript:>
>     >     <mailto:google-we...@googlegroups.com <javascript:>>
>     >     > <mailto:google-we...@googlegroups.com <javascript:>
>     >     <mailto:google-we...@googlegroups.com <javascript:>>>.
>     >     > Visit this group at
>     >     https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>.
>     >     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>     >
>     >     --
>     >     You received this message because you are subscribed to the
>     Google
>     >     Groups "GWT Users" group.
>     >     To unsubscribe from this group and stop receiving emails
>     from it,
>     >     send an email to
>     >     <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
>     <javascript:>>.
>     >     To post to this group, send email to
>     >     google-we...@googlegroups.com <javascript:>
>     >     <mailto:google-we...@googlegroups.com <javascript:>>.
>     >     Visit this group at
>     >     https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>.
>     >     For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>     >
>     > --
>     > You received this message because you are subscribed to a topic
>     in the
>     > Google Groups "GWT Users" group.
>     > To unsubscribe from this topic, visit
>     >
>     https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
>     <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
>     > To unsubscribe from this group and all its topics, send an email to
>     <javascript:>>.
>     > To post to this group, send email to
>     > google-we...@googlegroups.com <javascript:>
>     > <mailto:google-we...@googlegroups.com <javascript:>>.
>     > Visit this group at
>     https://groups.google.com/group/google-web-toolkit
>     <https://groups.google.com/group/google-web-toolkit>.
>     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Ignacio Baca Moreno-Torres

unread,
Mar 26, 2017, 5:30:51 PM3/26/17
to GWT Users
Ok, you can make it work but at least in chrome you need to accept the "load unsafe scripts" warning.

Ireneusz Szcześniak

unread,
Mar 27, 2017, 10:25:18 AM3/27/17
to google-we...@googlegroups.com
Wow, awesome! Thank you, Ignacio, so much! You gave me a lot to
study! I need some time to look through it.


Best,
Irek
> > google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > > <javascript:> <javascript:>
> > > > > >
> > >
> <mailto:google-web-tool...@googlegroups.com <javascript:>
> > <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > > <javascript:>
> google-web-tool...@googlegroups.com <javascript:>
> > <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > <javascript:>
> > > > >
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > > > google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>
> > <javascript:>>
> > > >
> <mailto:google-web-tool...@googlegroups.com <javascript:>
> > <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>
> > <javascript:>>>.
> > > > To post to this group, send email to
> > > > google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>
> > > > <mailto:google-we...@googlegroups.com <javascript:>
> > > <mailto:google-we...@googlegroups.com <javascript:>>>.
> > > > Visit this group at
> > > https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>
> to the
> > Google
> > > Groups "GWT Users" group.
> > > To unsubscribe from this group and stop receiving emails
> > from it,
> > > send an email to
> > google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > >
> <mailto:google-web-toolkit%2Bunsu...@googlegroups.com
> <javascript:>
> > <javascript:>>.
> > > To post to this group, send email to
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > For more options, visit
> https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> > >
> > > --
> > > You received this message because you are subscribed to a
> topic
> > in the
> > > Google Groups "GWT Users" group.
> > > To unsubscribe from this topic, visit
> > >
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>
>
> >
> > > google-web-tool...@googlegroups.com
> <javascript:> <javascript:>
> > > <mailto:google-web-tool...@googlegroups.com
> <javascript:>
> > <javascript:>>.
> > > To post to this group, send email to
> > <https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>>.
> > > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> > <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "GWT Users" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> <https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe>.
>
> > To unsubscribe from this group and all its topics, send an email to
> > google-web-tool...@googlegroups.com <javascript:>
> > <mailto:google-web-tool...@googlegroups.com
> <javascript:>>.
> > To post to this group, send email to
> > google-we...@googlegroups.com <javascript:>
> > <mailto:google-we...@googlegroups.com <javascript:>>.
> > Visit this group at
> https://groups.google.com/group/google-web-toolkit
> <https://groups.google.com/group/google-web-toolkit>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-tool...@googlegroups.com
> <mailto:google-web-tool...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages