You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sukma Agung Verdianto <sa...@gmail.com> on 2007/12/03 08:51:24 UTC

Re: Axis2 Rampart + Sandesha integration problem

Hi All,
http://wso2.org/library/1027

I've got this article from WSO2, could someone here explain what I should do
exactly please.

I'm getting stuck with this :(

Regards,
Sukma


On Nov 30, 2007 10:02 AM, Sukma Agung Verdianto <sa...@gmail.com> wrote:

> Hi All,
>
> I have successfully implementing Axis2 web service with WS-Security only
> and WS-RM only (not integrated yet).
> Today, I've tried to implement Axis2 1.3 web service with
> WS-Security(Rampart) and Reliable Messaging Support (Sandesha2) but have no
> luck due to "Missing Timestamp" error when invoking RM CreateSequence.
> The real message is encrypted and successfully processed after
> CreateSequence but the client repeat therequest and never terminated (not
> sure, never wait, maybe there is timeout).
>
> Here is the CreateSequence request:
> ----------------------------------------------------
>
> POST /axis2/services/CreateApplicationInitiatorSOAPService?wsdl HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8; action="
> http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"
> User-Agent: Axis2
> Host: 127.0.0.1:8888
> Transfer-Encoding: chunked
>
> 36e
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="
> http://www.w3.org/2003/05/soap-envelope">
>       <soapenv:Header xmlns:wsa=" http://www.w3.org/2005/08/addressing">
>          <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> " soapenv:mustUnderstand="true" />
>          <wsa:To>http://localhost:8888/axis2/services/CreateApplicationInitiatorSOAPService?wsdl
> </wsa:To>
>
> <wsa:MessageID>urn:uuid:5B6ECBFB9B01F9184A1196349989655</wsa:MessageID>
>          <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence
> </wsa:Action>
>       </soapenv:Header>
>       <soapenv:Body>
>          <wsrm:CreateSequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm
> ">
>             <wsrm:AcksTo>
>                <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
>             </wsrm:AcksTo>
>          </wsrm:CreateSequence>
>       </soapenv:Body>
>    </soapenv:Envelope>0
>
>
>
> And the response:
> --------------------------
>
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: application/soap+xml; action="
> http://www.w3.org/2005/08/addressing/soap/fault";charset=UTF-8
> Transfer-Encoding: chunked
> Date: Thu, 29 Nov 2007 15:26:30 GMT
> Connection: close
>
> aff
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
> ">
>       <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
>          <wsa:Action> http://www.w3.org/2005/08/addressing/soap/fault
> </wsa:Action>
>
> <wsa:RelatesTo>urn:uuid:5B6ECBFB9B01F9184A1196349989655</wsa:RelatesTo>
>       </soapenv:Header>
>       <soapenv:Body>
>          <soapenv:Fault>
>             <soapenv:Code>
>                <soapenv:Value>soapenv:Receiver</soapenv:Value>
>             </soapenv:Code>
>             <soapenv:Reason>
>                <soapenv:Text xml:lang="en-US">Missing
> Timestamp</soapenv:Text>
>             </soapenv:Reason>
>             <soapenv:Detail>
>                <Exception>org.apache.axis2.AxisFault: Missing Timestamp at
> org.apache.rampart.handler.RampartReceiver.invoke (RampartReceiver.java
> :92) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at
> org.apache.axis2.engine.AxisEngine.invoke (AxisEngine.java:235) at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:135) at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
> HTTPTransportUtils.java:275) at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:121) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter (
> ApplicationFilterChain.java:173) at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213) at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178) at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105) at org.apache.catalina.core.StandardEngineValve.invoke (
> StandardEngineValve.java:107) at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :148) at org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:869) at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
> Http11BaseProtocol.java:664) at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527) at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80) at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (
> ThreadPool.java:684) at java.lang.Thread.run(Thread.java:613)Caused by:
> org.apache.rampart.RampartException: Missing Timestamp at
> org.apache.rampart.PolicyBasedResultsValidator.validate(
> PolicyBasedResultsValidator.java:68) at
> org.apache.rampart.RampartEngine.process(RampartEngine.java :192) at
> org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:85) ...
> 21 more</Exception>
>             </soapenv:Detail>
>          </soapenv:Fault>
>       </soapenv:Body>
>    </soapenv:Envelope>
> 0
>
>
>
> I have search on google, and found some article that there is some hack to
> integrate Rampart & Sandesha2, but I'm not really clear.
> Is this configuration problem or something else?
> I would appreciate if someone help me out with this problem.
>
> Regards,
> Sukma
>

