<body><A href="https://www.sdn.sap.com/sdn/sapteched.sdn"><IMG height=89 alt=image src="https://weblogs.sdn.sap.com/weblogs/images/48854/illbethere_bangalore.jpg" width=240 border=0></A><br>
This weblog will help in
<ol>
<li>Exposing your Bean as a Web Service
<li>Consuming the same Web Service in the webdynpro.
</ol>
<br>
Create your own bean with all the methods as per your requirement, so depending upon the requirement we can expose all the methods as a Web Service else we can select a few among them.<br>
<br>
<ul>
<li>Now go to J2EE perspective open the bean, right click on that bean, go to new->Web Service.
<li>Now there will be a pop up dialog box asking for Web Service Name. Give a Name for the Web Service.
<li>Click on next you will find the Methods that you can select to expose.
<li>Next it will ask you for the Ear project Name.
<li>Select the Name of Ear from the list by browsing..
</ul>
Now you've created a Web Service using a Web Service Wizard. Now you need to Build the EJB Project and add this EJB to The Ear Project; then deploy that Ear.<br>
<br>
You have to do some Server side configurations now.<br>
<br>
<b>The Configurations are:: </b><br>
<ul>
<li>open your Visual Admin.
<li>Go to server --> services -->Web Services Container service.
<li>Click on Runtime tab. you will find the Web Service name that you gave while creating your Web Service.
<li>If you did not create any User up to now, you need to create it.
<li>Click on UDDI Server tab ->Users you can select the level of the user you want to create : Tier1, TierN, Admin and give the required details like Name and password.
</ul>
Now the User has been created.<br>
<br>
<img />//weblogs.sdn.sap.com/weblogs/images/38574/final.JPG|height=365|alt=image|width=511|src=https://weblogs.sdn.sap.com/weblogs/images/38574/final.JPG|border=0!<br>
<br>
Now go to tab - UDDI Client :<br>
<br>
Change the Inquiry URL and Publish URL : you have to give the server name and the port number where you deployed your Web Service.<br>
<br>
There is one more tab, <b>Settings</b>, in the above screen; here you have to give your internet settings. Maybe the User ID and the password and the IP Address through which you are connecting to the internet.<br>
<br>
Now select your Web Service, just click on the Publish button. It will open another window with this url "[http://<host>:<portno>/ | http://%3Chost%3E:%3Cportno%3E/]uddiclient", if it doesn't, open it manually.<br>
<br>
<img />//weblogs.sdn.sap.com/weblogs/images/38574/web9.JPG|height=384|alt=image|width=512|src=https://weblogs.sdn.sap.com/weblogs/images/38574/web9.JPG|border=0!<br>
<b>fig(1)</b><br>
<br>
First you have to publish your Web Service as an entity :<br>
<ol>
<li>So select the 3rd option in the above screen and click on next.
<li>You will find already created business entities in the list
<li>To create a new Business entity choose Create Business.
<li>Choose "New name" give a name for the Business entity.
<li>And click on Publish, thus you will get a success message.
</ol>
Next step is to publish the Web Service as a Business Service.<br>
<br>
<img /></body>