Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Noriyuki TAKEI
SOAP API Exception(PermissionChecker not initialized)
April 11, 2012 2:37 AM
Answer

Noriyuki TAKEI

Rank: New Member

Posts: 6

Join Date: September 20, 2011

Recent Posts

Let me ask you a question about Liferay.

As a result of having revised LiferayCE to 6.1.0 from 6.0.6,
API of the SOAP sent forth the following exception and was not available.
Would you instruct a solution?


AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException: PermissionChecker not initialized
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:liferay.example.com

java.rmi.RemoteException: PermissionChecker not initialized
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 org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.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.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at com.liferay.util.axis.SimpleHTTPSender.invoke(SimpleHTTPSender.java:72)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
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.client.soap.portal.service.http.Portal_ResourcePermissionServiceSoapBindingStub.setIndividualResourcePermissions(Portal_ResourcePermissionServiceSoapBindingStub.java:298)


Bart Simpson
RE: SOAP API Exception(PermissionChecker not initialized)
April 11, 2012 4:06 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

In Liferay 6.1
For generating web-service use the url of the from http://localhost:8080/api/secure/axis/Portlet_Asset_AssetCategoryService
eg. if using AssetCategoryService set credentials like:-

1AssetCategoryServiceSoapServiceLocator locator = new AssetCategoryServiceSoapServiceLocator();
2AssetCategoryServiceSoap portlet_Asset_AssetCategoryService = locator.getPortlet_Asset_AssetCategoryService();
3((Portlet_Asset_AssetCategoryServiceSoapBindingStub) portlet_Asset_AssetCategoryService).setUsername("test@liferay.com");
4((Portlet_Asset_AssetCategoryServiceSoapBindingStub) portlet_Asset_AssetCategoryService).setPassword("test");


a similar thread http://www.liferay.com/community/forums/-/message_boards/message/13239690
Noriyuki TAKEI
RE: SOAP API Exception(PermissionChecker not initialized)
April 11, 2012 6:41 PM
Answer

Noriyuki TAKEI

Rank: New Member

Posts: 6

Join Date: September 20, 2011

Recent Posts

Thanks Paul

I was able to solve this problem.

Thanks
A S
RE: SOAP API Exception(PermissionChecker not initialized)
July 20, 2012 1:57 AM
Answer

A S

Rank: New Member

Posts: 19

Join Date: April 30, 2012

Recent Posts

I'm getting this issue with the Group Soap service. It doesn't seem to think it's missing a PermissionChecker with other code in the same class, I can get a Company and an object from Service Builder I created with no issues at all, group however doesn't seem to want to work.

Any suggestions?
A S
RE: SOAP API Exception(PermissionChecker not initialized)
July 20, 2012 3:45 AM
Answer

A S

Rank: New Member

Posts: 19

Join Date: April 30, 2012

Recent Posts

Seems I forgot to add "api/secure/axis" everywhere I needed to. Oops.
Navin D Singh
RE: SOAP API Exception(PermissionChecker not initialized)
November 18, 2012 4:15 PM
Answer

Navin D Singh

Rank: Junior Member

Posts: 40

Join Date: July 15, 2008

Recent Posts

LifeRay 6.0 SP2 EE with Tomcat 6.0
Can anyone help me to get around the issue I am facing while creating message board entry through web services.
No problem when deleting, getting the information but when I try to create an entry this is what I get:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:HQ-10642-E4310

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 org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.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.portlet.messageboards.service.http.Portlet_MB_MBMessageServiceSoapBindingStub.addMessage(Portlet_MB_MBMessageServiceSoapBindingStub.java:554)
at MessageBoardBroker.main(MessageBoardBroker.java:64)
Jacques Traore
RE: SOAP API Exception(PermissionChecker not initialized)
April 5, 2013 1:00 PM
Answer

Jacques Traore

Rank: Junior Member

Posts: 45

Join Date: January 21, 2013

Recent Posts

Hi Navin,
Did you solve your issue?
If yes, please share the solution. I am facing the same issue while updating journal article using web service.
I need to add an article with STATUS_APPROVED but after adding
1serviceContext.setWorkflowAction(WorkflowConstants.STATUS_APPROVED);
before calling addArticle method causes the error you had had.
If I remove the code above, the insert is correctly done but not published.

Thanks by advance
Riccardo Costa
RE: SOAP API Exception(PermissionChecker not initialized)
May 11, 2013 2:12 AM
Answer

Riccardo Costa

Rank: New Member

Posts: 1

Join Date: September 9, 2009

Recent Posts

Jacques Traore:
Hi Navin,
Did you solve your issue?
If yes, please share the solution. I am facing the same issue while updating journal article using web service.
I need to add an article with STATUS_APPROVED but after adding
1serviceContext.setWorkflowAction(WorkflowConstants.STATUS_APPROVED);
before calling addArticle method causes the error you had had.
If I remove the code above, the insert is correctly done but not published.

Thanks by advance



Hi Navin

I use the document library on Liferay Portal Community Edition 6.1.1 CE GA2 (Paton / Build 6101 / July 31, 2012) and I haven't problem to create and update document with Soap library also my document are pubblished.
I use the folloving code:

 1
 2...
 3ServiceContext serviceContext = new ServiceContext();
 4serviceContext.setUserId(userId);
 5
 6HashMap<String, Object> attributes = new HashMap<String, Object>();
 7attributes.put("fileEntryTypeId", fileEntryTypeId);
 8// settings attribute
 9for (Entry<String, Object> entry : fields.entrySet()) {
10    String fieldName = entry.getKey();
11    Object fieldValue = entry.getValue();
12    attributes.put(structureId + fieldName, fieldValue);
13}
14serviceContext.setAttributes(attributes);
15
16// ACTION_PUBLISH 1
17serviceContext.setWorkflowAction(1);
18
19try {
20
21    FileEntrySoap fileEntrySoap = dlAppServiceSoap.addFileEntry(repositoryId, folderDestId, fileSourceName, fileMimeType, title, description, "", bytes, serviceContext);
22    System.out.println("New file imported: " + fileEntrySoap.getFileEntryId());
23   
24}
25catch (Exception e) {
26
27    FileEntrySoap fileEntrySoap = dlAppServiceSoap.getFileEntry(repositoryId, folderDestId, fileSourceName);
28    Long fileEntryId = fileEntrySoap.getFileEntryId();
29    dlAppServiceSoap.updateFileEntry(fileEntryId, fileSourceName, fileMimeType, title, description, "", true, bytes, serviceContext);
30    System.out.println("File updated: " + fileEntrySoap.getFileEntryId());
31
32}
33...


I hope that my answer could be helpful.
Bye
Riccardo Costa