![Red Hat Application Server Manual Download Page 267](http://html.mh-extra.com/html/red-hat/application-server/application-server_manual_1427406267.webp)
Chapter 36. Web Service Interoperability between JOnAS and BEA WebLogic
259
36.2.2.1. Generation of Web Service Client Class
To access the web service, generate the client class using the Ant task
clientgen
. For example:
clientgen wsdl="
wsdl_url
" packageName="my.package"
clientJar="client.jar" generatePublicFields="True"
keep generated="True"/
This command creates four classes:
•
Service implementation
•
Java interface
•
Stub class
•
Service interface to the corresponding web service.
The tool can also generate the Java classes corresponding to future complex types of web services.
36.2.2.2. Build the EJB
Then, call the web service in the EJB proxy code using the generated classes. For example:
try {
WSNAME_Impl tsl=new WSNAME_Impl(); // access web service impl
EJB_endpoint tsp = tsl.getEJB_endpoint();
// access WS endpoint interface
ComplexType tr=tsp.method(param);
}
catch (Exception e) {
e.printStackTrace(System.err);
};
36.2.2.3. Deploy the EJB on WebLogic Server
Deploy this EJB using the WebLogic administration console.
36.3. Accessing a WebLogic Web Service from a JOnAS EJB
36.3.1. Web Service Development for WebLogic Server
36.3.1.1. Creation of an Application
To create a web service, first develop the corresponding EJB application. Compile the EJB classes and
create a JAR file. To create the EJB’s container, apply the ant task
wlappc
to the JAR file. For example:
wlappc debug="${debug}" source="interface_ws_jonas.jar"
classpath="{java.class.path}:interface_ws_jonas.jar"
Then, use the ant task servicegen to create the ear application containing the web service.
Summary of Contents for Application Server
Page 1: ...Red Hat Application Server JOnAS User Guide ...
Page 8: ......
Page 22: ...14 Chapter 1 Java Open Application Server JOnAS a J2EE Platform ...
Page 58: ...50 Chapter 3 JOnAS Configuration ...
Page 66: ...58 Chapter 5 JOnAS Class Loader Hierarchy ...
Page 78: ...70 Chapter 6 JOnAS Command Reference ...
Page 80: ......
Page 86: ...78 Chapter 7 Developing Session Beans ...
Page 136: ...128 Chapter 9 Developing Message Driven Beans ...
Page 142: ...134 Chapter 10 Defining the Deployment Descriptor ...
Page 148: ...140 Chapter 11 Transactional Behavior of EJB Applications ...
Page 158: ...150 Chapter 14 EJB Packaging ...
Page 162: ...154 Chapter 15 Application Deployment and Installation Guide ...
Page 164: ......
Page 176: ...168 Chapter 18 WAR Packaging ...
Page 178: ......
Page 184: ...176 Chapter 20 Defining the Client Deployment Descriptor ...
Page 186: ...178 Chapter 21 Client Packaging ...
Page 188: ......
Page 192: ...184 Chapter 23 EAR Packaging ...
Page 194: ......
Page 200: ...192 Chapter 24 JOnAS Services ...
Page 204: ...196 Chapter 25 JOnAS and the Connector Architecture ...
Page 222: ...214 Chapter 27 Ant EJB Tasks Using EJB JAR ...
Page 234: ...226 Chapter 29 Web Services with JOnAS ...
Page 236: ......
Page 260: ...252 Chapter 34 How to use Axis in JOnAS ...
Page 270: ...262 Chapter 36 Web Service Interoperability between JOnAS and BEA WebLogic ...
Page 296: ......