|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Feature JDJ Feature — Java API for XML Web Services (JAX-WS)
Creating a JAX-WS 2.0 Web Service in WebLogic Server 10
By: Deepak Vohra; Ajay Vohra
Jun. 27, 2007 03:00 PM
Add a target build-client to the build.xml file to generate the client artifacts. Add a clientgen element to the target element. Specify type as JAXWS, destDir as output/clientclass, packageName as webservices.jaxws.client, and wsdl as http://localhost:7001/HelloWsImpl/HelloWsImplService?WSDL.
<clientgen type="JAXWS" Add javac elements to the target element to com-pile the client artifact Java classes and the Main.java client Java application. The build.xml file is listed below.
<project name="webservices-simple_client" default="all"> Run the build-client target to generate the client artifacts and compile the Java classes. C:\BEA\user_projects\webservices\simple_client> ant build-client The client artifacts get generated and the Java classes get compiled. The output from the build-client target is shown in Figure 3. Next, add a target to the build.xml file to run the client Java application Main.java. Add a target run. Also add a path element to specify the classpath to run the Main.java application. The classpath should include the output/clientclass directory that contains the client artifacts and the system property java.class.path. The modified build.xml file is shown below.
<project name="webservices-simple_client" default="all"> <taskdef name="clientgen" Next, run the target run. The Web Service operation hello() gets invoked with a String argument and the result returned by the Web Service gets output as shown in Figure 4.
Conclusion
Reader Feedback: Page 1 of 1
Your Feedback
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||