Re: Axis2 Rampart + Sandesha integration problem

Posted by Alberto Patino <pa...@gmail.com>.
I think it was not a good idea to attach the binary file. :) I'm sorry

If you dont't want to build your own distro ( its very easy but you
need a good internet connection and be patiente) I would upload the
latest snapshots in a public server.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 Rampart + Sandesha integration problem

Posted by Sukma Agung Verdianto <sa...@gmail.com>.
Thanks Alberto,
I have tried using latest Axis2, Sandesha2 and Rampart snapshots.
But I still get must understand check exception.

- Sandesha2 sender thread has not received a valid synchronous response.

org.apache.axis2.AxisFault: Must Understand check failed for header
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd:
Security

at org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:89
)

at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:138)

at org.apache.sandesha2.workers.SenderWorker.checkForSyncResponses(
SenderWorker.java:609)


Where did you get the rampart snapshot?
Is that http://people.apache.org/dist/rampart/nightly/ ?

Regards,
Sukma

On Dec 24, 2007 3:37 AM, Alberto Patino <pa...@gmail.com> wrote:

> Using the latest snapshot for axis2 sandesha y rampart, NOW its
> working!!! Please try with snapshosts
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Axis2 Rampart + Sandesha integration problem

Posted by Alberto Patino <pa...@gmail.com>.
Using the latest snapshot for axis2 sandesha y rampart, NOW its
working!!! Please try with snapshosts

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 Rampart + Sandesha integration problem

Posted by Alberto Patino <pa...@gmail.com>.
Would you verify if you get the same stack trace:

Caused by: java.lang.Exception: Sandesha2 sender thread has not
received a valid CreateSequnceResponse
	at org.apache.sandesha2.workers.SenderWorker.invokeCallBackObject(SenderWorker.java:757)
	at org.apache.sandesha2.workers.SenderWorker.run(SenderWorker.java:339)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
	at java.lang.Thread.run(Thread.java:619)

Debugging the client application I am able to see the origin of the
problem, in the file SenderWorker.java, function checkForSyncResponses
line 657, AxisEngine.receive() invocation generate an exception:

			if (resenvelope!=null) {
				AxisEngine.receive(responseMessageContext);
			}

		} catch (Exception e) {

            String message =
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noValidSyncResponse);
            if (msgCtx != null &&! msgCtx.isServerSide() &&

(Sandesha2Constants.SPEC_2005_02.Actions.ACTION_CREATE_SEQUENCE.equals(msgCtx.getSoapAction())
                            ||
Sandesha2Constants.SPEC_2007_02.Actions.ACTION_CREATE_SEQUENCE.equals(msgCtx.getSoapAction()))
){
                // We have not received a valid createSequnce reponse
for the request we send so we need to terminate the seunce here
                return false;
            } else {
                if (log.isWarnEnabled())
                    log.warn(message, e);
            }
}

The message is totally confusing me because the content of the
exception is not propagated to the client, this error is originated in
AxisEngine.receive(), checkMustUnderstand invocation line #135:

    private static void checkMustUnderstand(MessageContext msgContext)
