rpc webservices bea user's group march 2004

17
Building WebLogic Server RPC Web Services 03/02/04

Upload: soaring-eagle-llc

Post on 13-May-2015

422 views

Category:

Documents


1 download

DESCRIPTION

An overview of building RPC based web services

TRANSCRIPT

Page 1: RPC Webservices Bea User's Group March 2004

Building WebLogic ServerRPC Web Services

03/02/04

Page 2: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

Roadmap

• Definition of a WLS Web Service• WLS Web Service architecture• Ant Tasks for building WLS Web Services• web-services.xml• Example of a stateless session EJB converted to an RPC

style webservice• Q & A

Page 3: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

Definition of a WLS Web Service

• Service oriented technology or architecture• Web based and accessed over HTTP or HTTPS• Described and invoked by XML, WSDL, XML

Schema, SOAP, JAX-RPC, UDDI• Service is implemented by a Java class or a

stateless session EJB• Runtime is implemented by a servlet• Is not a WLW Web Service, yet

Page 4: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

WLS Web Service Architecture

• Implemented by a WLS provided servlet in front of the service

• Servlet filter chains may be added to enhance the handling of the request and response

• Service implementation is a Java class or a stateless session EJB created by the service provider

• Leverages the WLS Web Container

Page 5: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

WLS Web Service Architecture, contd.

Page 6: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

WLS Web Service Architecture, contd.

Page 7: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

WLS Web Service Architecture, contd.

Page 8: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

Ant Tasks for Building WLS Web Services

• BEA provides several Ant tasks that can be used to create a WLS Web Service

• Some of the tasks also have command line equivalents

• servicegen – builds the service from a Java class or stateless session EJB

• autotype – generates the serializer/deserializer classes for non-built in datatypes

• clientgen – builds the client side jar file• wsdlgen – generates WSDL from web service

artifacts

Page 9: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

servicegen Ant Task

• Converts Java class or SS EJB into a web service• Creates web-services.xml, the web service

deployment descriptor• May create serializer/deserializer classes for non-

built-in datatypes• Packages the web service in a WAR file and adds

it with the service implementation to an EAR file for deployment

Page 10: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

autotype Ant Task

• Used for support of non-built-in datatypes• Generates the serializer/deserializer class• Generates the holder class for the datatype• Generates the XML Schema datatype • Generates the datatype mapping information used in web-

services.xml• Inputs can be a Java class file, an EJB jar file, URL of a

WSDL, or XML Schema of the datatype• Output depends on input• Available as a command line utility

Page 11: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

clientgen Ant Task

• Used to build client side jar file for invoking the web service

• Generates the client-side interface and stubs for JAX-RPC static invocation

• Generates a client side WSDL• Generates the serializer/deserializer classes for

parameters and return types• Available as a command line utility

Page 12: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

wsdlgen Ant Task

• Used to generate a WSDL file from a web service EAR file

• Available as a command line utlility

Page 13: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

web-services.xml DD

• Found in WEB-INF in the web service WAR file• Configures the WLS Web Service runtime• Contains types, type-mapping, components, and

operations for the web service• The existence of web-services.xml is recognized

by WLS at deployment which maps the Context URI to the WLS Web Services Servlet

Page 14: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

Web Service Example

• Stateless Session EJB component• Uses non-built-in datatypes• Returns an array of abstract datatype• Codec and Holders built with autotype• Web service built with servicegen• Static client to invoke web service• Client side jar file built with clientgen• Example of using wsdlgen to create a WSDL file

Page 15: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

Q & A

Page 16: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

The E-Commerce Transactions Company™www.bea.com

Page 17: RPC Webservices Bea User's Group March 2004

© 2002 BEA Systems, Inc.

Bill KempDeveloper Relations Engineer

BEA Systems [email protected]