掲示板
Service Builder remote service not showing up in exposed json web services
7年前 に S Ts によって更新されました。
Service Builder remote service not showing up in exposed json web services
New Member 投稿: 16 参加年月日: 16/08/31 最新の投稿
Hi,
I created a remote service with the service builder using an entity with no columns (just a dummy entity). The build service gradle task completes with no errors and generates the source files correctly. Unfortunately any methods i define in *ServiceImpl.java do not show up in the JSONWS API.
When I add a column to the entity and re-run the service builder the remote services do appear in the JSONWS API.
Is there any reason for this behaviour?
service.xml, No column
added col
I created a remote service with the service builder using an entity with no columns (just a dummy entity). The build service gradle task completes with no errors and generates the source files correctly. Unfortunately any methods i define in *ServiceImpl.java do not show up in the JSONWS API.
When I add a column to the entity and re-run the service builder the remote services do appear in the JSONWS API.
Is there any reason for this behaviour?
service.xml, No column
<!--?xml version="1.0"?-->
<service-builder package-path="com.example">
<namespace>fileservice</namespace>
<entity name="BigLoader" local-service="true" cache-enabled="false">
</entity>
</service-builder>
added col
<!--?xml version="1.0"?-->
<service-builder package-path="com.example">
<namespace>fileservice</namespace>
<entity name="BigLoader" local-service="true" cache-enabled="false">
<column name="DummyCol" primary="true" type="int"></column>
</entity>
</service-builder>
7年前 に David H Nebinger によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
An entity with no columns has no automatic methods exposed. Once you add the column, that adds default methods and it appears in the json api.
If instead of adding a column to the entity, you went into BigLoaderServiceImpl class and added some method and rebuilt services, you would see methods exposed in the jsonws api panel.
Come meet me at the LSNA!
If instead of adding a column to the entity, you went into BigLoaderServiceImpl class and added some method and rebuilt services, you would see methods exposed in the jsonws api panel.
Come meet me at the LSNA!
7年前 に S Ts によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
New Member 投稿: 16 参加年月日: 16/08/31 最新の投稿
Hey thanks for the reply,
I should clarify that I did have methods in BigLoaderServiceImpl. These methods did not get exposed via the json api (in fact i could not even see the context path in the drop down at /api/jsonws). When I added a column I could then see the methods I had written.
I should clarify that I did have methods in BigLoaderServiceImpl. These methods did not get exposed via the json api (in fact i could not even see the context path in the drop down at /api/jsonws). When I added a column I could then see the methods I had written.
7年前 に David H Nebinger によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Okay, what version of Liferay are you using?
The column should not be required certainly. The question is whether it is a known bug or something that has been fixed...
Come meet me at the LSNA!
The column should not be required certainly. The question is whether it is a known bug or something that has been fixed...
Come meet me at the LSNA!
7年前 に S Ts によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
New Member 投稿: 16 参加年月日: 16/08/31 最新の投稿
Should be the latest liferay 7. Looks like I downloaded the bundle on Aug 22
7年前 に David H Nebinger によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Okay, so I actually have not tried this under LR7 yet.
Does it impact the outcome if you actually add remote-service="true" to your entity? It shouldn't, but who knows if SB is trying to decide on it's own to expose or not.
Have you searched issues.liferay.com to see if there's a reported issue on this? If there isn't one you might consider reporting.
Come meet me at the LSNA!
Does it impact the outcome if you actually add remote-service="true" to your entity? It shouldn't, but who knows if SB is trying to decide on it's own to expose or not.
Have you searched issues.liferay.com to see if there's a reported issue on this? If there isn't one you might consider reporting.
Come meet me at the LSNA!
7年前 に S Ts によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
New Member 投稿: 16 参加年月日: 16/08/31 最新の投稿
Adding remote-service="true" doesn't seem to help.
7年前 に Andrea Maschio によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
New Member 投稿: 14 参加年月日: 16/07/27 最新の投稿David H Nebinger:
Okay, what version of Liferay are you using?
The column should not be required certainly. The question is whether it is a known bug or something that has been fixed...
I'm afraid I stumbled upon the same bug. It's all day I'm trying to understand why my Liferay 7.0.1 Ga2 doesn't expose ANY of my JSON webservices at all. I've tried to rebuild services so many times.. in my case I have an Author entity with three columns (one of which is id) and my AuthorServiceImpl has public methods in it.
I've tried starting from a helloworld, but no method and in fact no contextName gets ever added. I have a project based on the same liferay version which works properly and was trying to understand why.
My service-api osgi module has this method
public interface AuthorService extends BaseService {
public java.lang.String getOSGiServiceIdentifier();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<author> getAuthors(int start, int end);
}
</author>
I suspect I am affected by the same problem, unfortunately I just moved from a liferay 6.1-2 training to 7 so I am no expert.
7年前 に S Ts によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
New Member 投稿: 16 参加年月日: 16/08/31 最新の投稿
7年前 に Juan Gonzalez によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿Andrea Maschio:
David H Nebinger:Okay, what version of Liferay are you using?
The column should not be required certainly. The question is whether it is a known bug or something that has been fixed...
I'm afraid I stumbled upon the same bug. It's all day I'm trying to understand why my Liferay 7.0.1 Ga2 doesn't expose ANY of my JSON webservices at all. I've tried to rebuild services so many times.. in my case I have an Author entity with three columns (one of which is id) and my AuthorServiceImpl has public methods in it.
I've tried starting from a helloworld, but no method and in fact no contextName gets ever added. I have a project based on the same liferay version which works properly and was trying to understand why.
My service-api osgi module has this methodpublic interface AuthorService extends BaseService { public java.lang.String getOSGiServiceIdentifier(); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List<author> getAuthors(int start, int end); } </author>
I suspect I am affected by the same problem, unfortunately I just moved from a liferay 6.1-2 training to 7 so I am no expert.
Seems Andrea fixed this issue by following steps here https://web.liferay.com/community/forums/-/message_boards/message/78393499#_19_message_78836905.
7年前 に Gaurav Jain によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
Junior Member 投稿: 85 参加年月日: 16/07/12 最新の投稿
Hi S Ts,
To see the context path in the drop down at /api/jsonws you need to build wsdd of your entity. For this you need to add wssdd plugin dependencies in build.gradle files of your service-builder module.
Go through all build.gradle files of this sample project on git hub https://github.com/amusarra/liferay-italia-bo-usergroup/tree/eabde4ed22dd65eae4d66e271adf36cf53003b00/modules/service-builder/horse
This shows what changes you need to do in your all build.gradle files.
Let me know if it helps.
Gaurav
S Ts:
I should clarify that I did have methods in BigLoaderServiceImpl. These methods did not get exposed via the json api (in fact i could not even see the context path in the drop down at /api/jsonws). When I added a column I could then see the methods I had written.
To see the context path in the drop down at /api/jsonws you need to build wsdd of your entity. For this you need to add wssdd plugin dependencies in build.gradle files of your service-builder module.
Go through all build.gradle files of this sample project on git hub https://github.com/amusarra/liferay-italia-bo-usergroup/tree/eabde4ed22dd65eae4d66e271adf36cf53003b00/modules/service-builder/horse
This shows what changes you need to do in your all build.gradle files.
Let me know if it helps.
Gaurav
7年前 に Heiner Kücker によって更新されました。
RE: Service Builder remote service not showing up in exposed json web servi
New Member 投稿: 10 参加年月日: 16/09/05 最新の投稿
Building wsdd is only necessary for axis (soap) webservices.
In my case the solution was to change the 'compileOnly' statements to 'compile' in build.gradle file of service sub module (not api sub module) of the servicebuilder sub module of Liferay Workspace Project.
To activate the change select in Eclipse Liferay IDE in Project Explorer any node and click right mouse key and choose Menu item Gradle - Refresh Gradle Project.
In my case the solution was to change the 'compileOnly' statements to 'compile' in build.gradle file of service sub module (not api sub module) of the servicebuilder sub module of Liferay Workspace Project.
To activate the change select in Eclipse Liferay IDE in Project Explorer any node and click right mouse key and choose Menu item Gradle - Refresh Gradle Project.