throws AxisFault {
        SOAPEnvelope envelope = msgContext.getEnvelope();
        if (envelope.getHeader() == null) {
            return;
        }

        // Get all the headers targeted to us
        Iterator headerBlocks = envelope.getHeader().getHeadersToProcess(null);

        while (headerBlocks.hasNext()) {
            SOAPHeaderBlock headerBlock = (SOAPHeaderBlock) headerBlocks.next();

            // if this header block has been processed or mustUnderstand isn't
            // turned on then its cool
            if (headerBlock.isProcessed() || !headerBlock.getMustUnderstand()) {
                continue;
            }

            // Oops, throw an appropriate MustUnderstand fault!!
            QName faultQName =
headerBlock.getVersion().getMustUnderstandFaultCode();
            throw new AxisFault(Messages.getMessage("mustunderstandfailed",

headerBlock.getNamespace().getNamespaceURI(),

headerBlock.getLocalName()), faultQName);
        }
    }

The exception has this message:

Must Understand check failed for header
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
: Security

I will try to deploy with early SNAPSHOTS!!!

On Dec 21, 2007 2:22 AM, Sukma Agung Verdianto <sa...@gmail.com> wrote:
> I've solved my previous problem.
> And now I get the same error like yours.
>
>
>
> On Dec 19, 2007 3:27 PM, Alberto Patino <pa...@gmail.com> wrote:
> >
> >
> >
> > I'm trying to do the same thing you want to do but I having a
> > different message error: (Debug enabled)
> >
> > [DEBUG] Exit: InMemoryTransaction::enlist
> > [DEBUG] Enter: InMemoryStorageManager::removeMessageContext, key:
> > urn:uuid:818835A043FB6125F01198050445672
> > [DEBUG] Exit: InMemoryStorageManager::removeMessageContext, key:
> > urn:uuid:818835A043FB6125F01198050445672
> > [DEBUG] Entry: OutInAxisOperationClient$SyncCallBack::onError,
> > java.lang.Exception: Sandesha2 sender thread has not received a valid
> > CreateSequnceResponse
> > [DEBUG] Exit: OutInAxisOperationClient$SyncCallBack::onError
> > [DEBUG] Exit: SenderWorker::run
> >
> > The error is:  "Sandesha2 sender thread has not received a valid
> > CreateSequnceResponse"
> >
> > I'm tracking the error in the SenderWorker.java file,
> > checkForSyncResponses function:
> >
> >
> >        } catch (Exception e) {
> >
> >            String message =
> > SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noValidSyncResponse);
> >            if (msgCtx != null &&! msgCtx.isServerSide () &&
> >
> (Sandesha2Constants.SPEC_2005_02.Actions.ACTION_CREATE_SEQUENCE.equals(msgCtx.getSoapAction())
> >
> >
> ||Sandesha2Constants.SPEC_2007_02.Actions.ACTION_CREATE_SEQUENCE.equals(msgCtx.getSoapAction()))
> > ){
> >                // We have not received a valid createSequnce reponse
> > for the request we send so we need to terminate the seunce here
> >                return false;
> >            } else {
> >                if ( log.isWarnEnabled())
> >                    log.warn(message, e);
> >         }
> >
> > I'm not sure why the code is looking for ACTION_CREATE_SEQUENCE
> > instead of ACTION_CREATE_SEQUENCE_RESPONSE!
> >
> >
> > Any ideas?
> >
> > ( I have read the link in http://wso2.org/library/1027 but I realized
> > the changes suggested in the article are already incorporated in the
> > sandesha 1.3 module.xml file)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>



-- 
Don't be evil!!!

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 Rampart + Sandesha integration problem

Posted by Sukma Agung Verdianto <sa...@gmail.com>.
I've solved my previous problem.And now I get the same error like yours.

On Dec 19, 2007 3:27 PM, Alberto Patino <pa...@gmail.com> wrote:

