Foren
Create a service and publish on tunnel WEB
Daniel Valverde, geändert vor 10 Jahren.
Create a service and publish on tunnel WEB
New Member Beiträge: 13 Beitrittsdatum: 08.07.13 Neueste Beiträge
Hi,
I need to develop a service, I know that I can develop a service with service builder, but the service builder you need to define a entity and the service generate this table on the data base and I don need it, I only need a Service where I can publish same functionalities.
Thanks, and I am sorry that my English is not so fine.
I need to develop a service, I know that I can develop a service with service builder, but the service builder you need to define a entity and the service generate this table on the data base and I don need it, I only need a Service where I can publish same functionalities.
Thanks, and I am sorry that my English is not so fine.
Sampsa Sohlman, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Regular Member Beiträge: 230 Beitrittsdatum: 27.09.07 Neueste Beiträge
Hi Daniel.
Plugin's Remote services are not exposed through Tunnel Web. Only core's services are.
Just make sure that remote-service="true" at service.xml
And generate services
and
Generate client to you remote services (liferay has to be running at 8080 port, with plugin deployed)
Hope this was helpful,
Sampsa
Plugin's Remote services are not exposed through Tunnel Web. Only core's services are.
Just make sure that remote-service="true" at service.xml
<entity name="Foo" .. remote-service="true">
</entity>
And generate services
ant build-service
and
ant build-wsdd
Generate client to you remote services (liferay has to be running at 8080 port, with plugin deployed)
ant build-client
Hope this was helpful,
Sampsa
Daniel Valverde, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
New Member Beiträge: 13 Beitrittsdatum: 08.07.13 Neueste Beiträge
Thanks I know that I can so generate a service accesible by SOAP, But in this manner the service builder generate a table in the data base and only I need to generate a service without generationt of tables.
Thanks again
Thanks again
David Ilechukwu, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Hi Daniel -
ServiceBuillder is actually quite configurable & there are many ways to generate a service without generating tables or even the entity itself.
Try adding this to your service.xml (then run servicebuilder):
Assuming you want to produce a Service called CustomService with access to Contact Persistence -
I have used this approach many times & it always works. Should solve your problem.
Let me know if it does.
ServiceBuillder is actually quite configurable & there are many ways to generate a service without generating tables or even the entity itself.
Try adding this to your service.xml (then run servicebuilder):
Assuming you want to produce a Service called CustomService with access to Contact Persistence -
<entity name="Custom" local-service="true" remote-service="true">
<!-- PK fields -->
<!-- FK fields -->
<!-- Attribute fields -->
<!-- Audit fields -->
<!-- Reference packages -->
<reference package-path="com.liferay.portal" entity="Contact" />
</entity>
I have used this approach many times & it always works. Should solve your problem.
Let me know if it does.
Daniel Valverde, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
New Member Beiträge: 13 Beitrittsdatum: 08.07.13 Neueste Beiträge
Thanks David it work fine, now for the SOAP, in the nameclassSoap i must define the different static method and run the build-wsdl task, It is right???
Thanks again
Thanks again
David Ilechukwu, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Great! Good to know it worked for you.
You do not need to modify the Soap files directly. All you need is to add your method definitions to the generated *ServiceImpl files and run build-wsdl.
The soap files will be auto generated.
Your new service should be available for remote use after you run ant build and ant deploy!
Keep me updated on your progress
You do not need to modify the Soap files directly. All you need is to add your method definitions to the generated *ServiceImpl files and run build-wsdl.
The soap files will be auto generated.
Your new service should be available for remote use after you run ant build and ant deploy!
Keep me updated on your progress
David Ilechukwu, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Daniel,
So how's it going?
Please let me know if you have any other concerns.
So how's it going?
Please let me know if you have any other concerns.
Daniel Valverde, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
New Member Beiträge: 13 Beitrittsdatum: 08.07.13 Neueste Beiträge
Sorry, I was the last days on Holydays, and David the services run fine thank for your help.
Best regards.
Best regards.
Daniel Valverde, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
New Member Beiträge: 13 Beitrittsdatum: 08.07.13 Neueste Beiträge
Hi, David a have a little problem with the service, i had creted then with Maven without doing any additional coding I try to package and deploy what was produced.. Packages then copies to my liferay deploy dir and I see this output in the logs
117:45:44,340 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:177] Processing simplePortletTest-1.0-SNAPSHOT.war
217:45:44,343 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][PortletAutoDeployListener:77] Copying portlets for /home/chris/git/liferay/bundles/liferay6.1/deploy/simplePortletTest-1.0-SNAPSHOT.war
317:45:44,345 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:763] Deploying simplePortletTest-1.0-SNAPSHOT.war
417:45:44,666 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:2083] Modifying Servlet 2.4 /home/chris/git/liferay/bundles/liferay6.1/tomcat-7.0.27/temp/20121118174544375/WEB-INF/web.xml
517:45:44,713 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][PortletAutoDeployListener:87] Portlets for /home/chris/git/liferay/bundles/liferay6.1/deploy/simplePortletTest-1.0-SNAPSHOT.war copied successfully. Deployment will start in a few seconds.
617:45:54,576 INFO [pool-2-thread-2][HotDeployImpl:178] Deploying simplePortletTest-1.0-SNAPSHOT from queue
717:45:54,576 INFO [pool-2-thread-2][PluginPackageUtil:1033] Reading plugin package for simplePortletTest-1.0-SNAPSHOT
817:45:54,577 WARN [pool-2-thread-2][PluginPackageUtil:1131] Plugin package on context simplePortletTest-1.0-SNAPSHOT cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
917:53:57,444 INFO [pool-2-thread-3][PluginPackageUtil:1033] Reading plugin package for simplePortletTest-1.0-SNAPSHOT
1017:53:57,445 WARN [pool-2-thread-3][PluginPackageUtil:1131] Plugin package on context simplePortletTest-1.0-SNAPSHOT cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
It looks like other articles online that use maven to create portlets don't have the liferay-plugin-package.xml, I DO have the liferay-plugin-package.properties file. Will this be generated when I write actual portlet code (instead of just deploying the auto-generated code)? Or something that's missing from the liferay-portlet-archetype? Is there some example code someone can post of a valid liferay-plugin-package.xml?
117:45:44,340 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:177] Processing simplePortletTest-1.0-SNAPSHOT.war
217:45:44,343 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][PortletAutoDeployListener:77] Copying portlets for /home/chris/git/liferay/bundles/liferay6.1/deploy/simplePortletTest-1.0-SNAPSHOT.war
317:45:44,345 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:763] Deploying simplePortletTest-1.0-SNAPSHOT.war
417:45:44,666 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:2083] Modifying Servlet 2.4 /home/chris/git/liferay/bundles/liferay6.1/tomcat-7.0.27/temp/20121118174544375/WEB-INF/web.xml
517:45:44,713 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][PortletAutoDeployListener:87] Portlets for /home/chris/git/liferay/bundles/liferay6.1/deploy/simplePortletTest-1.0-SNAPSHOT.war copied successfully. Deployment will start in a few seconds.
617:45:54,576 INFO [pool-2-thread-2][HotDeployImpl:178] Deploying simplePortletTest-1.0-SNAPSHOT from queue
717:45:54,576 INFO [pool-2-thread-2][PluginPackageUtil:1033] Reading plugin package for simplePortletTest-1.0-SNAPSHOT
817:45:54,577 WARN [pool-2-thread-2][PluginPackageUtil:1131] Plugin package on context simplePortletTest-1.0-SNAPSHOT cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
917:53:57,444 INFO [pool-2-thread-3][PluginPackageUtil:1033] Reading plugin package for simplePortletTest-1.0-SNAPSHOT
1017:53:57,445 WARN [pool-2-thread-3][PluginPackageUtil:1131] Plugin package on context simplePortletTest-1.0-SNAPSHOT cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
It looks like other articles online that use maven to create portlets don't have the liferay-plugin-package.xml, I DO have the liferay-plugin-package.properties file. Will this be generated when I write actual portlet code (instead of just deploying the auto-generated code)? Or something that's missing from the liferay-portlet-archetype? Is there some example code someone can post of a valid liferay-plugin-package.xml?
David H Nebinger, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
Check to ensure you're using the latest maven artifacts (as I understand it there are bugs resolved in the later versions).
Daniel Valverde, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
New Member Beiträge: 13 Beitrittsdatum: 08.07.13 Neueste Beiträge
We are using the lastest liferay maven archetype liferay-portal-maven-6.1.20-ee-ga2
Thank you
Thank you
David Ilechukwu, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Hi Daniel -
Sorry had been very busy for a while.
This should be easy to resolve.
Please post for us here the maven tasks which you ran (in the order you ran them).
Also please post the platform of everything you are using (Liferay version and maven version).
We'll take it from there.
Sorry had been very busy for a while.
This should be easy to resolve.
Please post for us here the maven tasks which you ran (in the order you ran them).
Also please post the platform of everything you are using (Liferay version and maven version).
We'll take it from there.
Sampsa Sohlman, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Regular Member Beiträge: 230 Beitrittsdatum: 27.09.07 Neueste Beiträge
If you generate service without fields it does not generate DB table.
Example:
This applies both remote and local services.
Example:
<entity name="Helper" local-service="false" remote-service="true" />
This applies both remote and local services.
David H Nebinger, geändert vor 10 Jahren.
RE: Create a service and publish on tunnel WEB
Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste BeiträgeDaniel Valverde:
I need to develop a service, I know that I can develop a service with service builder, but the service builder you need to define a entity and the service generate this table on the data base and I don need it, I only need a Service where I can publish same functionalities.
To serve up your own data in the remote web service, you could pursue the fake entity approach.
The idea here is to define an entity which is not backed by the database. The fake entities actually are extremely useful both for local and remote usage and take SB one step closer to being a regular service builder instead of just a database service builder...