+ All Categories
Home > Documents > JBossWS Project by Alessio Soldano

JBossWS Project by Alessio Soldano

Date post: 13-Dec-2014
Category:
Upload: java-user-group-roma
View: 1,683 times
Download: 2 times
Share this document with a friend
Description:
The JBossWS project is a working example of how the open source development model can lead to real innovation while delivering enterprise level software. JBossWS is a framework for providing webservice features on top of JBoss AS. Instead of just implementing functionalities from scratch, JBossWS provides an integration layer for running three supported open source ws stacks (including Apache CXF and Glassfish Metro) on JBoss Application Server. While this is of course possible thanks to the WS world being quite specified by standards, the whole architecture is interesting because of its ability to both act as a testing framework for the supported stacks as well as the field for delivering additional cross-stack features. I'm going to present in details the architecture layout as well as describe how it allows users to really have an open choice on what stack to run their services on, while getting benefits from common management, tooling, additional features etc. On the other side, I'll introduce and provide samples of how this development model also benefits the supported stacks' communities thanks to the collaboration with them.
19
JBoss Web Services Alessio Soldano [email protected] Principal Software Eng. JBoss - Red Hat April 28th, 2010
Transcript
Page 1: JBossWS Project by Alessio Soldano

JBoss Web Services

Alessio [email protected]

Principal Software Eng.JBoss - Red Hat

April 28th, 2010

Page 2: JBossWS Project by Alessio Soldano

Who is Alessio?

● JBoss WS[1] committer since early 2007

● JBoss / Red Hat employee since end of 2007

● JBoss Web Service Lead, 2008

● JBoss AS[2], JBoss Wise[3] contributor

● Current Red Hat representative at JSR-224 EG and W3C WS-ResourceAccess WG

● Apache CXF[4] committer since 2009

[1] http://www.jboss.org/jbossws [2] http://www.jboss.org/jbossas

[3] http://www.jboss.org/wise [4] http://cxf.apache.org

Page 3: JBossWS Project by Alessio Soldano

What is JBoss WS?

● “Just” a feature-rich JAX-WS compatible ws stack till early 2008...

● a web services framework providing integration layers for 3rd party ws stacks on top of multiple JBoss AS versions

– CXF, Native and Metro stack

– AS 5.x, AS 6.x target containers

Page 4: JBossWS Project by Alessio Soldano

The benefits of standards / specs

● WS-Security

● WS-Policy

● WS-Addressing

● ...

W3C standards allow for interoperability

<s:Envelope...>

<s:Header>

<o:Security...>

<u:Timestamp u:Id="..">...</u:Timestamp>

<o:BinarySecurityToken...>...</o:BinarySecurityToken>

<e:EncryptedKey...>...</e:EncryptedKey>

<e:ReferenceList...>...</e:ReferenceList>

<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

...

</Signature>

</o:Security>

</s:Header>

<s:Body>...</s:Body>

</s:Envelope>

Defined way to:

● format messages

● advertise services

● ...

Page 5: JBossWS Project by Alessio Soldano

The benefits of standards / specs

● JSR-224 / JSR-181 (JAX-WS)

● JSR-109 (WS for JavaEE)

● JSR-101 (JAX-RPC)

● JSR-261* (JAX-WSA)

● ...

EndpointService service = new EndpointService(

wsdlURL, serviceQName);

Endpoint port = service.getEndpointPort();

String retObj = port.echo(“Hello World”);

@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://org.jboss.ws/wsref")

@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL)

public class EndpointImpl {

@WebMethod(action = “echo”)

public String echo(String input) {

return input;

}

}

JCP specs give us common dev API

Page 6: JBossWS Project by Alessio Soldano

Reasons for integrating

● really good open source implementations already available - NIH syndrome

● focus on added value

● open choice (features, performance, ...)

● ... a lot of Web Services specifications!

Page 7: JBossWS Project by Alessio Soldano

Reasons for integrating

Page 8: JBossWS Project by Alessio Soldano

Who benefits from this move?

● The JBoss community:

– different choices depending on needs

– greater joint community support

– core devs can work on added value● The integrated ws projects and their community:

– additional tests

– bugs detection and fix

– ...

Page 9: JBossWS Project by Alessio Soldano

JBoss WSF: high level overview

Page 10: JBossWS Project by Alessio Soldano

Web Service Framework

● Management– console

– endpoint registry

– records system

● Configuration– address rewrite

● Features– JAXBIntroductions

– Common JAX-WSA JSR-261 API

● Tooling– common JAXWS tools

– project generator

– Eclipse integration

● AS integration– authentication

– authorization

● Common deploy

● Common testsuite

Page 11: JBossWS Project by Alessio Soldano

Do I really need your integration layer?

● Home-brew solutions for running CXF / Metro on JBossAS might work for specific usecases, but you...

– need to embed the stack in your apps

– will suffer from classloading issues

– can just use pojo endpoints

– have no webserviceref injection in ejb3

– loose additional WSF features ;-)

– ...

Page 12: JBossWS Project by Alessio Soldano

How it works - deployment

● POJO endpoint<web-app ...> <servlet> <servlet-name>TestService</servlet-name> <servlet-class>org.jboss.test.ws.jaxws.samples.MyEndpoint</servlet-class> </servlet> <servlet-mapping> <servlet-name>TestService</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping></web-app>

● EJB3 endpoint

@WebService(...)public class MyEndpoint { public String sayHello() { return "Hello World!"; }}

@WebService(...)@Statelesspublic class MyEndpoint { public String sayHello() { return "Hello World!"; }}

Create metadata todeploy jboss-web app

Page 13: JBossWS Project by Alessio Soldano

How it works - deployment

● Parse or generate proprietary descriptor

– jboss-cxf.xml for CXF stack (Spring conf)– sun-jaxws.xml for Metro stack

● Setup different endpoint servlets for each stack

– extending CXFServlet for CXF stack

Page 14: JBossWS Project by Alessio Soldano

How it works - runtime

● Request handlers: called by enpdoint servlet to serve GET / POST requests; delegate to

– CXF ServletController – Metro ServletAdapter

● Invokers: route invocation to JBossAS (JBoss EJB3 layer for ejb3 endpoints)

– configured during proprietary descriptor processing / creation

Page 15: JBossWS Project by Alessio Soldano

How it works - runtime

Req

uestH

and

ler

Invok

er

En

dp

oint servlet

CXFor

Metro

Request

Response

JBossAS

...

WS-*

JAX-WShandlers

...

Page 16: JBossWS Project by Alessio Soldano

More on deployers...

JBoss AS 5 deployers gives high flexibility● multiple webservice deployers generated

– stack agnostic deployment aspects

– stack specific deployment aspects

– extensibility, separation of concerns, ...

● two webservice stacks at the same time

– JAX-RPC support with CXF / Metro

Page 17: JBossWS Project by Alessio Soldano

CXF: additional integration hooks

● Bus configuration: CXF runtime behaviour is controlled by the current Bus; we can set:

– custom resource resolvers– custom transport factories– custom CXF Configurer bean– ...

● Spring Namespace Handlers: we can change configuration namespace to default bean mapping

– override / extend core CXF beans

Page 18: JBossWS Project by Alessio Soldano

Some links...

● http://www.jboss.org/jbossws

● http://community.jboss.org/wiki/JBossWS● http://jbossws.blogspot.com/

Page 19: JBossWS Project by Alessio Soldano

Q & A


Recommended