The entire scenario is represented in the following figure:
sample statelessSession.ear
(EJB in BEA Weblogic)
HelloServiceBean Endpoint t3 Channel HTTP Channel
Endpoint
Provider Domain Consumer Domain
StatelessEJBProvider
(SOAP Provider
Component)
Client
soap.war
(Apache SOAP in Tomcat)
??? ???
Chapter 4
[ 89 ]
The deployment for the sample requirement will translate to that shown in the
following figure:
User E Commerce
Server
Firewall Web Server Application
Server
Provider Domain Consumer Domain
Code Listing
In this section, we will walk through the main code used for the demo. All the code
discussed here is in the folder ch04\AxisSoapBindEjb:
Session EJB: The HelloServiceBean.java class is shown here:
public class HelloServiceBean implements SessionBean
{
public String hello(String phrase)
{
System.out.println("HelloServiceBean.hello
{" + (++times) + "}...");
return "From HelloServiceBean : HELLO!! You just said :"
+ phrase;
}
}
The HelloServiceBean.java is a simple stateless session EJB and hence
is straightforward.
statelessSession
True
sample-statelessSession-TraderHome
???
Binding??”The Conventional Way
[ 90 ]
We will deploy the EJB in Weblogic server (even though the same EJB can be
deployed in any compatible EJB server like Websphere or JBoss) and hence
we require the weblogic-ejb-jar.
Pages:
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146