Generating Stubs(webservices) in Liferay


Generating stubs in liferay ,

1. we can generate the stubs in eclipse as

        File ---> New ---> Others --->type webservices and select webservices client ---> Paste the WSDL in the service defination and move the slide till to TestClient and click on the "finish" to generate.

WSDL can of type below http://localhost:8080/api/axis/Portlet_Blogs_BlogsEntryService?wsdl

When i am trying to do in liferay eclipse it is not allowing to generate the stubs. So i am used Plain tomcat to generate the stubs.

2. We can also generate the stubs by ant

   Drag and Drop the build.xml in ant

   Locate the build-client . Double click on it . It Generate the <portlet-name>-portlet-client.jar file in the docroot/WEB-INF/client folder.
 
   This lib contains the stubs. By Using that stubs we can write the our own implementations.

Comments

  1. hi can u give me the detailed flow of process of generating WSDL in the liferay portlet.

    ReplyDelete
  2. Hi Ravi,

    In Liferay WSDL file will be generated automatically

    I will share you the details

    1.First three should we methods to be write in the "ServiceImpl" classes
    2.After that we should be build the service in ant (build-service) task.
    Now you can see the SOAP classes are generated automatically.
    3.Again the execute the ant task(build-wsdd) it will generate the webservices.
    4. Again the excute the ant task (build-deploy).

    Hit the following URL of the default liferay service
    http://localhost:8080/api/axis

    Portlet specific http://localhost:8080//api/axis

    Thats it!!


    If you feel still detail steps are required . I will post the new post for the generation of the WSDL.

    ReplyDelete

Post a Comment

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate