You are on page 1of 14

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING

BANGALORE INSTITUTE OF TECHNOLOGY


K.R. Road, Bengaluru-560004
2018-2019

Assignment on

“Packaging and Deployment


of SOA Components”
Presented by :
T S Sunaadh
IV Sem, M.Tech, SCN
1BI17SCN17
Dept of ISE, BIT.
SOA Module 5 1
Basic Components of a SOA Infrastructure
ESB Build/re-use Services
Web or Legacy Services
Connect
BPEL ADAPTERS
IF
LEGACY Route & Transform
SYSTEM
ESB
RULES
ENGINE WEB WEB Externalize business rules
SERVICE
SERVICE
IF
RULES ENGINE
HUMAN Orchestrate
WORKFLOW
BPEL/BPM ENGINE
Involve human beings
WEB
HUMAN
SERVICE LEGACY
SYSTEM
WORKFLOW
Secure
GLOBAL SECURITY
FRAMEWORK

SOA Module 5
Web Services Packaging and Deployment
Overview
• WSEE defines the concept of a port component to refer to the component
• that gets packaged and deployed to the container to implement a Web
service.
• However, it is sensible for implementers to rely heavily on servlets,
because that approach leverages the investment they have already made in
developing servlet technology.
• A port component defines the programming model artifacts that make up a
portable Web service application. These components are defined in detail
by the WSEE specification. A port component must include a service
implementation bean.
• The service implementation bean is fully defined in the WS-Metadata
specification. A SIB is the only required artifact in a port component.

SOA Module 5 3
Packaging a Servlet Endpoint Using a WAR
• When you package a SIB for deployment as a servlet endpoint, your WAR
is structured.
• A WSDL document can also be provided as part of the port component.
• In this case, the container does not generate WSDL, but rather uses the
document supplied. When a WSDL is supplied, the endpoint address
specified in the WSDL may be modified by the container to be consistent
with the endpoint address where the resulting Web service is deployed.

SOA Module 5 Figure 1 Servlet end point packaging. 4


Continued
These are the different Stateless session bean endpoint packaging
1. Service Implementation Bean
2. Service endpoint interface
3. WSDL
4. web.xml
5. webservices.xml
6. jax-ws-catalog.xml
7. sun-web.xml
8. Handler Chain File
9. Dependent Classes

SOA Module 5 5
Packaging, Versioning & Deployment

Composite property
added:
adf-config.xml
S S SCA
Mediator mds-config.xml
packager sca.
R
service Revision
JSR-88
wire =1.0 sca.
reference
Revision
S R R Tag as =1.0
revision “1.0”
R S Business sca_MyOrderProcess_rev1.0.sar
Rules
Component
BPEL EAR sca_MyOrderProcess_rev1.0.sar
Component
packager
R S Human Task
Flow
Component

R R

MyApprovalUI.war
MyOrderProcess SOA composite

MyApprovalUI.war

MyApprovalUI.mar

MyOrderApp.ear
ejb.jar

Figure 2 Servlet endpoint packaging.


SOA Module 5
Continued

1. The servlet-name of the generated web.xml comes from the name of the class being
deployed. This is because it is associated with the servlet-link element in the generated
webservices.xml Furthermore, if you package a web.xml with the SIB, its servlet-name
must also match the name of the SIB class.
2. The servlet-class of the generated web.xml is the com.sun-
enterprise.webservice.JAXWSServlet wrapper class—as discussed earlier.
3. The url-pattern is the simple name of the endpoint class + “Service”,unless it is
overridden by the servlet-pattern in a web.xml you provide—as shown here, /Hello
4. The generated wsdl:service name is specified by the @WebService. serviceName
attribute, and

SOA Module 5 7
Continued
5. this also provides the value for the generated webservices.xml wsdl-service
element. If you provided a webservices.xml the wsdl-service element’s value
would override the annotation to determine the wsdl:service name. But in this
case, the webservice.xml is generated, so they are the same.
6. The servlet-link in the generated webservices.xml comes from the name of
the class being deployed,13 which is the same as the generated web.xml
servlet-name.
7. The generated wsdl-port in the webservices.xml comes from the
@WebService.name attribute. In this case, that attribute is not specified, so the
default value (i.e., class name plus “Port”) is used.
8. This wsdl-port provides the wsdl:port value. So, if you had provided a
webservices.xml, the value you gave for wsdl-port would override the
@WebService.name annotation.

SOA Module 5 8
Figure 3 Internal descriptor generation for EJB endpoints.
SOA Module 5 9
Deployment without Deployment Descriptors

• One of the great simplifications for Web Services in Java EE 5 is that you
no longer need to use any deployment descriptors for a wide range of
scenarios.
• In this section, I show examples of deploying a servlet endpoint without
deployment descriptors using only a service implementation bean (SIB),
using a service endpoint interface (SEI) with a SIB, and supplying your
own WSDL

SOA Module 5 10
Using Only a Service Implementation Bean

@WebService
public class Hello {
public String sayHello(String s) {
return "Hello: " + s;
}
}
A SIB Deployed without Descriptors

• the key parameters in this WSDL are populated with the default values as
follows:
• The wsdl:portType name (Hello) comes from the simple name of the SIB.
This is the default value of @WebService.name.
• The wsdl:serviceName (HelloService) comes from the simple name of the
SIB + “Service.” This is the default value of @WebService.serviceName.
SOA Module 5 11
Using a Service Endpoint Interface
• A SIB Using a SEI and Deployed without Descriptors
@WebService(endpointInterface="samples.HelloInf")
@Stateless
public class Hello {
public String sayHello(String s) {
return "Hello: " + s;
}
public String sayGoodbye(String s) {
return "Goodbye: " + s;
}
}

SOA Module 5 12
Including a WSDL Artifact
• You can also bundle a WSDL file with your WAR or EJB-JAR, rather than
• have the container generate the WSDL description of the Web service for
you. This can be done even when no deployment descriptors are used.
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloPortBinding">
Packaging and Deployment of SOA Components (JSR-181 and JSR-109)
<soap:address
location="http://soabookdev.scarsdale.javector.com:8080/nodescriptorwsdl-
endpoint/HelloService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
</port>
</service>

SOA Module 5 13
Demo: Design, Deploy, Test/Monitor
1. Design (Adapter + ESB + BPEL)
2. Create EAR

3. Deploy

EAR File

JDeveloper 4. Test & Monitor

11g SOA Suite


service reference Server

S S S R
Mediator BPEL
R
wire

SOA composite
SOA Console
(web browser)

SOA Module 5 14

You might also like