Wednesday 25 July 2012

Procedure for Creating a Web Service at Server Side



Hi Friends..........

Previously we saw Overview of SOAP based Webservices and how to write the Web Service example.


I am sharing you how to develop a SOAP based webservice in WEBLOGIC 10.3  workshop and WEBLOGIC server for deployment.
(The procedure / structure of developing or using Webservices will be identical in many of the IDEs)


Lets see step by step procedure for developing a web Service at Server-side in-detail.


Creating of a Service :
     1. Create a new Project. 
                         Select of type 'Web Service project' and Click Next.



       2. Provide the Project Name.
           In Configurations, select 'Annotated Web Services Facets JAX-WS (Recommended)' and leave
                remaining as default only.
            Click 'Finish'.     

                                   
   
       3. In the new project, create a package.
            On new package, create a new 'Weblogic Webservice' and give the Class name.
            Then click finish.
            Else you can create a new normal class and later you can add additional very few annotations, which
             is very simple.




       4. Write the service code in the classes

      Till here, you are ready with your service......
       Lets see how to deploy and check the services.....



  • Deploying and the Service :
      5. Right click on the project -->  'Run As'.
          Then click on 'Run on Server'. If you not configured the server, then you should configure the server 
           and click on Finish by leaving all the default settings.


     6. Now your service is got ready.......
         For checking whether its working or not, hit the url.
                url:        http://hostname:port/context-name/webservice-name?wsdl
         For checking xsd file, hit the below url.

                url:        http://hostname:port/context-name/webservice-name?xsd=1

         Sometimes, you need to append 'Service' for webservice-name for checking the wsdl or xsd file.

Till here now you are successfully completed with your service and its working fine........ :)

2 comments:

  1. Nice Post --> +1

    ReplyDelete
  2. Very useful information that you have shared and it is very useful to me. Thanks for sharing the information with us.
    kindle mobi formatting services

    ReplyDelete