Fóruns

Início » Liferay Portal » English » Liferay Legacy

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 27 de Fevereiro de 2007 08:55
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 12 de Fevereiro de 2007 09:56
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Ivano Carrara 15 de Fevereiro de 2007 15:10
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 18 de Fevereiro de 2007 08:50
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Ivano Carrara 21 de Fevereiro de 2007 09:52
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 21 de Fevereiro de 2007 10:54
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Ivano Carrara 21 de Fevereiro de 2007 11:40
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 21 de Fevereiro de 2007 16:23
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Felipe Grajales 22 de Fevereiro de 2007 06:14
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Igor Kravinski 1 de Agosto de 2007 02:16
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) R - Manzano 21 de Fevereiro de 2007 02:41
How to configure Public and Private Virtual Host in Liferay 4.3 Mani Kandan 24 de Agosto de 2007 08:19
RE: How to configure Public and Private Virtual Host in Liferay 4.3 Joel Kozikowski 24 de Agosto de 2007 10:35
RE: How to configure Public and Private Virtual Host in Liferay 4.3 Stella Sjel 27 de Agosto de 2007 23:33
RE: How to configure Public and Private Virtual Host in Liferay 4.3 Stella Sjel 28 de Agosto de 2007 00:47
RE: How to configure Public and Private Virtual Host in Liferay 4.3 Jonas Yuan 17 de Junho de 2009 12:30
RE: How to configure Public and Private Virtual Host in Liferay 4.3 Ken Barron 21 de Dezembro de 2011 00:28
RE: How to configure Public and Private Virtual Host in Liferay 4.3 Stella Sjel 16 de Setembro de 2007 20:50
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 27 de Fevereiro de 2007 08:56
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Michael Young 22 de Fevereiro de 2007 22:31
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Max Max Max 23 de Fevereiro de 2007 13:23
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Jean-Charles FELICITE 26 de Fevereiro de 2007 06:22
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 3 de Abril de 2007 07:08
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) David Brown 6 de Maio de 2007 21:42
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 23 de Fevereiro de 2007 07:17
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 1 de Março de 2007 12:31
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.) Joel Kozikowski 18 de Março de 2007 13:15
Joel Kozikowski
Remote calls to Services from external apps (via Soap, Tunneling, etc.)
27 de Fevereiro de 2007 08:55
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

For integration with a legacy app, I have a need to call some of my custom services (built in the extension environment) from an external Java application (running on a remote machine).

I'm trying to get a handle on the best way to do this, what code is ALREADY built into Liferay and the ServiceBuilder system, what needs to be done manually, etc. I'm willing to write some docs and put it in the Wiki if someone from the Liferay team (or some better informed community members) can point me in the right direction...

First, I don't want to use EJB - I'm deploying my portal in a Tomcat environment. SOAP is an option, as is the custom Tunneling. Hessian or Burlap would be fine also. I'm most familiar with Spring Remoting (in particular, their Http remoting system), but I don't think Liferay supports it (at the moment). While I certainly can get it working with Spring, I'm looking for the "easy" solution which I think already exists.

I'm using the extension environment, and have created a custom entity (let's say its MyEntity). The code I want to call is in MyEntityServiceImpl.java

I'm trying to get a handle on exactly what some of the pre-generated code does: in particular, MyEntityServiceHttp.java and MyEntityServiceSoap.java

I've been studying the code, and here is what I know (and don't know). Can anyone help confirm or deny these assumptions:

1) MyEntityServiceHttp.java is a stub that the CLIENT APP can call to use the Tunneling Servlet to call into MyEntityServiceImpl server side. I have written a small test app (using what little info I found in the Wiki regarding remoting). This seems to work, but has a somewhat surprising set of dependencies for my client app. In order for stand-alone client app to call my service, I need the following .jar files available in my classpath:

 1
 2/ext/ext-ejb/ext-ejb.jar
 3/ext/ext-service/ext-service.jar
 4
 5/portal/portal-ejb/portal-ejb.jar
 6/portal/portal-kernel/portal-kernel.jar
 7/portal/util-java/util-java.jar
 8/portal/lib/portal/concurrent.jar
 9/portal/lib/portal/commons-logging.jar
