Foros de discusión

SOAP API Exception(PermissionChecker not initialized)

Noriyuki TAKEI, modificado hace 11 años.

SOAP API Exception(PermissionChecker not initialized)

New Member Mensajes: 6 Fecha de incorporación: 20/09/11 Mensajes recientes
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)


thumbnail
Paul ., modificado hace 11 años.

RE: SOAP API Exception(PermissionChecker not initialized)

Liferay Master Mensajes: 522 Fecha de incorporación: 29/08/11 Mensajes recientes
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:-

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


a similar thread http://www.liferay.com/community/forums/-/message_boards/message/13239690
Noriyuki TAKEI, modificado hace 11 años.

RE: SOAP API Exception(PermissionChecker not initialized)

New Member Mensajes: 6 Fecha de incorporación: 20/09/11 Mensajes recientes
Thanks Paul

I was able to solve this problem.

Thanks
A S, modificado hace 11 años.

RE: SOAP API Exception(PermissionChecker not initialized)

New Member Mensajes: 19 Fecha de incorporación: 30/04/12 Mensajes recientes
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, modificado hace 11 años.

RE: SOAP API Exception(PermissionChecker not initialized)

New Member Mensajes: 19 Fecha de incorporación: 30/04/12 Mensajes recientes
Seems I forgot to add "api/secure/axis" everywhere I needed to. Oops.
thumbnail
Navin D Singh, modificado hace 11 años.

RE: SOAP API Exception(PermissionChecker not initialized)

Junior Member Mensajes: 40 Fecha de incorporación: 15/07/08 Mensajes recientes
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)
thumbnail
Jacques Traore, modificado hace 10 años.

RE: SOAP API Exception(PermissionChecker not initialized)

Junior Member Mensajes: 49 Fecha de incorporación: 21/01/13 Mensajes recientes
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
serviceContext.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, modificado hace 10 años.

RE: SOAP API Exception(PermissionChecker not initialized)

New Member Mensajes: 2 Fecha de incorporación: 9/09/09 Mensajes recientes
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
serviceContext.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:


...
ServiceContext serviceContext = new ServiceContext();
serviceContext.setUserId(userId);

HashMap<string, object> attributes = new HashMap<string, object>();
attributes.put("fileEntryTypeId", fileEntryTypeId);
// settings attribute
for (Entry<string, object> entry : fields.entrySet()) {
	String fieldName = entry.getKey();
	Object fieldValue = entry.getValue();
	attributes.put(structureId + fieldName, fieldValue);
}
serviceContext.setAttributes(attributes);

// ACTION_PUBLISH 1
serviceContext.setWorkflowAction(1);

try {

	FileEntrySoap fileEntrySoap = dlAppServiceSoap.addFileEntry(repositoryId, folderDestId, fileSourceName, fileMimeType, title, description, "", bytes, serviceContext);
	System.out.println("New file imported: " + fileEntrySoap.getFileEntryId());
	
}
catch (Exception e) {

	FileEntrySoap fileEntrySoap = dlAppServiceSoap.getFileEntry(repositoryId, folderDestId, fileSourceName);
	Long fileEntryId = fileEntrySoap.getFileEntryId();
	dlAppServiceSoap.updateFileEntry(fileEntryId, fileSourceName, fileMimeType, title, description, "", true, bytes, serviceContext);
	System.out.println("File updated: " + fileEntrySoap.getFileEntryId());

}
...
</string,></string,></string,>


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