Swagger, CXF and Servicemix - swagger

How to include swagger for rest services created using cxfrs and What all features and bundles required to run it in servicemix?

Related

How to generate self-contained specification of openAPI

Intellij's SwaggerHub Smartbear plugin has functionality 'Export self-contained specification(YAML)' which will resolve all the remote $ref(s) and generate local
definitions of domain models in the generated output document.
Is there a way to do it programmatically for making it as part of build pipeline? Any java program or scripts can we write for the same?

Jboss 7.1.0 EJB2.0 Stub classes creation with Ant

We are trying to migrate my application from Websphere 6.1 to JBOSS server 7.1.0.
In my application we are using EJB2.0 and EJB JARs are generated by using IBM ejbdeploy.bat through an Ant script. Stub classes are created by ejbdeploy.bat for the EJB interfaces (we have only interfaces and bean class).
We are trying to use JBoss 7.1.0 server and not able to use ejbdeploy.bat file to generate the stub classes for the EJB interfaces.
How we can create stub classes in JBoss 7.1.0 server using an Ant script? Could you share the Ant build definition in XML?
The web.xml references certain EJBs such as:
<ejb-local-ref id="EJBlRef_00992">
<ejb-ref-name>App/HSession</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.proj.ejb.HSessionHome</local-home>
<local>com.proj.ejb.HSessionLocal</local>
<ejb-link>HSession.jar#HSession</ejb-link>
</ejb-local-ref>

Swagger With Karaf Integration

I am trying to integrate Karaf with Swagger for Rest-API Documentation following the link :http://cxf.apache.org/docs/swagger2feature.html
I am ussing cxf 3.1.3. I am unable to find the swagger as a karaf feature.
i tried to resolve the swagger dependencies but unable to succeed.
Any Help?
There's a swagger 2.11 feature already configured at the servicemix repository, you can install it with the following steps:
feature:repo-add mvn:org.apache.servicemix.features/servicemix-features/7.0.1/xml/features
feature:install swagger-2.11

Spring Security Struts2 integration libraries

I'm trying to integrate Spring Security into a Struts2 project. This project doesn't use a dependency resolving tool like Maven, so
I don't know if I have to add all the Spring Security libraries and their dependencies to make the project work or I can leave those dependencies for later.
First of all you need Struts2 jars. I hope you know struts2 jars.
Second,
1.struts2-spring-plugin-2.x.x.jar
Which depends on Spring Framework
1.spring-expression-x.x.x.RELEASE.jar
2.spring-beans-x.x.x.jar
3.spring-core-x.x.x.RELEASE.jar
4.spring-context-x.x.x.RELEASE.jar
5.spring-web-x.x.x.RELEASE.jar
6.spring-test-x.x.x.RELEASE.jar
7.commons-lang3-3.1.jar
8.commons-jci-fam-1.0.jar
9.easymock.jar
Additional Support Jars if needed
10.spring-aop-x.x.x.RELEASE.jar
11.spring-aspects-x.x.x.RELEASE.jar
12.spring-context-support-4.0.4.RELEASE.jar
13.spring-test-x.x.x.RELEASE.jar
You need Spring Security Jars
1.spring-security-core-3.2.3.RELEASE.jar
2.spring-security-web-3.2.3.RELEASE.jar
3.spring-security-acl-3.2.3.RELEASE.jar
4.spring-security-aspects-3.2.3.RELEASE.jar
5.spring-security-config-3.2.3.RELEASE.jar
6.spring-security-taglibs-3.2.3.RELEASE.jar
Spring Security jars depends on SPRING Framework and
1.ehcache-core-2.4.3.jar
2.spring-tx-x.x.x.RELEASE.jar
3.cglib-2.2.jar
4.spring-webmvc-x.x.x.RELEASE.jar
And slf4j Jars for logging
1.jcl-over-slf4j-1.7.6.jar
2.slf4j-api-1.6.1.jar
3.slf4j-simple-1.6.1.jar
4.slf4j-log4j12-1.6.1.jar
5.log4j-1.2.16.jar

How to Install cxf:1.1.1 server in Grails 2.3.0

I tried to install the plugin for cxf server in order to expose some grails services as SOAP web services, according to Grails 2.3 the new plugin installation is:
compile ":cxf:1.1.1"
in plugins section of BuildConfig.groovy, however it does not work, I tried to expose a service and the annotations are not recognized, I am working with GGTS (Groovy Grails Tool Suite) and I can't see the plugin installed under the plugin section.
My environment is Grails 2.3, Java 7, Groovy 2.1
Has anybody tried this plugin using Grails 2.3.0 and stumbled upon this issue in GGTS?
In order for the annotations to be recognized you'll need to import the following libraries into the interface or service class you're using to expose the endpoint:
import javax.jws.WebService
import org.grails.cxf.utils.EndpointType
import org.grails.cxf.utils.GrailsCxfEndpoint
The plugin should show up in the plugins dir if you refresh the dependencies for the project.

Resources