Hi All,

We are trying to implement Guranteed Delivery in one of our project. For doing 
so we are using ScheduledMessageForwardingProcessor. We are using 
request-response messaging pattern. To get the response we have used 
message.processor.reply.sequence property. We are able to log the response 
payload in the response sequence. But on trying to send the response back to 
the client we are getting the following error.

[2011-12-08 03:46:33,113]  INFO - LogMediator
To: /services/StudyProxy.StudyProxyHttpSoap11Endpoint,
WSAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol,
SOAPAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol,
MessageID: urn:uuid:b9b9cf4a-140c-40ab-8834-1daa2e46e4a7,
Direction: request

[2011-12-08 03:46:33,113]  INFO - LogMediator
To: ,
WSAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol,
SOAPAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol,
MessageID: urn:uuid:b9b9cf4a-140c-40ab-8834-1daa2e46e4a7, Direction: response,
Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><lis:getListOfClinicalProto
colResponse 
xmlns:lis="http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/";><out>?</out></lis:getListOfClinicalProtocolResponse></soapenv:Body></soapenv:Envel
ope>
[2011-12-08 03:46:33,113] ERROR - ForwardingJob Error Forwarding Message
java.lang.RuntimeException: wso2statistics.request.received.time is null in the 
IN MessageContext
        at 
org.wso2.carbon.statistics.internal.ResponseTimeCalculator.calculateResponseTimes(ResponseTimeCalculator.java:54)
        at 
org.wso2.carbon.statistics.module.InOutMEPHandler.updateStatistics(InOutMEPHandler.java:106)
        at 
org.wso2.carbon.statistics.module.InOutMEPHandler.invoke(InOutMEPHandler.java:90)
        at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
        at 
org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:159)
        at 
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:255)
        at 
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84)
        at 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
        at 
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
        at 
org.apache.synapse.message.processors.forward.ForwardingJob.execute(ForwardingJob.java:182)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

We are using the following sequence as the response sequence,

<sequence name="ReplySequence" trace="disable">
        <log/>
        <header name="To" action="remove"/>
        <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
        <property name="RESPONSE" value="true" scope="default"/>
        <xslt key="conf:/users/wcf2ctms.xslt"/>
        <log level="full"/>
        <send/>
</sequence>



Can anybody point us out where we are going wrong? Do we need to set any 
property in the response. Because the SOA headers seems to be fine.
We have tried even without removing the 'To' still we are getting the same 
error.
I'm attaching the entire synapse definition herewith.Please let us know if 
anybody has any clue about this?
Thanks,

Debarshi

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse";>
    <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
        <parameter name="cachableDuration">15000</parameter>
    </registry>
    <proxy name="StudyProxy" transports="http" startOnLoad="true" 
trace="enable" statistics="enable">
        <target>
            <inSequence>
                <log separator=","/>
                <xslt key="conf:users/tms2wcf.xslt"/>
                <header name="To" value="http://tempuri.org/IPO"/>
                <header name="Action" value="http://tempuri.org/IPO/CreatePO"/>
                <log separator=","/>
                <property name="target.endpoint" value="StudyInterfaceWCF"/>
                <store messageStore="TestJMSStore" sequence="OnStoreSequence"/>
            </inSequence>
            <faultSequence>
                <log level="full"/>
            </faultSequence>
        </target>
        <publishWSDL key="conf:/users/ListOfPO.wsdl">
            <resource location="/_system/config/users/ListOfPO.xsd" 
key="conf:/users/ListOfPO.xsd"/>
        </publishWSDL>
    </proxy>
    <endpoint name="StudyInterfaceWCF">
        <address uri="http://to-prod/PO/POService.svc"; statistics="enable"/>
    </endpoint>
    <sequence name="fault">
        <log level="full">
            <property name="MESSAGE" value="Executing default 'fault' 
sequence"/>
            <property name="ERROR_CODE" 
expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" 
expression="get-property('ERROR_MESSAGE')"/>
        </log>
        <drop/>
    </sequence>
    <sequence name="OnStoreSequence" trace="enable" statistics="enable">
        <log separator="----">
            <property name="Message" value="Storing Message to TestJMSStore"/>
        </log>
    </sequence>
    <sequence name="ReplySequence" trace="disable">
            <log/>
            <header name="To" action="remove"/>
            <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
            <property name="RESPONSE" value="true" scope="default"/>
            <xslt key="conf:/users/wcf2ctms.xslt"/>
            <log level="full"/>
            <send/>
</sequence>
    <sequence name="main">
        <in>
            <log level="full"/>
            <filter source="get-property('To')" regex="http://localhost:9000.*";>
                <send/>
            </filter>
        </in>
        <out>
            <send/>
        </out>
        <description>The main sequence for the message mediation</description>
    </sequence>
    <messageStore 
class="org.wso2.carbon.message.store.persistence.jms.JMSMessageStore" 
name="TestJMSStore">
        <parameter 
name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        <parameter 
name="java.naming.provider.url">tcp://localhost:61616</parameter>
    </messageStore>
    <messageProcessor 
class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor"
 name="ScheduledMessageForwardingProcessor" messageStore="TestJMSStore">
        <parameter 
name="message.processor.reply.sequence">ReplySequence</parameter>
        <parameter name="interval">1000</parameter>
    </messageProcessor>
</definitions>
-------------------------------------------------------------------------------
[2011-12-08 03:46:33,113]  INFO - LogMediator 
To: /services/StudyProxy.StudyProxyHttpSoap11Endpoint, 
WSAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol, 
SOAPAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol, 
MessageID: urn:uuid:b9b9cf4a-140c-40ab-8834-1daa2e46e4a7, 
Direction: request

[2011-12-08 03:46:33,113]  INFO - LogMediator 
To: , 
WSAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol, 
SOAPAction: 
http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/getListOfClinicalProtocol, 
MessageID: urn:uuid:b9b9cf4a-140c-40ab-8834-1daa2e46e4a7, Direction: response, 
Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><lis:getListOfClinicalProto
colResponse 
xmlns:lis="http://pro.wrt.ccp/xml/ListOfClinicalProtocolHls/";><out>?</out></lis:getListOfClinicalProtocolResponse></soapenv:Body></soapenv:Envel
ope>
[2011-12-08 03:46:33,113] ERROR - ForwardingJob Error Forwarding Message
java.lang.RuntimeException: wso2statistics.request.received.time is null in the 
IN MessageContext
        at 
org.wso2.carbon.statistics.internal.ResponseTimeCalculator.calculateResponseTimes(ResponseTimeCalculator.java:54)
        at 
org.wso2.carbon.statistics.module.InOutMEPHandler.updateStatistics(InOutMEPHandler.java:106)
        at 
org.wso2.carbon.statistics.module.InOutMEPHandler.invoke(InOutMEPHandler.java:90)
        at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
        at 
org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:159)
        at 
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:255)
        at 
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84)
        at 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
        at 
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
        at 
org.apache.synapse.message.processors.forward.ForwardingJob.execute(ForwardingJob.java:182)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
<sequence name="ReplySequence" trace="disable">
        <log/>
        <header name="To" action="remove"/>
        <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
        <property name="RESPONSE" value="true" scope="default"/>
        <xslt key="conf:/users/wcf2ctms.xslt"/>
        <log level="full"/>
        <send/>
</sequence>
_______________________________________________
Esb-java-user mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to