Post on 15-Jan-2015
description
Last Updated: May. 2014
VP Delivery Samisa Abeysinghe
JAX-‐WS, JAX-‐RS and Java WebApps with WSO2 Pla=orm
2
About the Presenter
๏ Samisa Abeysinghe VP Delivery samisa@wso2.com
๏ Samisa Abeysinghe, Vice President of Delivery joined the company in September 2005. Prior to the current role, Samisa used to be VP of Engineering and managed the development of WSO2 Carbon based product pla=orm.
3
About WSO2 ๏ Global enterprise, founded in 2005
by acknowledged leaders in XML, web services technologies, standards and open source
๏ Provides only open source pla=orm-‐as-‐a-‐service for private, public and hybrid cloud deployments
๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0.
๏ Is an AcTve Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID FoundaTon and W3C.
๏ Driven by InnovaTon
๏ Launched first open source API Management soluTon in 2012
๏ Launched App Factory in 2Q 2013
๏ Launched Enterprise Store and first open source Mobile soluTon in 4Q 2013
4
What WSO2 delivers
5
Business Model
AppDev Trends – Modern Web ApplicaTons
JAVA web Apps & Services
Microsites/Dashboards JavaScript Apps
WSO2 ApplicaTon Server
๏ Lightweight applicaTon server based on Apache Tomcat
๏ Support for JAX-‐WS, JAX-‐RS and WebSocket
๏ Proven to support frameworks like Axis2, CXF, Spring, Hibernate
๏ Support number of JavaEE technologies which includes Servlet3, JSP/EL 2.2, JSTL, JSF, JPA2, JTA
๏ Next major version will support for JavaEE 6 Web-‐Profile
WSO2 ApplicaTon Server Ctd.
๏ Rich dashboards for applicaTon staTsTcs
๏ Try-‐It support for JAX-‐WS , JAX-‐RS
๏ SSO support
๏ Custom Classloader RunTme Environment (CRL) Architecture
๏ e . g – You can safely keep number of incompaTble Spring versions on server level
Web Services Use Cases & Java Standards o RESTful API endpoint communicaTng by HTTP/JSON or
HTTP/XML
o JAX-‐RS
o SOAP Web Service endpoint
o JAX-‐WS
o Data Services
o No Java Standard Specified
o Web applicaTon exposing service URLs
o Java Servlet, JavaServer Pages (JSP)
NaTve Web Services Support on Tomcat o RESTful API endpoint communicaTng by HTTP/JSON or
HTTP/XML
o JAX-‐RS
o SOAP Web Service endpoint
o JAX-‐WS
o Data Services
o No Java Standard Specified
o Web applicaTon exposing service URLs
o Java Servlet, JavaServer Pages (JSP)
NaTve Web Services Support on WSO2 ApplicaTon Server o RESTful API endpoint communicaTng by HTTP/JSON or
HTTP/XML
o JAX-‐RS
o SOAP Web Service endpoint
o JAX-‐WS
o Data Services
o No Java Standard Specified
o Web applicaTon exposing service URLs
o Java Servlet, JavaServer Pages (JSP)
AppDev Trends – RESTfull Services
@Path("/hello")
public class HelloWorldService {
@GET
@Path("/{user}")
public String hello(@PathParam("user") String user) {
}
}
JAX-RS Annotated Service
AppDev Trends – RESTfull Services
var app = require('router').app;
app.get('/users/:id', funcTon (req, res, ses) {
print(req.params.id);
});
Jaggery RESTfull Service
WSO2 ApplicaTon Server Enterprise Features o WSO2 ApplicaTon Server is not yet another deployment
environment for Web Services.
o The advantages go beyond just hosTng
o excellent developer support via WSO2 Developer Studio, Maven plugins, Maven archetypes etc…
o Many different pluggable runTmes
o All the carbon pla=orm features
o Container level integraTons to other products (GReg, User Store etc…)
o QoS, Clustering & many more...
Your Web Service is Future Proof with WSO2 ApplicaTon Server
Web Services Architecture with WSO2 App Server o Web Services (WS) Architecture is highly flexible with
WSO2 App Server (AS)
o AS provides mulTple runTmes to your service
o Pure Tomcat RunTme
o Carbon RunTme
o Apache CXF runTme
o Many runTmes on the same server with different CXF versions supported
o Apache Axis2 runTme
o MulTple apps using different runTmes can co-‐exisTng on the same server
WSO2 App Server Default RunTmes
Web Services Architecture with WSO2 ApplicaTon Server o If the WS developed targeTng the AS default runTme
(recommended), The Carbon pla=orm can be uTlized by the CXF applicaTon.
o Through the Carbon Context, WS can use
o Carbon User Store
o WSO2 Registry API
o Fine-‐grained Auth through WSO2 IdenTty Server
o All the OSGI benefits
o Hot Deployment & Hot updates
ApplicaTon Development: Tools
WSO2 ApplicaTon Server Developer Experience o AS development is backed by a dedicated IDE (WSO2
Developer Studio) with easy to use wizards for Web Service (WS)
o Use maven archetype to build your WS
o WS can create/Manage using App Factory
o develop, test, deploy & reTre your app with few clicks
o Or Develop it your own way as if for Tomcat
o Generate client code with few clicks
Packaging
o The Web Service can be packaged in many ways
o CAR -‐ Carbon ARchive
o WAR -‐ Web applicaTon ARchive
o Apache CXF library jars
o Included in the package
o Not included to the package
WSO2 Developer Studio based Development
Web Services Deployment on WSO2 ApplicaTon Server o Really simple.
o Create Your WAR o Upload it through the Dashboard
24
Rich Dashboard
Service StaTsTcs
AppDev Monitoring
Jaggery
Axis2
JAX-‐WS
JAX-‐RS
Web ApplicaTon
Real-time Analytics
Activity Monitoring
WSO2 BAM
WSO2 CEP
WSO2 AS
BAM IntegraTon
o Configure BAM and AS
o Add the following parameter to the web.xml of the Service
<context-param>
<param-name>enable.statistics</param-name>
<param-value>true</param-value>
</context-param>
Try It Tool (JAX-‐WS, JAX-‐RS)
Client Code GeneraTon
More Features of Interest
o Clustering
o MulT Tenancy
o Enterprise Deployment API Management through API Manager
o WS-‐Discovery with Governance Registry for JAX-‐WS
o Spring Support
o Container Level QoS:
o Throqling
o Caching
o Security
WSO2 ApplicaTon Server -‐ JavaEE
Servlet3 JSP JSF
CDI JTA
JPA
B.Val EJB-‐Lite
JavaMail SAAJ JNDI RMI
JAX-‐WS JAX-‐RS JAXB JMS
JavaEE 6 - WP
JavaEE 6 - Full
API management
API Everywhere
APIs Everywhere
API
Gateway
API Store
API Publisher
Key Manager
Application Server
Jaggery (REST)
Axis2
JAX-‐WS
JAX-‐RS
AppDev Trends -‐ SaaS applicaTon Development
User managem
ent
AuthenTcaTon &
AuthorizaTon
Registry Cache MulTtena
ncy
Carbon
SaaS applicaTon
(Java)
SaaS
applicaTon (Jaggery)
Application Server
36
More InformaTon !
๏ WSO2 ApplicaTon Server for managing JAX-‐RS, JAX-‐WS and Java Apps: hqp://wso2.com/products/applicaTon-‐server/
๏ WSO2 ApplicaTon Server Docs: hqps://docs.wso2.org/display/AS521/WSO2+ApplicaTon+Server+DocumentaTon
Contact us !