jax ws jax rs and java web apps with wso2 platform

37
Last Updated: May. 2014 VP Delivery Samisa Abeysinghe JAXWS, JAXRS and Java WebApps with WSO2 Pla=orm

Upload: wso2

Post on 15-Jan-2015

961 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Last Updated: May. 2014

VP  Delivery  Samisa  Abeysinghe  

JAX-­‐WS,  JAX-­‐RS  and  Java  WebApps  with  WSO2  Pla=orm  

Page 2: Jax WS JAX RS and Java Web Apps with WSO2 Platform

2  

About  the  Presenter  

๏  Samisa  Abeysinghe  VP  Delivery  [email protected]    

๏  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.    

Page 3: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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  

Page 4: Jax WS JAX RS and Java Web Apps with WSO2 Platform

4  

What  WSO2  delivers  

Page 5: Jax WS JAX RS and Java Web Apps with WSO2 Platform

5  

Business  Model  

Page 6: Jax WS JAX RS and Java Web Apps with WSO2 Platform

AppDev  Trends  –      Modern  Web  ApplicaTons      

JAVA web Apps & Services

Microsites/Dashboards JavaScript Apps

Page 7: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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  

Page 8: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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        

 

Page 9: Jax WS JAX RS and Java Web Apps with WSO2 Platform

 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)      

Page 10: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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)      

Page 11: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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)      

Page 12: Jax WS JAX RS and Java Web Apps with WSO2 Platform

 AppDev  Trends  –  RESTfull  Services    

   

                             @Path("/hello")  

 public  class  HelloWorldService  {  

             @GET  

             @Path("/{user}")  

             public  String  hello(@PathParam("user")  String  user)  {  

   

                 }  

                               }  

JAX-RS Annotated Service

Page 13: Jax WS JAX RS and Java Web Apps with WSO2 Platform

 AppDev  Trends  –  RESTfull  Services    

                 

                 var  app  =  require('router').app;  

                 app.get('/users/:id',  funcTon  (req,  res,  ses)  {  

                 print(req.params.id);  

                       });  

Jaggery RESTfull Service

Page 14: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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...      

Page 15: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Your  Web  Service  is  Future  Proof  with  WSO2  ApplicaTon  Server  

   

Page 16: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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      

Page 17: Jax WS JAX RS and Java Web Apps with WSO2 Platform

WSO2  App  Server  Default  RunTmes  

   

Page 18: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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  

   

Page 19: Jax WS JAX RS and Java Web Apps with WSO2 Platform

ApplicaTon  Development:  Tools    

Page 20: Jax WS JAX RS and Java Web Apps with WSO2 Platform

 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  

   

Page 21: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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  

   

Page 22: Jax WS JAX RS and Java Web Apps with WSO2 Platform

WSO2  Developer  Studio  based  Development  

Page 23: Jax WS JAX RS and Java Web Apps with WSO2 Platform

 Web  Services    Deployment  on  WSO2  ApplicaTon  Server  o  Really  simple.  

o  Create  Your  WAR  o  Upload  it  through  the  Dashboard  

   

Page 24: Jax WS JAX RS and Java Web Apps with WSO2 Platform

24  

Page 25: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Rich  Dashboard  

   

   

Page 26: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Service  StaTsTcs  

   

   

Page 27: Jax WS JAX RS and Java Web Apps with WSO2 Platform

AppDev  Monitoring    

Jaggery  

Axis2  

JAX-­‐WS  

JAX-­‐RS  

Web  ApplicaTon  

Real-time Analytics

Activity Monitoring

WSO2  BAM  

WSO2  CEP  

WSO2 AS

Page 28: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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>

   

Page 29: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Try  It  Tool  (JAX-­‐WS,  JAX-­‐RS)  

   

Page 30: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Client  Code  GeneraTon  

   

Page 31: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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  

   

Page 32: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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

Page 33: Jax WS JAX RS and Java Web Apps with WSO2 Platform

API  management    

API Everywhere

Page 34: Jax WS JAX RS and Java Web Apps with WSO2 Platform

APIs  Everywhere    

   API  

Gateway  

   

API  Store  

API  Publisher  

Key  Manager  

Application Server

Jaggery  (REST)  

Axis2  

JAX-­‐WS  

JAX-­‐RS  

Page 35: Jax WS JAX RS and Java Web Apps with WSO2 Platform

 AppDev  Trends  -­‐  SaaS  applicaTon  Development    

User  managem

ent    

AuthenTcaTon  &  

AuthorizaTon      

Registry   Cache  MulTtena

ncy    

Carbon

SaaS  applicaTon  

(Java)  

 SaaS  

applicaTon  (Jaggery)  

 

Application Server

Page 36: Jax WS JAX RS and Java Web Apps with WSO2 Platform

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    

Page 37: Jax WS JAX RS and Java Web Apps with WSO2 Platform

Contact  us  !