Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Ismail Bayraktar
Failed to call liferay web services UserService, UserGroupService, etc
23. Januar 2013 01:36
Antwort

Ismail Bayraktar

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 23. Januar 2013

Neue Beiträge

Hi All,
We fail to call the operations of Portal_User, Portal_UserGroup, Portal_Group, Portal_Organization web services in Liferay EE 5.2 SP3.


I have imported the WSDLs to a plain SOAP editor (SOAP UI). For Portal_Group services, I can directly fire a web service (getUserGroup) and get the response by pointing the following end point:
http://<host>:8080/tunnel-web/axis/Portal_GroupService

However, for most of the operations I am getting java.rmi.RemoteException as a SOAP Response and when I check the logs of Liferay then all I see is the following:

ERROR [UserGroupServiceSoap:104] com.liferay.portal.security.auth.PrincipalException
com.liferay.portal.security.auth.PrincipalException
at com.liferay.portal.service.permission.PortalPermissionImpl.check(PortalPermissionImpl.java:41)
at com.liferay.portal.service.permission.PortalPermissionUtil.check(PortalPermissionUtil.java:39)
at com.liferay.portal.service.impl.UserGroupServiceImpl.addUserGroup(UserGroupServiceImpl.java:56)

Then, what we did is to change the endpoint to the followings:
http://<userID>:<Pass>@<host>:8080/tunnel-web/secure/axis/Portal_UserService
http://<userID>:<Pass>@<host>:8080/tunnel-web/axis/Portal_UserService

Then, we expected the problem to be solved but still we got the same response and the same exception in the logs but this time seems we see PrincipalBean.getUserId(PrincipalBean.java:90) line instead of Permission check.

com.liferay.portal.security.auth.PrincipalException
at com.liferay.portal.service.base.PrincipalBean.getUserId(PrincipalBean.java:90)
at com.liferay.portal.service.base.PrincipalBean.getUser(PrincipalBean.java:83)
at com.liferay.portal.service.impl.UserGroupServiceImpl.addUserGroup(UserGroupServiceImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at


In addition, some of the services get, add operations sometimes work and sometimes not.

Could you please help us to figure out the problem? Are we missing to pass the context information or anything else?

Thanks,
Ismail.
Ismail Bayraktar
RE: Failed to call liferay web services UserService, UserGroupService, etc
23. Januar 2013 03:10
Antwort

Ismail Bayraktar

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 23. Januar 2013

Neue Beiträge

Any idea?
Ismail Bayraktar
RE: Failed to call liferay web services UserService, UserGroupService, etc
23. Januar 2013 05:13
Antwort

Ismail Bayraktar

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 23. Januar 2013

Neue Beiträge

Hi All,
We checked the liferay settings as explained in this blog post:
http://www.liferay.com/web/antonio.junior/blog/-/blogs/12168124

However, getUserById works but the rest of the operations and other services also throw a response containing Remote Exception and the logs show Principal Exception.

Any idea?
Ismail Bayraktar
RE: Failed to call liferay web services UserService, UserGroupService, etc
23. Januar 2013 05:47
Antwort

Ismail Bayraktar

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 23. Januar 2013

Neue Beiträge

Hi All,
To be more precise, I would like to create a user group with addUserGroup operation in the Portal_UserGroupService WSDL.

In SOAP UI tool, I was getting a remote exception response and the logs was indicating Principal exception.

I have just created a test Client in Eclipse and added the Portal_UserService and Portal_UserGroupService WSDL. Now, getUserById in Portal_UserService works. I am now trying to call addUserGroup operation in Portal_UserGroupService but I am still getting a Remote exception.

Please help!!

The exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname: <myhost>

java.rmi.RemoteException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.liferay.portal.service.http.Portal_UserGroupServiceSoapBindingStub.addUserGroup(Portal_UserGroupServiceSoapBindingStub.java:340)
at ClientService.addUserGroup(ClientService.java:55)
at ClientService.main(ClientService.java:34)