Generate Swagger documentation during Runtime in J2SE legacy application

37 views
Skip to first unread message

KD

unread,
Sep 13, 2017, 6:55:35 PM9/13/17
to Swagger
Hi Swagger team,

I would like to know ways to generate Swagger documentation during Runtime for J2SE legacy application that has REST implementation and support. We have used Jettison as a library for JSON object conversion. We dont have JAX-RS library (Jersey implementation, J2EE) for which I see many plugins available online. We have all the necessary information for Swagger specs that are - host, port, scheme, basePath, paths, operations and definitions.

If someone can help me on these lines to generate swagger.json file, that would be great!

Ron Ratovsky

unread,
Sep 15, 2017, 6:06:07 AM9/15/17
to swagger-sw...@googlegroups.com

How are your REST endpoint implemented then?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karishma Dalal

unread,
Sep 27, 2017, 2:07:27 PM9/27/17
to swagger-sw...@googlegroups.com
Hi Ron,

Thanks for getting back and apologies for the late response.

We use WSDL and XSD as service descriptors on JAVA Spring framework - J2SE. I understand WSDL is for SOAP operation but its a legacy tool and WSDL is mandatory for creating bindings. We convert WSDL into XMLBeans. Further, we use Jettison library for conversion of XML to JSON and back. 

We wish to find a way to generate Swagger JSON from XMLBeans. What can be the best approach to it ? Please suggest!

Also please feel free to point if I am missing out on something.

Thanks,
Karishma

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Sep 27, 2017, 2:12:51 PM9/27/17
to swagger-sw...@googlegroups.com

There’s no way to use Swagger/OpenAPI to describe SOAP APIs – it can only be used for REST.

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-sw...@googlegroups.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:07
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Subject: Re: Generate Swagger documentation during Runtime in J2SE legacy application

 

Hi Ron,

 

Thanks for getting back and apologies for the late response.

 

We use WSDL and XSD as service descriptors on JAVA Spring framework - J2SE. I understand WSDL is for SOAP operation but its a legacy tool and WSDL is mandatory for creating bindings. We convert WSDL into XMLBeans. Further, we use Jettison library for conversion of XML to JSON and back. 

 

We wish to find a way to generate Swagger JSON from XMLBeans. What can be the best approach to it ? Please suggest!

 

Also please feel free to point if I am missing out on something.

 

Thanks,

Karishma

On Fri, Sep 15, 2017 at 3:05 AM, Ron Ratovsky <r...@swagger.io> wrote:

How are your REST endpoint implemented then?

 

 

 

From: 'KD' via Swagger <swagger-sw...@googlegroups.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Thursday, September 14, 2017 at 01:55
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Generate Swagger documentation during Runtime in J2SE legacy application

 

Hi Swagger team,

 

I would like to know ways to generate Swagger documentation during Runtime for J2SE legacy application that has REST implementation and support. We have used Jettison as a library for JSON object conversion. We dont have JAX-RS library (Jersey implementation, J2EE) for which I see many plugins available online. We have all the necessary information for Swagger specs that are - host, port, scheme, basePath, paths, operations and definitions.

 

If someone can help me on these lines to generate swagger.json file, that would be great!

--

You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Karishma Dalal

unread,
Sep 27, 2017, 2:20:07 PM9/27/17
to swagger-sw...@googlegroups.com
No, we do not want to describe SOAP, we want to use Swagger for REST. We already have REST in place but we want to provide something meaningful to customers - to describe the API.

My point was that we use WSDL behind the scenes to generate XMLBeans. (We can overlook this, it was a workaround)

Our next step is to get Swagger JSON from XMLBeans.

Thanks,
Karishma

 

--

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Sep 27, 2017, 2:21:20 PM9/27/17
to swagger-sw...@googlegroups.com

XMLBeans is used to describe the objects being transferred, not the API.

Which framework do you use to expose your REST API?

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-sw...@googlegroups.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:20
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Subject: Re: Generate Swagger documentation during Runtime in J2SE legacy application

 

No, we do not want to describe SOAP, we want to use Swagger for REST. We already have REST in place but we want to provide something meaningful to customers - to describe the API.

--

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Karishma Dalal

unread,
Sep 27, 2017, 2:26:10 PM9/27/17
to swagger-sw...@googlegroups.com
We use JAVA Spring framework to expose our REST API.

On Wed, Sep 27, 2017 at 11:21 AM, Ron Ratovsky <r...@swagger.io> wrote:

XMLBeans is used to describe the objects being transferred, not the API.

Which framework do you use to expose your REST API?

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-swaggersocket@googlegroups.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" <swagger-swaggersocket@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:20

--

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Sep 27, 2017, 2:42:38 PM9/27/17
to swagger-sw...@googlegroups.com

Fir a spring-based API check out https://github.com/springfox/springfox/.

I’m not familiar enough with XMLBeans to tell you if it can work with it.

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-sw...@googlegroups.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:26
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Subject: Re: Generate Swagger documentation during Runtime in J2SE legacy application

 

We use JAVA Spring framework to expose our REST API.

 

On Wed, Sep 27, 2017 at 11:21 AM, Ron Ratovsky <r...@swagger.io> wrote:

XMLBeans is used to describe the objects being transferred, not the API.

Which framework do you use to expose your REST API?

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-sw...@googlegroups.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:20

--

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Karishma Dalal

unread,
Sep 27, 2017, 2:45:44 PM9/27/17
to swagger-sw...@googlegroups.com
I see, thanks for the suggestion.

I will give Springfox a try and see how far I can go!

Thanks,
Karishma

On Wed, Sep 27, 2017 at 11:42 AM, Ron Ratovsky <r...@swagger.io> wrote:

Fir a spring-based API check out https://github.com/springfox/springfox/.

I’m not familiar enough with XMLBeans to tell you if it can work with it.

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-swaggersocket@googlegroups.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" <swagger-swaggersocket@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:26


Subject: Re: Generate Swagger documentation during Runtime in J2SE legacy application

 

We use JAVA Spring framework to expose our REST API.

On Wed, Sep 27, 2017 at 11:21 AM, Ron Ratovsky <r...@swagger.io> wrote:

XMLBeans is used to describe the objects being transferred, not the API.

Which framework do you use to expose your REST API?

 

 

 

From: 'Karishma Dalal' via Swagger <swagger-swaggersocket@googlegroups.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" <swagger-swaggersocket@googlegroups.com>
Date: Wednesday, September 27, 2017 at 11:20

--

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.

To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


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 "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/vp8I52qxZdc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages