Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
aryan sahu
remote service in service builder
June 16, 2012 5:31 AM
Answer

aryan sahu

Rank: Junior Member

Posts: 54

Join Date: April 6, 2012

Recent Posts

how to consume the services exposed by the service builder when we generate the services using remote service=true in service.xml. i am beginner please help
David H Nebinger
RE: remote service in service builder
June 16, 2012 7:46 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11046

Join Date: September 1, 2006

Recent Posts

Remote services enable calling using a web service. Check out any of the doco for referring to the web service. You can use the built-in jaxws functionality of java 6 to create a client wrapper around the wsdl.
Amit Doshi
RE: remote service in service builder
June 18, 2012 12:23 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Aryan,

I recently created one remote service in liferay to make it access by third Party.

And that service I also want to show in the Tunnel Web as other liferay web service, we are able to see.

So for that I done the following steps.

1) remote-service=true in service.xml in order to generate soap classes through which the service will get access by third party.
2) ant build-service(for ANT)
3) ant build:wsdd (It will generate for you service-config.wsdd respective to your service) . In this file it will be given all the description for the Service, which parameter to be passed and which all the methods etc.
4) As you need to make it global level so that the third party make it access, so during deployment it will make portletname-service.jar file, put that jar file in tomcat/ext/lib. So it will be available for the global access.
5) As per my requirement, I want to show in the tunnel-web axis so put the service tag which was generated using the command (ant build:wsdd) into the tomcat/webapps/tunnel-web/web-inf/Service-config.wsdd.

So now your service is globally available and you will be able to see your service in the localhost:8080/tunnel-web/axis .

NOTE :- Here I mentioned the Steps considering that web-service will be accessed by the Third Party.

Hope I am clear.

Thanks & Regards,
Amit Doshi
aryan sahu
RE: remote service in service builder
June 18, 2012 6:11 AM
Answer

aryan sahu

Rank: Junior Member

Posts: 54

Join Date: April 6, 2012

Recent Posts

thank you very much... nicely explained
Ashish Renapurkar
RE: remote service in service builder
February 3, 2013 11:52 PM
Answer

Ashish Renapurkar

Rank: New Member

Posts: 23

Join Date: January 18, 2012

Recent Posts

Very well explained. Thanks a lots.

Regards..
Ashish Renapurkar
Ajay Saharan
RE: remote service in service builder
April 18, 2013 4:17 AM
Answer

Ajay Saharan

Rank: New Member

Posts: 17

Join Date: February 25, 2009

Recent Posts

Dear Amit,

Thanks for nice explaintion about wsdd. How I'll resgiter my json based web service genrated by service builder. Which i can access through http://localhost:8080/api/jsonws url.

And I also want to resgister these service as soap based web services.

Thanks,
Ajay
Amit Doshi
RE: remote service in service builder
April 18, 2013 5:54 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Ajay Saharan:
Dear Amit,

Thanks for nice explaintion about wsdd. How I'll resgiter my json based web service genrated by service builder. Which i can access through http://localhost:8080/api/jsonws url.

And I also want to resgister these service as soap based web services.

Thanks,
Ajay


For the Soap based web service, you can follow my above steps.

And for the JSON based webservice you need to follow some more steps:-

Please check this link for JSON based Web service. It was nicely explained here.

Let me know if you face any issue.

Thanks & Regards,
Amit Doshi
Ajay Saharan
RE: remote service in service builder
April 18, 2013 9:49 PM
Answer

Ajay Saharan

Rank: New Member

Posts: 17

Join Date: February 25, 2009

Recent Posts

Dear Amit,
For soap based web services also in Liferay 6.0 we don't have any tunnel-web application to register. It;s should register automatically. Because other services of liferay can list out with the url http://localhost:8080/api/secure/axis provided in all services created by liferay service builder.

Thanks,
Ajay
Amit Doshi
RE: remote service in service builder
April 22, 2013 3:55 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Ajay Saharan:
Dear Amit,
For soap based web services also in Liferay 6.0 we don't have any tunnel-web application to register. It;s should register automatically. Because other services of liferay can list out with the url http://localhost:8080/api/secure/axis provided in all services created by liferay service builder.

Thanks,
Ajay


Yes now from liferay 6.0 tunnel-web is removed. But if you want to see all the entry of services then go into $tomact_home/webapps/ROOT/WEB-INF folder there is server-config.wsdd file.

There you will be able to see all the service entries.

And If you want to list your custom service in http://localhost:8080/api/secure/axis list.

Then when you fired the command ant build-wsdd then it will generate the wsdd file for your service.

Copy the service tag from it and put that tag inside the $tomact_home/webapps/ROOT/WEB-INF/server-config.wsdd.

You required to restart the server after modifing the server-config.wsdd.

Your job is done now.

Thanks & Regards,
Amit Doshi
Jason Andrew
RE: remote service in service builder
November 21, 2014 4:28 PM
Answer

Jason Andrew

Rank: New Member

Posts: 18

Join Date: March 1, 2014

Recent Posts

I have a problem accessing http://localhost:8080/api/jsonws
when portal.proxy.path is set

ex:
portal.proxy.path=/enginemode

error infinite loop:
1
243-exec-10][404_jsp:?] /enginemode/c
300:12:49,157 WARN  [http-bio-8443-exec-10][404_jsp:?] /enginemode/c
400:12:49,180 WARN  [http-bio-8443-exec-10][404_jsp:?] /enginemode/c
500:12:49,191 WARN  [http-bio-8443-exec-8][404_jsp:?] /enginemode/c
600:12:49,208 WARN  [http-bio-8443-exec-8][404_jsp:?] /enginemode/c
Ranjitsinh Reval
RE: remote service in service builder
November 22, 2014 12:07 AM
Answer

Ranjitsinh Reval

Rank: New Member

Posts: 13

Join Date: June 25, 2014

Recent Posts

Hi,
Please refer following links. Here you will find example with details explanation.

http://www.liferaysavvy.com/2014/05/consuming-liferay-json-web-services.html
http://arvindm.com/2010/03/23/web-services-in-liferay/


Let me know if you face any problem.