Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tom Mahy
Liferay Service Builder 6.1 ANT
February 17, 2012 3:26 AM
Answer

Tom Mahy

Rank: Junior Member

Posts: 98

Join Date: May 11, 2011

Recent Posts

Hi,

so im trying to build a remote service with the standard service build.
I have the liferay IDE installed.
I user liferay 6.1CE and the SDK 6.1

the steps i followed :
--> create portlet
--> create liferay service inside the portlet.

this generates a service.xml
i change it to look like this.
1
2<entity name="Mapping" local-service="false" remote-service="true">
3        <column name="id" type="long" primary="true"/>
4         <column name="uuid" type="String"/>
5</entity>


i then do a build service (from the service.xml)
i then change MappingServiceImpl with some very basic functions.
i then do a build service (from the service.xml)
i then do a build wsdd (from the service.xml)

MappingService_deploy.wsdd and server-config.wsdd refer to the funtions correctly.
So i do a clean and deploy.

The portlet installs fine. No errors.
I can even see it under add portlet/ samples
i can also add it to the page.

BUT the service is not available.
if i go to http://localhost:8081/myservice-portlet/axis/Plugin_Mapping_MappingService?wsdl i get a 404

The only thing i noticed inside the log was
 1
 2build-wsdd:
 3     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
 4     [java] Feb 17, 2012 11:22:36 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 5     [java] INFO: Global lib directory /opt/liferay_6.1/tomcat-7.0.23/lib/ext/
 6     [java] Feb 17, 2012 11:22:36 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 7     [java] INFO: Portal lib directory /opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/
 8     [java] 11:22:36,588 INFO  [EasyConf:122] Refreshed the configuration of all components
 9     [java] 11:22:37,029 INFO  [ConfigurationLoader:56] Properties for jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