10/portal/lib/portal/log4j.jar"
11/portal/lib/portal/dom4j.jar
12/portal/lib/development/servlet.jar
13/portal/lib/portal/easyconf.jar
14/portal/lib/portal/commons-lang.jar
15/portal/lib/portal/commons-digester.jar
16/portal/lib/portal/commons-configuration.jar
17/portal/lib/portal/xstream.jar
18/portal/lib/portal/commons-collections.jar
19/portal/lib/portal/commons-beanutils.jar
20/portal/lib/portal/jcr.jar
21/portal/lib/portal/velocity.jar
22/portal/portal-service/portal-service.jar


WOW! That's a lot of library code just to make a remote call. It appears to include most of the code required to run the portal in the first place! I was particularly suspicious of the need to include Velocity (what does Velocity have to do w/ tunneling). I think it is perhaps because there are so many dependencies in the initialization phases of most of the utility methods, it includes about everything. It was this huge list that leads me to believe that perhaps Tunneling is not intended for use by a stand alone J2SE Java app, and is instead perhaps best for portal to portal calls.

So, now I'm thinking perhaps "SOAP" is the answer:

2) From my (somewhat limited) study of the code, it appears that MyEntityServiceSoap.java is some code that resides SERVER SIDE that accepts the incomming call from a SOAP call and dispatches to MyEntityServiceImpl. Is there any generated client side code I can use?

I've found the portal-client.jar in the source tree. It apperas to contain all the CLIENT SIDE code for connecting to the SERVER SIDE xxServiceSoap.java facades. Is this code generated? How is it generated? Simply by running the build-client target in the /portal/portal-client/build.xml Ant file? Is there similar such automatic generation (Ant files or otherwise) for the Extension Environment? Do I instead need to generate my own WSDL? Is there some URL I can call on my running Liferay instance that will generate the WSDL?

Finally - I've heard Hesian and Burlap mentioned in the docs, but have found NOTHING about actually using them in the docs, the forums, the Wiki, etc.

Any tips would be appreciated! I'll take the knowledge gathered here and put it in the Wiki.
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
12 de Fevereiro de 2007 09:56
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Still trying to figure this out. While I'm still hopeful to receive some help here, I've found a few more clues.

It appears the "entry point" for all of remoting is the "tunnel-web" web application. By looking in my Tomcat's "webapps" directory, I see the "tunne-web" application. The tunnel-web/WEB-INF is providing a ton of information. I see now by looking at the tunneling server's web.xml all of the servlets involved in the remoting. I also see the file remoting-servlet.xml, which contains Spring definitions for Burlap, Hessian, and even Spring's Http Invoker.

I should be able to piece together how it all fits together with this info, but I still would appreciate someone else's knowledge on the subject to short-circuit the process emoticon

I've discovered the "build-wsdd" target in the of the ext-ejb/build.xml Ant file, but when I run it, I get errors (my services reference some of the objects from the Liferay core). Its complaining about:

1
2 java.io.IOException: Type {http://model.portal.liferay.com}User is referenced but not defined.


If I can unravel the references issue, I may be able to make a little more progress.
Ivano Carrara
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
15 de Fevereiro de 2007 15:10
Resposta

Ivano Carrara

Ranking: Regular Member

Mensagens: 228

Data de entrada: 2 de Julho de 2005

Mensagens recentes

Hi!

I'm using Liferay Portal 4.2.1 on Tomcat.

I need to manage files in the Document Library - these files are generated from external applications... These processes generates Pdf, Xml and other kind of files.

Cause the only method to put and get files in the Liferay's Document Library is by hands because there isn't WebDav and/or Ftp interface, I'm trying to put and get files into the Liferay's Document Library via Web Services without human actions.

Pointing my Web browser to the Liferay server at http://www.<myliferayserver>.com/tunnel-web/axis I can see the Axis's output "And now... Some Services" ... inside the page I can see the section about the Document Library's service:
-------------------------------------------------------
Portlet_Document_Library_DLFileEntryService (wsdl)
addFileEntry
addFileEntry
deleteFileEntry
deleteFileEntry
getFileEntry
lockFileEntry
unlockFileEntry
updateFileEntry
----------------------------------------------------------
Then, clicking on the (wsdl) link I save the wsdl file on my Pc.

BUT when I try to open the .wsdl file with a Xml validator to try to generate the Web Service client code I get the error:

"extensibility element '<wsdlsoap:operation>' (operation 'addFileEntry', binding 'Portlet_Document_Library_DLFileEntryServiceSoapBinding') has empty or missing 'soapAction' attribute! (required if binding transport is 'http://schemas.xmlsoap.org/soap/http')"

It's helps to this post ?

I hope we can cooperate to access the Liferay services via Web Services!

Ivano C.
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
18 de Fevereiro de 2007 08:50
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

If all you are looking for is to make a SOAP call to pre-existing Liferay services (i.e. the services defined in the core Liferay system), then I think all you need to do is write a stand alone program that uses the portal-client.jar file referenced in my first post. That jar file contains all the client stubs to call the core Liferay services.

My problem is/was making SOAP client stubs for MY custom services (built in the extension environment). I've since turned my attention to using other remoting methods. I've got code working using the Tunnel Sevlet (which simply class MyEntityServiceHttp to make the remote call). The only issue with that solution is that it requires just about every library under the sun - including core Liferay SERVER side code, Velocity, etc.

I'm trying to get something a little more "lightweight". I think my approach will be to use Spring Remoting - Http Invoker specifically, to call the Spring exposed versions of the Liferay code. It looks like all of the server side code and definitions are in place. I'll simply need to hand code the client side Spring definitions (which is fairly simple: Google for information re: Spring's HttpInvokerProxyFactoryBean).
R - Manzano
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
21 de Fevereiro de 2007 02:41
Resposta

R - Manzano

Ranking: Junior Member

Mensagens: 25

Data de entrada: 26 de Setembro de 2006

Mensagens recentes

Hi!
I'm trying to do the same thing as you with the document library.Looking the posts of everyone i don't find any usefull information.I think i'm not the only one with the same proplems so I focus on you to solve them.I think you have the answers so we will be so happy if you solve them.

1.-if you want to view the wsdl from another pc it seems to be enougt if you modify the portal-ext.properties adding the tunnel.servlet.hosts.allowed and the tunnel.servlet.https.required
it's enough with only this

2.-when we try to access to the services with the stubs(they are on the developer seccion in the liferay web page) when we run it some of us get a
1
216:26:40,347 ERROR [UserServiceSoap:60] java.lang.NullPointerException
3java.lang.NullPointerException
4at com.liferay.portal.service.permission.UserPermission.contains(UserPermission.java:67)
5at com.liferay.portal.service.permission.UserPermission.check(UserPermission.java:46)
6at com.liferay.portal.service.impl.UserServiceImpl.checkPermission(UserServiceImpl.java:331)

it seems to be a permision problem, ¿how does we authenticate to the webservices?

¿its posible a code snipet?


thank you very very very very much
Ivano Carrara
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
21 de Fevereiro de 2007 09:52
Resposta

Ivano Carrara

Ranking: Regular Member

Mensagens: 228

Data de entrada: 2 de Julho de 2005

Mensagens recentes

Dear Joel, I just wrote a new post about using Web Services here:
http://www.liferay.com/web/guest/community/forums/message_boards/message/103996

I read in the past your posts and other about Virtual Host and I know you are an experienced Liferay developer.

For my needs, I wish to speack with you directly. It's possible?

Please, could you write me your private email address?

My email is icarrara@studio5.it

Sincerely,
Ivano C.
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
21 de Fevereiro de 2007 10:54
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Ivano -

Not that I don't like to give people my email address, but I think a private, off-line discussion would not be in the spirit of community. What little time I have to help others, I prefer to do it here in the forums (so the msg will be archived, and searchable by others).

That being said...

1) I'm not a member of the Liferay dev team. I'm just a community member who works with the software at my job. What little I know about the software, I've learned by studying the code over the last 8 months.

2) I've got very little SOAP experience (Liferay, or otherwise). All the remoting I've done in the past has been Spring Http Invoker based, which is why I am going to pursue that avenue in the future. For NOW, I've got the tunneling interface working (see my initial post), so since I've got SOMETHING working, I'm moving on to other more pressing matters.

