Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
aryan sahu
remote service in service builder
16 de Junho de 2012 05:31
Resposta

aryan sahu

Ranking: Junior Member

Mensagens: 54

Data de entrada: 6 de Abril de 2012

Mensagens recentes

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
16 de Junho de 2012 07:46
Resposta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensagens: 9226

Data de entrada: 1 de Setembro de 2006

Mensagens recentes

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
18 de Junho de 2012 00:23
Resposta

Amit Doshi

Ranking: Liferay Master

Mensagens: 547

Data de entrada: 29 de Dezembro de 2010

Mensagens recentes

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
18 de Junho de 2012 06:11
Resposta

aryan sahu

Ranking: Junior Member

Mensagens: 54

Data de entrada: 6 de Abril de 2012

Mensagens recentes

thank you very much... nicely explained
Ashish Renapurkar
RE: remote service in service builder
3 de Fevereiro de 2013 23:52
Resposta

Ashish Renapurkar

Ranking: New Member

Mensagens: 23

Data de entrada: 18 de Janeiro de 2012

Mensagens recentes

Very well explained. Thanks a lots.

Regards..
Ashish Renapurkar
Ajay Saharan
RE: remote service in service builder
18 de Abril de 2013 04:17
Resposta

Ajay Saharan

Ranking: New Member

Mensagens: 17

Data de entrada: 25 de Fevereiro de 2009

Mensagens recentes

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
18 de Abril de 2013 05:54
Resposta

Amit Doshi

Ranking: Liferay Master

Mensagens: 547

Data de entrada: 29 de Dezembro de 2010

Mensagens recentes

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
18 de Abril de 2013 21:49
Resposta

Ajay Saharan

Ranking: New Member

Mensagens: 17

Data de entrada: 25 de Fevereiro de 2009

Mensagens recentes

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
22 de Abril de 2013 03:55
Resposta

Amit Doshi

Ranking: Liferay Master

Mensagens: 547

Data de entrada: 29 de Dezembro de 2010

Mensagens recentes

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
21 de Novembro de 2014 16:28
Resposta

Jason Andrew

Ranking: New Member

Mensagens: 18

Data de entrada: 1 de Março de 2014

Mensagens recentes

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
Ranjit Reval
RE: remote service in service builder
22 de Novembro de 2014 00:07
Resposta

Ranjit Reval

Ranking: New Member

Mensagens: 12

Data de entrada: 25 de Junho de 2014

Mensagens recentes

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.