<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
<li>Exposing your Bean as a Web Service
<li>Consuming the same Web Service in the webdynpro.
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>
<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..
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>
You have to do some Server side configurations now.<br>
<b>The Configurations are:: </b><br>
<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.
Now the User has been created.<br>
Now go to tab – UDDI Client :<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>
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>
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>
First you have to publish your Web Service as an entity :<br>
<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.
Next step is to publish the Web Service as a Business Service.<br>