> I'm trying to do the same thing you want to do but I having a
> different message error: (Debug enabled)
>
> [DEBUG] Exit: InMemoryTransaction::enlist
> [DEBUG] Enter: InMemoryStorageManager::removeMessageContext, key:
> urn:uuid:818835A043FB6125F01198050445672
> [DEBUG] Exit: InMemoryStorageManager::removeMessageContext, key:
> urn:uuid:818835A043FB6125F01198050445672
> [DEBUG] Entry: OutInAxisOperationClient$SyncCallBack::onError,
> java.lang.Exception: Sandesha2 sender thread has not received a valid
> CreateSequnceResponse
> [DEBUG] Exit: OutInAxisOperationClient$SyncCallBack::onError
> [DEBUG] Exit: SenderWorker::run
>
> The error is:  "Sandesha2 sender thread has not received a valid
> CreateSequnceResponse"
>
> I'm tracking the error in the SenderWorker.java file,
> checkForSyncResponses function:
>
>
>        } catch (Exception e) {
>
>            String message =
> SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noValidSyncResponse);
>            if (msgCtx != null &&! msgCtx.isServerSide() &&
> (Sandesha2Constants.SPEC_2005_02.Actions.ACTION_CREATE_SEQUENCE.equals(
> msgCtx.getSoapAction())
>
> ||Sandesha2Constants.SPEC_2007_02.Actions.ACTION_CREATE_SEQUENCE.equals(
> msgCtx.getSoapAction()))
> ){
>                // We have not received a valid createSequnce reponse
> for the request we send so we need to terminate the seunce here
>                return false;
>            } else {
>                if (log.isWarnEnabled())
>                    log.warn(message, e);
>         }
>
> I'm not sure why the code is looking for ACTION_CREATE_SEQUENCE
> instead of ACTION_CREATE_SEQUENCE_RESPONSE!
>
>
> Any ideas?
>
> ( I have read the link in http://wso2.org/library/1027 but I realized
> the changes suggested in the article are already incorporated in the
> sandesha 1.3 module.xml file)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Axis2 Rampart + Sandesha integration problem

Posted by Alberto Patino <pa...@gmail.com>.
I'm trying to do the same thing you want to do but I having a
different message error: (Debug enabled)

[DEBUG] Exit: InMemoryTransaction::enlist
[DEBUG] Enter: InMemoryStorageManager::removeMessageContext, key:
urn:uuid:818835A043FB6125F01198050445672
[DEBUG] Exit: InMemoryStorageManager::removeMessageContext, key:
urn:uuid:818835A043FB6125F01198050445672
[DEBUG] Entry: OutInAxisOperationClient$SyncCallBack::onError,
java.lang.Exception: Sandesha2 sender thread has not received a valid
CreateSequnceResponse
[DEBUG] Exit: OutInAxisOperationClient$SyncCallBack::onError
[DEBUG] Exit: SenderWorker::run

The error is:  "Sandesha2 sender thread has not received a valid
CreateSequnceResponse"

I'm tracking the error in the SenderWorker.java file,
checkForSyncResponses function:


	} catch (Exception e) {

            String message =
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noValidSyncResponse);
            if (msgCtx != null &&! msgCtx.isServerSide() &&
(Sandesha2Constants.SPEC_2005_02.Actions.ACTION_CREATE_SEQUENCE.equals(msgCtx.getSoapAction())

||Sandesha2Constants.SPEC_2007_02.Actions.ACTION_CREATE_SEQUENCE.equals(msgCtx.getSoapAction()))
){
                // We have not received a valid createSequnce reponse
for the request we send so we need to terminate the seunce here
                return false;
            } else {
                if (log.isWarnEnabled())
                    log.warn(message, e);
         }

I'm not sure why the code is looking for ACTION_CREATE_SEQUENCE
instead of ACTION_CREATE_SEQUENCE_RESPONSE!


Any ideas?

( I have read the link in http://wso2.org/library/1027 but I realized
the changes suggested in the article are already incorporated in the
sandesha 1.3 module.xml file)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org