Foren

Calling remote service method using Javascript in plugins sdk portlet-5.2.x

thumbnail
Nagendra Kumar Busam, geändert vor 12 Jahren.

Calling remote service method using Javascript in plugins sdk portlet-5.2.x

Liferay Master Beiträge: 678 Beitrittsdatum: 07.07.09 Neueste Beiträge
I have a custom portlet developed through plugins sdk using 5.2 EE SP3 - how can we invoke remote service method in javascript

I checked the following post, but it has given explained with respect to ext environment

http://apoorvaprakash.blogspot.com/2011/02/calling-remote-service-method-using.html

but there was some problem with custom portlet's devleoped thru plugins it seems

When i run ant build-services everything went well, when i am trying to compile i am getting attahced error


D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet>ant compile
Buildfile: D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet\build.xml

compile:

merge:

compile-java:
[javac] D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\build-common.xml:94: warning: 'includeantruntime' was not set, defaultin
g to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 12 source files to D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portl
et\docroot\WEB-INF\classes
[javac] D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet\docroot\WEB-INF\src\com\li
feray\sampleservicebuilder\service\http\FooServiceHttp.java:29: cannot find symbol
[javac] symbol : class HttpPrincipal
[javac] location: package com.liferay.portal.security.auth
[javac] import com.liferay.portal.security.auth.HttpPrincipal;
[javac] ^
[javac] D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet\docroot\WEB-INF\src\com\li
feray\sampleservicebuilder\service\http\FooServiceHttp.java:30: package com.liferay.portal.service.http does not exist
[javac] import com.liferay.portal.service.http.TunnelUtil;
[javac] ^
[javac] D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet\docroot\WEB-INF\src\com\li
feray\sampleservicebuilder\service\http\FooServiceHttp.java:40: cannot find symbol
[javac] symbol : class HttpPrincipal
[javac] location: class com.liferay.sampleservicebuilder.service.http.FooServiceHttp
[javac] public static java.lang.String likeIt(HttpPrincipal httpPrincipal,
[javac] ^
[javac] D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet\docroot\WEB-INF\src\com\li
feray\sampleservicebuilder\service\http\FooServiceHttp.java:62: cannot find symbol
[javac] symbol : variable TunnelUtil
[javac] location: class com.liferay.sampleservicebuilder.service.http.FooServiceHttp
[javac] returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
[javac] ^
[javac] Note: D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\portlets\5.2.x-sample-service-builder-portlet\docroot\WEB-INF\src\
com\liferay\sampleservicebuilder\service\persistence\FooPersistenceImpl.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 4 errors

BUILD FAILED
D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\build-common-plugin.xml:181: The following error occurred while executing this line:

D:\projects\liferay\lr606\liferay-portal-6.0.6\workspace\plugins-sdk-5.2-ee-sp3\build-common.xml:94: Compile failed; see the compiler error output for details.

Total time: 4 seconds


Please guide me how can i resolve the same or am i missing something with respect to service builder funtionality (for cusom portlets developed through plugins)

Thanks in advance.

Regards,
- Nagendra Kumar