10     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
11     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
12     [java] SLF4J: Class path contains multiple SLF4J bindings.
13     [java] SLF4J: Found binding in [jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
14     [java] SLF4J: Found binding in [jar:file:/opt/liferay_6.1_sdk/portlets/myservice-portlet/docroot/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
15     [java] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
16     [java]   Java2WSDL com.company.service.http.MappingServiceSoap
17     [java]   WSDL2Java /opt/liferay_6.1_sdk/portlets/myservice-portlet/20120217112241677/service.wsdl
18     [java]   Deleting directory /opt/liferay_6.1_sdk/portlets/myservice-portlet/20120217112241677
19BUILD SUCCESSFUL
20Total time: 9 seconds


I tried restarting liferay several times.
Please note that liferay runs on port 8081.

If i repeat these exact steps using the 6.0.6 sdk everything works fine.

any ideas what im doing wrong ?
Tom Mahy
RE: Liferay Service Builder 6.1 ANT
March 8, 2012 5:16 AM
Answer

Tom Mahy

Rank: Junior Member

Posts: 98

Join Date: May 11, 2011

Recent Posts

also, it is not visible inside :
http://127.0.0.1:8081/api/axis OR http://localhost:8081/api/jsonws

Ive just tried to create a new project again, no difference.
I also created a new workspace and reinstalled the liferay IDE.
Its also a new installation of liferay.

Still the exact same behaviour appears.

I also get the same logs than in this post :
http://www.liferay.com/community/forums/-/message_boards/view_message/12320724

It relates to a jar that has declared multiple times (slf4j).

Can anyone else test this and see if it actually works.
Im running out of ideas here and im starting to think the SDK is broken.

I've attached the portlet with the service.

Thank you.

EDIT: removed portlet.

EDIT : we are not upgrading anymore.
Patrick Momin
RE: Liferay Service Builder 6.1 ANT
March 15, 2012 9:40 AM
Answer

Patrick Momin

Rank: New Member

Posts: 3

Join Date: March 7, 2012

Recent Posts

I am having the same problem here, i have been searching this site and the rest of the web for clues. But found none whatsoever.

I also followed this tutorial: http://www.liferay.com/community/wiki/-/wiki/Main/Creating+Liferay+6+plugin+web+service but on liferay 6.1

same error, i cannot get the neither under do i get a wsdl listing under http://localhost:8080/<portletname>/axis nor do i get a wsdl under http://localhost:8080/<portletname>/axis/<plugin_service_name>?wsdl

Help is appreciated, i'm kinda out of options to continue on version 6.1
Tom Mahy
RE: Liferay Service Builder 6.1 ANT
March 15, 2012 10:50 PM
Answer

Tom Mahy

Rank: Junior Member

Posts: 98

Join Date: May 11, 2011

Recent Posts

Hi.

This isnt the only problem we have encountered with the service builder on the 6.1 SDK.
We didnt have time to investigate any further. so we used a hibernate + ehcache + maven as a workaround.

Let me know if you get past the problems.


Thank you.
Hitesh Methani
RE: Liferay Service Builder 6.1 ANT
March 15, 2012 11:50 PM
Answer

Hitesh Methani

Rank: Regular Member

Posts: 114

Join Date: June 24, 2010

Recent Posts

Hello,

I am using liferay-6.1-jboss-ee and able to access plugin portlet services normally
using url http://localhost:8080/<portlet-name>/api/axis.

Thanks and Regards,
Hitesh Methani.
Patrick Momin
RE: Liferay Service Builder 6.1 ANT
March 16, 2012 3:07 AM
Answer

Patrick Momin

Rank: New Member

Posts: 3

Join Date: March 7, 2012

Recent Posts

Hitesh Methani:
Hello,

I am using liferay-6.1-jboss-ee and able to access plugin portlet services normally
using url http://localhost:8080/<portlet-name>/api/axis.

Thanks and Regards,
Hitesh Methani.


Hi and thanks for the replay. I actually found out about this by comparing the web.xml files of the plugins in their 6.0 and 6.1 version.

Cheers
Rafa Quinonero
RE: Liferay Service Builder 6.1 ANT
April 19, 2012 5:25 AM
Answer

Rafa Quinonero

Rank: Junior Member

Posts: 37

Join Date: March 22, 2012

Recent Posts

The service is under localhost:8081/portlet-name/api/axis for LF 6.1

You can also try to "enable-cache=true" in the entitiy, and of course "local-service=true" also in the entitiy.

One different thing I do is, before run the WSDD Service, I deploy first. So Deploy the portlet, and then run the WSDD.

That is working for me and I'm able to see my services under: http://localhost:8081/portlet-name/api/axis

Hope it helps.

Regards.
Ashish Renapurkar
RE: Liferay Service Builder 6.1 ANT
July 16, 2012 9:32 AM
Answer

Ashish Renapurkar

Rank: New Member

Posts: 20

Join Date: January 18, 2012

Recent Posts

Tom Mahy:
Hi,

so im trying to build a remote service with the standard service build.
I have the liferay IDE installed.
I user liferay 6.1CE and the SDK 6.1

the steps i followed :
--> create portlet
--> create liferay service inside the portlet.

this generates a service.xml
i change it to look like this.
1
2<entity name="Mapping" local-service="false" remote-service="true">
3        <column name="id" type="long" primary="true"/>
4         <column name="uuid" type="String"/>
5</entity>


i then do a build service (from the service.xml)
i then change MappingServiceImpl with some very basic functions.
i then do a build service (from the service.xml)
i then do a build wsdd (from the service.xml)

MappingService_deploy.wsdd and server-config.wsdd refer to the funtions correctly.
So i do a clean and deploy.

The portlet installs fine. No errors.
I can even see it under add portlet/ samples
i can also add it to the page.

BUT the service is not available.
if i go to http://localhost:8081/myservice-portlet/axis/Plugin_Mapping_MappingService?wsdl i get a 404

The only thing i noticed inside the log was
 1
 2build-wsdd:
 3     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
 4     [java] Feb 17, 2012 11:22:36 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 5     [java] INFO: Global lib directory /opt/liferay_6.1/tomcat-7.0.23/lib/ext/
 6     [java] Feb 17, 2012 11:22:36 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
 7     [java] INFO: Portal lib directory /opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/
 8     [java] 11:22:36,588 INFO  [EasyConf:122] Refreshed the configuration of all components
 9     [java] 11:22:37,029 INFO  [ConfigurationLoader:56] Properties for jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
10     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
11     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
12     [java] SLF4J: Class path contains multiple SLF4J bindings.
13     [java] SLF4J: Found binding in [jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
14     [java] SLF4J: Found binding in [jar:file:/opt/liferay_6.1_sdk/portlets/myservice-portlet/docroot/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
15     [java] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
16     [java]   Java2WSDL com.company.service.http.MappingServiceSoap
17     [java]   WSDL2Java /opt/liferay_6.1_sdk/portlets/myservice-portlet/20120217112241677/service.wsdl
18     [java]   Deleting directory /opt/liferay_6.1_sdk/portlets/myservice-portlet/20120217112241677
19BUILD SUCCESSFUL
20Total time: 9 seconds


I tried restarting liferay several times.
Please note that liferay runs on port 8081.

If i repeat these exact steps using the 6.0.6 sdk everything works fine.

any ideas what im doing wrong ?



Hello All,

I have same problem , But when I change the SDK from 6.0.6 to SDK 6.1 which is downloaded with exact with liferay, This problem is resolved and not come again.

Hope this will be help you in building the liferay application.

Regards...
Ashish Renapurkar