cancel
Showing results for 
Search instead for 
Did you mean: 

'security processing failed' exception

jbaton
Champ in-the-making
Champ in-the-making
Hi all ,

I cannot get my MDB to use the repository through the WS api.

I get the exception below , on the second method call to the ws api after session is started.


AuthenticationUtils.startSession(USERNAME, PASSWORD); // OK
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService(); // OK
Store[] stores = repositoryService.getStores();  // it bugs here even if I try another method from WebServiceFactory


23:22:04,234 INFO  [STDOUT] AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllReceiver: security processing failed (actions number mismatch)
faultActor:
faultNode:
faultDetail:
        {http://xml.apache.org/axis/}stackTrace:WSDoAllReceiver: security processing failed (actions number mismatch)
        at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:351)
        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.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.handlers.soap.SOAPService.invoke(SOAPService.java:453)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

I get the same if I run the WS sample1 (from within eclipse).

Therefore, it may be a configuration problem.
What is the installation procedure to use the WS API ?

Has anyone encountered that error ?

Any help greatly appreciated

As a workaround, how can I disable security ?

Thanks


Jerome
 

context : Alfresco 1.2.0 , rebuilded from source on top of Jboss bundle install, on a W2K box , fresh db , no content in the repo except initial spaces
7 REPLIES 7

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

In 1.2.0 the method 'Timestamp' has been added to the required WS security header.  This was done in order to support .NET.

The error you are reporting indictes that this timestamp header is not being sent by your client.

I would guess that your client code is out of date (ie: not 1.2.0) as I have updated the 'Web Service Client' project to send this new header when a service is retrieved from the factory as you are doing.

Let me know how you get on,  if the problem persists we can dig deeper.

Cheers,
Roy

jbaton
Champ in-the-making
Champ in-the-making
Roy,

You were right.
As I had switched back to v1.1.2 , the jars in my project were out of date.

Thanks , I'll can concentrate on my own code now


Jerome
"Late coding generates silly bugs"

Not applicable
Hi all ,

I cannot get my MDB to use the repository through the WS api.

I get the exception below , on the second method call to the ws api after session is started.

…snip…


23:22:04,234 INFO  [STDOUT] AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllReceiver: security processing failed (actions number mismatch)
faultActor:
faultNode:
faultDetail:
…snip…

You're getting this error because the SOAP call security header does not contain a timestamp.

Assuming you're using the XML deployment definition in the examples, change this line

<parameter name='action' value='UsernameToken'/>

to this

<parameter name='action' value='UsernameToken Timestamp'/>

jbaton
Champ in-the-making
Champ in-the-making
Richfearn, thanks for your answer

My problem is solved.
I was using the wrong jars as I had switched back to 1.1.2 (not to migrate aspects and extra config)  and then back to 1.2.

JBaton

fergunet
Champ in-the-making
Champ in-the-making
Hi all, I'm using the webservice client in java to manage mi Alfresco in local. It works properly (I have the 2.1.0 version) but, when I try to attack our remote Alfresco (whose version is 2.0.2) I receive the "actions number mismatch".

Where can I change this:
<parameter name='action' value='UsernameToken Timestamp'/>
In wich file?

Could be a problem of jars?

Thanks in advance Smiley Wink

fergunet
Champ in-the-making
Champ in-the-making
I realized that the 2.0.2 version haven't the "Timestamp" in the .wsdd so it's impossible to manage with the web client api.

But… could I delete the "Timestamp" in AuthenticationUtils.java and compile the code again?

I'm gonna try.

chitrarekha
Champ in-the-making
Champ in-the-making
I got this error while executing program
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
   {http://www.alfresco.org/ws/service/repository/1.0}RepositoryFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>java.lang.IllegalStateException: Failed to resolve to a single NodeRef with parameters (store=workspaceSmiley FrustratedpacesStore uuid=null path=/app:company_home/st:sites/cm:invoice/cmSmiley Very Happyocument_Library/cmSmiley Very Happyocuments/cm:sow), found 0 nodes.</ns1:message>
   {http://xml.apache.org/axis/}exceptionNameSmiley Surprisedrg.alfresco.repo.webservice.repository.RepositoryFault
   {http://xml.apache.org/axis/}stackTrace:
   at org.alfresco.repo.webservice.repository.RepositoryWebService.update(RepositoryWebService.java:335)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   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.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
{http://xml.apache.org/axis/}hostname:

   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
   at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
   at org.alfresco.webservice.repository.RepositoryFault.getDeserializer(RepositoryFault.java:146)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
   at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
   at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
   at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
   at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
   at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
   at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
   at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.update(RepositoryServiceSoapBindingStub.java:986)
   at com.tcs.UploadContent.<init>(UploadContent.java:72)
   at com.tcs.UploadContent.main(UploadContent.java:118)