3) Liferay does have professoinal consulting services available. If you REALLY need help, and your company needs it fast, I suggest you contact sales@liferay.com

Sorry - I feel your pain. Unfortunately, most of my time is spent enduring similar pain in other areas of the software emoticon.
Ivano Carrara
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
21 de Fevereiro de 2007 11:40
Resposta

Ivano Carrara

Ranking: Regular Member

Mensagens: 228

Data de entrada: 2 de Julho de 2005

Mensagens recentes

Dear Joel, thank you for your fast and gentle reply.

My intention was to ask you if you can do some work for me relating to the use of Liferay client.

So, if you can speak about the above I'll appreciate it.

Sincerely,
Ivano C.
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
21 de Fevereiro de 2007 16:23
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Ivano Carrara:
My intention was to ask you if you can do some work for me relating to the use of Liferay client.


Unfortunately, I'm not available to do work for others - I've got enough work of my own to last me until about 2012!

I'd contact Liferay, Inc. That is what they are there for (its their business afterall), and they know a LOT more about the code than I do.
Felipe Grajales
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
22 de Fevereiro de 2007 06:14
Resposta

Felipe Grajales

Ranking: Junior Member

Mensagens: 40

Data de entrada: 17 de Outubro de 2005

Mensagens recentes

Hi Joel,

time to time people contact us to develop portlets and portal content.
Right now we are looking for people with expertise in liferay
are you interested? If so please answer these questions.


1. Where are you from?
2. How much time have you been developing with liferay ?
3. What is your email address ?
4. Have you developed hot deployable velocity themes ?
5. Besides Java what other language do you know?
6. Can you give us email addresses of other persons that might be interested ?



Thank you

Felipe
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
27 de Fevereiro de 2007 08:56
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

There seem to be a couple of threads percolating re: remote access to services. I just wanted to cross reference them in case someone stumbles across one or the other:

http://www.liferay.com/web/guest/community/forums/message_boards/message/103368
Michael Young
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
22 de Fevereiro de 2007 22:31
Resposta

Michael Young

LIFERAY STAFF

Ranking: Liferay Master

Mensagens: 842

Data de entrada: 4 de Agosto de 2004

Mensagens recentes

Joel,

I would check out the sample-portal-client-portlet.war from our downloads. It contains an example of how to invoke our Web Services using SOAP.
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
23 de Fevereiro de 2007 07:17
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Joel Kozikowski:
I'm trying to get something a little more "lightweight". I think my approach will be to use Spring Remoting - Http Invoker specifically, to call the Spring exposed versions of the Liferay code. It looks like all of the server side code and definitions are in place. I'll simply need to hand code the client side Spring definitions (which is fairly simple: Google for information re: Spring's HttpInvokerProxyFactoryBean).

SUCCESS!

I'm about to leave town on a biz trip, but I'm finally making service calls into my custom Portal services using Spring Remoting. I'll write up a detailed WIKI entry later, but for those who need the info NOW, here are the key points:

1) The Spring definitions for your custom services are created in the file remoting-servlet-ext.xml. This file is automatically generated by ServiceBuilder, and is placed in the /ext/ext-web/docroot/WEB-INF directory. This file, when deployed (in Tomcat at least) is INCORRECTLY placed in webapps/ROOT/WEB-INF. It SHOULD be placed in webapps/tunnel-web/WEB-INF

2) Client side, create a bean definition using Spring's HttpInvokerProxyFactoryBean for your service interface. The URL you want to use is:

http://www.myportal.com/tunnel-web/secure/spring/com_mycompany_MyCustomService-http

The exact part that follows the "secure/spring" part is the same bean def found in your remoting-servlet-ext.xml file.

3) You need to use a custom HttpInvokerRequestExecutor for your Spring invoker - one that is capable of doing HTTP BASIC authentication. You can search the web (and/or Spring forums) on how to do Spring remoting using authentication, or you can wait for my Wiki entry (where I'll post some code from an authenticating invoker I had written last year).

4) The password you pass in needs to be the Liferay Encrypted password, and not the plain text password. You can find that password by searching the User table in your lportal database.

That's all for now. Details will follow.
Max Max Max
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
23 de Fevereiro de 2007 13:23
Resposta

Max Max Max

Ranking: New Member

Mensagens: 7

Data de entrada: 2 de Fevereiro de 2007

Mensagens recentes

Hi Michael,

I took a peek at the sample-portal-client-portlet.war (for 4.2.1) and it contains only one java source file which appears to be just a few lines of skeleton portlet code and has no SOAP code in whatsoever.

Please can you check it.

 1public class PortalClientPortlet extends GenericPortlet {
 2
 3    public void doDispatch(RenderRequest req, RenderResponse res)
 4        throws IOException, PortletException {
 5
 6        include("/view.jsp", req, res);
 7    }
 8
 9    protected void include(String path, RenderRequest req, RenderResponse res)
10        throws IOException, PortletException {
11
12        PortletRequestDispatcher prd =
13            getPortletContext().getRequestDispatcher(path);
14
15        if (prd == null) {
16            _log.error(path + " is not a valid include");
17        }
18        else {
19            prd.include(req, res);
20        }
21    }
22
23    private static Log _log = LogFactory.getLog(PortalClientPortlet.class);
24
25}


Thanks,
Max
Jean-Charles FELICITE
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
26 de Fevereiro de 2007 06:22
Resposta

Jean-Charles FELICITE

Ranking: New Member

Mensagens: 5

Data de entrada: 21 de Fevereiro de 2007

Mensagens recentes

Hi Max Max Max,

The soap code is placed in the view.jsp page.

Here it is :
 1
 2<%@ page import="com.liferay.client.portal.model.OrganizationSoap" %>
 3<%@ page import="com.liferay.client.portal.service.http.OrganizationServiceSoap" %>
 4<%@ page import="com.liferay.client.portal.service.http.OrganizationServiceSoapServiceLocator" %>
 5
 6<%@ page import="java.net.URL" %>
 7
 8You belong to the following organizations:
 9
10<br><br>
11
12<%
13OrganizationServiceSoapServiceLocator locator = new OrganizationServiceSoapServiceLocator();
14
15OrganizationServiceSoap soap = locator.getPortal_OrganizationService(_getURL("Portal_OrganizationService"));
16
17OrganizationSoap[] organizations = soap.getUserOrganizations(request.getRemoteUser());
18
19for (int i = 0; i < organizations.length; i++) {
20    OrganizationSoap organization = organizations[i];
21%>
22
23    <%= organization.getName() %><br>
24
25<%
26}
27%>
28
29<%!
30private URL _getURL(String serviceName) throws Exception {
31
32    // Unathenticated url
33
34    String url = "http://localhost:8080/tunnel-web/axis/" + serviceName;
35
36    // Authenticated url
37
38    if (true) {
39        String userId = "liferay.com.1";
40        String password = "qUqP5cyxm6YcTAhz05Hph5gvu9M=";
41
42        url = "http://" + userId + ":" + password + "@localhost:8080/tunnel-web/secure/axis/" + serviceName;
43    }
44
45    return new URL(url);
46}
47%>


JC
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
1 de Março de 2007 12:31
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Leaving a few more breadcrumbs (as I've finally deployed my final code to my main server, and my client to a differnt remote machine):

The /ext/ext-ejb/classes/portal-ext.properties file needs to "allow" the IP address of the remote client so the calls will get through the security filter. For Spring Remoting, the two settings of interest are:

1
2spring.remoting.servlet.hosts.allowed
3spring.remoting.servlet.https.required


There are similar "hosts.allowed" and "https.required" entries for SOAP, Tunneling, Burlap, etc. See the /portal/portal-ejb/classes/portal.properties file for more details.

Finally, if you get some type of error re: there being no Hibernate session, note that it appears that the wiring of the service objects puts the transaction manager in the "LocalServiceImpl" code, and not the "ServiceImpl" code. What this means is that the transaction is not opened up (and thus no Hibernate Session is created) until you call the Local service.

The design pattern, then, appears to be:

1) Create your remote interface (to be called by your remote client), in your MyEntityServiceImpl before running ServiceBuilder. That will expose the interface to the outside world.

2) Have your implementation of MyEntityServiceImpl simply call a similar method you should create in your MyEntittyLocalServiceImpl. Call that method using MyEntityLocalServiceUtil.

I had some code in the implementation of MyEntityServiceImpl that directly accessed the persisetnce layer (i.e. MyEntityUtil), and that caused some issues once I really made the Spring Remote call (no transaction was active, and thus no Hibernate session). By moving that code to the "LocalService", it solved everything. I traced somewhat through the Spring configuration files and noticed the transaction managers were set up there, so I guess that is how it has to be.

Normally, the transaction is opened when invocation arrives at the remote service layer. In the past, I've used the "OpenSessionInView" Spring servlet filter to handle that. I tried that briefly, but got an error re: the Liferay WebAppContext not being a Spring WebAppContext (which is not true, so I think it was a class loader issue). In any event, I don't have time to mess with it, and it now works with the code in the "LocalService" layer, so I'll leave it at that!
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
18 de Março de 2007 13:15
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Joel Kozikowski:
Finally, if you get some type of error re: there being no Hibernate session, note that it appears that the wiring of the service objects puts the transaction manager in the "LocalServiceImpl" code, and not the "ServiceImpl" code.


A little more digging, and I now believe this behavior is a bug. See LEP-2408 for details.
Joel Kozikowski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
3 de Abril de 2007 07:08
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Another cross-reference to another thread re: Spring Remoting. I think we've finally got to the bottom of all the issues (this thread deals with permissions problems):

http://www.liferay.com/web/guest/community/forums/message_boards/message/106916
David Brown
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
6 de Maio de 2007 21:42
Resposta

David Brown

Ranking: New Member

Mensagens: 24

Data de entrada: 27 de Julho de 2005

Mensagens recentes

Hey Joel,

If you want to get your own SOAP calls working you can make a quick mod to the ant build scripts:

1) In ext-ejb/build-parent.xml add the following lines to extract the server-config.wsdd from tunnel-web.war just before you do the build-wsdd:

1<unwar src="../ext-ear/modules/tunnel-web.war" dest="tmp-tunnel-web" />
2<copy file="tmp-tunnel-web/WEB-INF/server-config.wsdd" todir="../ext-web/docroot/WEB-INF" overwrite="true"/>
3<delete dir="tmp-tunnel-web" />

Your service definitions will then be added to the existing Liferay definitions when you invoke build-wsdd.

2) In ext-ear/build-parent.xml add the following line to copy the updated server-comfig.wsdd to the deploy directory just after the deploy-war for tunnel-web:

1<copy file="../ext-web/docroot/WEB-INF/server-config.wsdd" todir="${app.server.deploy.dir}/tunnel-web/WEB-INF" overwrite="true"/>

That way tunnel-web deploys the Liferay version and you over-write it with your updated version.

I've created a service.xml for each of my portlets that require custom db access and some that have no db access - just soap/http calls.

...Dave
Igor Kravinski
RE: Remote calls to Services from external apps (via Soap, Tunneling, etc.)
1 de Agosto de 2007 02:16
Resposta

Igor Kravinski

Ranking: New Member

Mensagens: 10

Data de entrada: 25 de Julho de 2007

Mensagens recentes

Joel Kozikowski:
If all you are looking for is to make a SOAP call to pre-existing Liferay services (i.e. the services defined in the core Liferay system), then I think all you need to do is write a stand alone program that uses the portal-client.jar file referenced in my first post. That jar file contains all the client stubs to call the core Liferay services.


I have a question regarding this
http://www.liferay.com/web/guest/community/forums/message_boards/message/123881

hope someone can help.
Thanks
Anônimo
How to configure Public and Private Virtual Host in Liferay 4.3
24 de Agosto de 2007 08:19
Resposta

Anônimo

Hi ,

I have installed Liferay 4.3 and i need to create the Virtual Host for the Public and Private Host, how to do this.

I have created a friendly url as /mani, and it working fine if i give the link as

http://manikandan:8089/web/mani,


but i need to change the server name given part (http://manikandan:8089/web) to be mapped to some other URL like www.mani.com/mani

is this possible in liferay, if it is possible please guide me how to do the Public and Private Virtual Hosting in Liferay 4.3

Thanks,

Manikandan.K
Joel Kozikowski
RE: How to configure Public and Private Virtual Host in Liferay 4.3
24 de Agosto de 2007 10:35
Resposta

Joel Kozikowski

Ranking: Expert

Mensagens: 405

Data de entrada: 27 de Junho de 2006

Mensagens recentes

Mani Kandan:
I have installed Liferay 4.3 and i need to create the Virtual Host for the Public and Private Host, how to do this.


I think you posted to the wrong thread - this one is about making remote calls.

In any event - for you question, see this page in the wiki.
Stella Sjel
RE: How to configure Public and Private Virtual Host in Liferay 4.3
27 de Agosto de 2007 23:33
Resposta

Stella Sjel

Ranking: New Member

Mensagens: 8

Data de entrada: 5 de Julho de 2007

Mensagens recentes

hello all,

question,
why when i create user via soap, it does not create new row in the Layout table for the newly created user?

many thanks,
stel
Stella Sjel
RE: How to configure Public and Private Virtual Host in Liferay 4.3
28 de Agosto de 2007 00:47
Resposta

Stella Sjel

Ranking: New Member

Mensagens: 8

Data de entrada: 5 de Julho de 2007

Mensagens recentes

hi all,

solved it by calling Portal_LayoutService (wsdl) addLayout.

but now i get an error. blog entry was successfully added but an error appears


  1
  2
  307:23:40,954 ERROR [service.http.BlogsEntryServiceSoap] java.lang.NullPointerException
  4java.lang.NullPointerException
  5        at com.liferay.portlet.tags.service.impl.TagsAssetLocalServiceImpl.updateAsset(TagsAssetLocalServiceImpl.java:153)
  6        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  7        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  8        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  9        at java.lang.reflect.Method.invoke(Method.java:585)
 10        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
 11        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
 12        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
 13        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
 14        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
 15        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 16        at $Proxy96.updateAsset(Unknown Source)
 17        at com.liferay.portlet.tags.service.TagsAssetLocalServiceUtil.updateAsset(TagsAssetLocalServiceUtil.java:132)
 18        at com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl.addEntry(BlogsEntryLocalServiceImpl.java:162)
 19        at com.liferay.portlet.blogs.service.impl.BlogsEntryLocalServiceImpl.addEntry(BlogsEntryLocalServiceImpl.java:101)
 20        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 21        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 23        at java.lang.reflect.Method.invoke(Method.java:585)
 24        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
 25        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
 26        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
 27        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
 28        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
 29        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 30        at $Proxy91.addEntry(Unknown Source)
 31        at com.liferay.portlet.blogs.service.BlogsEntryLocalServiceUtil.addEntry(BlogsEntryLocalServiceUtil.java:95)
 32        at com.liferay.portlet.blogs.service.impl.BlogsEntryServiceImpl.addEntry(BlogsEntryServiceImpl.java:100)
 33        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 34        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 35        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 36        at java.lang.reflect.Method.invoke(Method.java:585)
 37        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
 38        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
 39        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
 40        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
 41        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
 42        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 43        at $Proxy47.addEntry(Unknown Source)
 44        at com.liferay.portlet.blogs.service.BlogsEntryServiceUtil.addEntry(BlogsEntryServiceUtil.java:79)
 45        at com.liferay.portlet.blogs.service.http.BlogsEntryServiceSoap.addEntry(BlogsEntryServiceSoap.java:110)
 46        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 47        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 48        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 49        at java.lang.reflect.Method.invoke(Method.java:585)
 50        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
 51        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
 52        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
 53        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
 54        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
 55        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
 56        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
 57        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
 58        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
 59        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 60        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
 61        at com.liferay.portal.servlet.AxisServlet.service(AxisServlet.java:74)
 62        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 63        at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.service(PortalClassLoaderServlet.java:88)
 64        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 65        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 66        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 67        at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:144)
 68        at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:80)
 69        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 70        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 71        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
 72        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 73        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
 74        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 75        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 76        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 77        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 78        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
 79        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
 80        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
 81        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
 82        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 83        at java.lang.Thread.run(Thread.java:595)
 84AxisFault
 85 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 86 faultSubcode:
 87 faultString: java.rmi.RemoteException
 88 faultActor:
 89 faultNode:
 90 faultDetail:
 91        {http://xml.apache.org/axis/}hostname:my.liferay.com
 92
 93java.rmi.RemoteException
 94        at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
 95        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
 96        at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
 97        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
 98        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
 99        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
100        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
101        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
102        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
103        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
104        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
105        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
106        at javax.xml.parsers.SAXParser.parse(Unknown Source)
107        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
108        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
109        at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
110        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
111        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
112        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
113        at org.apache.axis.client.Call.invoke(Call.java:2767)
114        at org.apache.axis.client.Call.invoke(Call.java:2443)
115        at org.apache.axis.client.Call.invoke(Call.java:2366)
116        at org.apache.axis.client.Call.invoke(Call.java:1812)
117        at com.liferay.client.portlet.blogs.service.http.Portlet_Blogs_BlogsEntryServiceSoapBindingStub.addEntry(Portlet_Blogs_BlogsEntryServiceSoapBindingStub.java:332)
118        at org.test.ProcessEntry.processRequest(ProcessEntry.java:102)
119        at org.test.ProcessEntry.doPost(ProcessEntry.java:190)
120        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
121        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
122        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
123        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
124        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
125        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
126        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
127        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
128        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
129        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
130        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
131        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
132        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
133        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
134        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
135        at java.lang.Thread.run(Thread.java:595)



and also when I create a new user I'm getting this

 1
 2
 307:22:57,805 ERROR [kernel.util.MethodInvoker] Cannot invoke com.liferay.mail.util.DummyHook addUser on position 3 because it is null
 407:22:57,806 ERROR [service.jms.MailConsumer] java.lang.NullPointerException
 5java.lang.NullPointerException
 6        at com.liferay.portal.kernel.util.MethodInvoker.invoke(MethodInvoker.java:72)
 7        at com.liferay.portal.kernel.util.MethodInvoker.invoke(MethodInvoker.java:47)
 8        at com.liferay.mail.service.jms.MailConsumer._onMessage(MailConsumer.java:117)
 9        at com.liferay.mail.service.jms.MailConsumer.onMessage(MailConsumer.java:85)
10        at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
11        at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
12        at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
13        at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
14        at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
15        at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
16        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
17        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
18        at java.lang.Thread.run(Thread.java:595)



thanks in advance,
stel
Stella Sjel
RE: How to configure Public and Private Virtual Host in Liferay 4.3
16 de Setembro de 2007 20:50
Resposta

Stella Sjel

Ranking: New Member

Mensagens: 8

Data de entrada: 5 de Julho de 2007

Mensagens recentes

Hi all..

Question,

is it possible to upload an image in photo gallery using soap?
i hope somebody can help.. thank you! emoticon
Jonas Yuan
RE: How to configure Public and Private Virtual Host in Liferay 4.3
17 de Junho de 2009 12:30
Resposta

Jonas Yuan

Ranking: Liferay Master

Mensagens: 993

Data de entrada: 26 de Abril de 2007

Mensagens recentes

Hi Stella,

Do you get this issue fixed? Any updates on this?

Thanks

Jonas Yuan
-------------------------
Liferay Books

Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Ken Barron
RE: How to configure Public and Private Virtual Host in Liferay 4.3
21 de Dezembro de 2011 00:28
Resposta

Ken Barron

Ranking: New Member

Mensagens: 5

Data de entrada: 5 de Outubro de 2011

Mensagens recentes

See this very useful wiki post for a working example in Liferay 6 of calling a Liferay service using SOAP services and the tunnel-web: http://www.liferay.com/community/wiki/-/wiki/Main/Web+Service+samples