Comments
litl_phil wrote: While it's nice that Google and Acer share the vision of cloud-based computing, it's also worth noting that we at litl already have a webbook on the market (available at litl.com) that runs our own cloud-based OS. Unlike Chrome, litlOS is focused on creating a new and better web experience for the home, so we don't have the usual browser interface, we have our own innovative UI. In conjunction with easel mode (litl's inverted-V position) and our growing cohort of litl channels (special apps t...
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


JDJ Feature — Java API for XML Web Services (JAX-WS)
Creating a JAX-WS 2.0 Web Service in WebLogic Server 10

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"
wsdl="http://localhost:7001/HelloWsImpl/HelloWsImplService?WSDL"
destDir="output/clientclass" packageName="webservices.jaxws.client"/>

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">
<taskdef name="clientgen"
classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
<target name="build-client"> <clientgen type="JAXWS"
wsdl="http://localhost:7001/HelloWsImpl/HelloWsImplService?WSDL"
destDir="output/clientclass" packageName="webservices.jaxws.client"/>
<javac srcdir="output/clientclass" destdir="output/clientclass" includes="**/*.java"/>
<javac srcdir="src" destdir="output/clientclass"
includes="webservices/jaxws/client/*.java"/></target>
</project>

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"
classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
<target name="build-client"> <clientgen type="JAXWS"
wsdl="http://localhost:7001/HelloWsImpl/HelloWsImplService?WSDL"
destDir="output/clientclass" packageName="webservices.jaxws.client"/> <javac
srcdir="output/clientclass" destdir="output/clientclass" includes="**/*.java"/> <javac
srcdir="src" destdir="output/clientclass"
includes="webservices/jaxws/client/*.java"/></target>
<path id="client.class.path">
<pathelement path="output/clientclass"/> <pathelement
path="${java.class.path}"/> </path> <target name="run" >
<java fork="true"
classname="webservices.jaxws.client.Main"failonerror="true" >
<classpath refid="client.class.path"/> </java> </target>
</project>

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
WebLogic Server 10 Technical Preview supports JEE 5 and the JAX-WS 2.0 Web Services. WebLogic server 10 also provides Ant tasks jwsc and clientgen to generate the Web Service artifacts and client artifacts.

About Deepak Vohra
Deepak Vohra is a Sun Certified Java 1.4 Programmer and a Web developer.

About Ajay Vohra
Ajay Vohra is a senior solutions architect with DataSynapse Inc.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

The example give in this article is too simple. Information given in this article can even be found in weblogic documentation.. so what additional value does this article? to me NIL.

I would have appreciated a more realistic example where webservice is used along with other libraries like beehive controls and then see how you can jwsc to package this application into an .ear or .war. There are a bunch of cases in which jwsc gives warnings and errors and none of them seem to be discussed/explained in this article.


Your Feedback
nayanj wrote: The example give in this article is too simple. Information given in this article can even be found in weblogic documentation.. so what additional value does this article? to me NIL. I would have appreciated a more realistic example where webservice is used along with other libraries like beehive controls and then see how you can jwsc to package this application into an .ear or .war. There are a bunch of cases in which jwsc gives warnings and errors and none of them seem to be discussed/explained in this article.
Enterprise Open Source Magazine Latest Stories . . .
Oracle seems to have divided the open source ranks over the MySQL delay it’s having closing its acquisition of Sun. Eben Moglin, the GPL’s most ardent defender and delineator, the lawyer who has worked hand in glove for years with the Free Software Foundation’s founder Richard Stallman...
Cloud computing is a game changer. The cloud is disrupting traditional software and hardware business models by disrupting how IT service gets delivered. Entrepreneurial opportunities abound as this classic disruptive technology begins to proliferate, so it is no surprise that SYS-CON'...
The irony is that Oracle has advanced MySQL, lost money in the process, and helped its competitors - all at the same time. When Oracle buys Sun and controls MySQL the gift (other than to Microsoft SQL Server) keeps on giving as the existential threat to RDBs is managed by Redwood Shore...
WSO2, the open source SOA company, today announced the launch of the WSO2 Cloud Platform. Available today, the new WSO2 Cloud Platform features a family of WSO2 Cloud Virtual Machines; WSO2 Cloud Connectors for enabling fast, secure cloud services; and the multi-tenant WSO2 Governance-...
Now, the open source Mozilla Thunderbird client software can be used with Open-Xchange collaboration software. The "Community OXtender for Thunderbird" software connector gives users full access to appointments and contacts stored in the Open-Xchange Server and enables them to use Thun...
Morph Labs, a leading provider of enterprise cloud computing technology, today announced an introductory trial of the Morph CloudServer, an open, standards-based server IT organizations can use to rapidly model and evaluate their cloud implementations. A miniature "Cloud Environment in...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE