Issue in sending back response using ScheduledMessageForwardingProcessor

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue in sending back response using ScheduledMessageForwardingProcessor

debarshi.bhattacharya

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

SynapseDefinition.txt (4K) Download Attachment
errorLog.txt (3K) Download Attachment
ReplySequence.txt (490 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Issue in sending back response using ScheduledMessageForwardingProcessor

Charith Wickramarachchi-3

Hi,

The main purpose of message processors are to support store and forward messaging patterns.
In your scenario what you are trying to do is send the responce comming back to the original client.which we do not support.
Basically idea is to support in only invocations.we provide a way to handle the responce by using a responce sequence 
but that is for the purpose of handling the processing of the responce.you can't send the response back to the original client.

Message Forwarding prosessor will gurentee the delivey between esb and back end service.
But it's not intended for support end to end atomic transaction between client to backend service via esb.

--charith


On Dec 8, 2011, at 9:22 PM, <[hidden email]> wrote:

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

<SynapseDefinition.txt>
<errorLog.txt>
<ReplySequence.txt>
_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
Reply | Threaded
Open this post in threaded view
|

Re: Issue in sending back response using ScheduledMessageForwardingProcessor

debarshi.bhattacharya

Ok, please correct me if I’m wrong, but what I understood is, Message Forwarding processor only supports Async Fire-and-Forget MEP.

So does it mean that we need to write a custom message processor for implementing this kind of SAF messaging? Or can we call another webservice from the ReplySequence?

<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/> <Invoke another webservice to update the parent application >

</sequence>

 

 

 

 

 

 

 

 

 

 

 

 

 


Will this type of Design be supported by Forward Message Processor?

 

Thanks & Regards,

Debarshi Bhattacharya

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Charith Dhanushka
Sent: Friday, December 09, 2011 5:36 AM
To: [hidden email]
Cc: <[hidden email]>
Subject: Re: [esb-java-user] Issue in sending back response using ScheduledMessageForwardingProcessor

 


Hi,

 

The main purpose of message processors are to support store and forward messaging patterns.

In your scenario what you are trying to do is send the responce comming back to the original client.which we do not support.

Basically idea is to support in only invocations.we provide a way to handle the responce by using a responce sequence 

but that is for the purpose of handling the processing of the responce.you can't send the response back to the original client.

 

Message Forwarding prosessor will gurentee the delivey between esb and back end service.

But it's not intended for support end to end atomic transaction between client to backend service via esb.

 

--charith

 


On Dec 8, 2011, at 9:22 PM, <[hidden email]> wrote:

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

<SynapseDefinition.txt>

<errorLog.txt>

<ReplySequence.txt>

_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
Reply | Threaded
Open this post in threaded view
|

Re: Issue in sending back response using ScheduledMessageForwardingProcessor

Charith Wickramarachchi-3


On Fri, Dec 9, 2011 at 11:36 AM, <[hidden email]> wrote:

Ok, please correct me if I’m wrong, but what I understood is, Message Forwarding processor only supports Async Fire-and-Forget MEP.



Not really you can use it to Invoke in In-Only and In_out service operations. But in the In-Out case the response must be handle asynchronously.  

So does it mean that we need to write a custom message processor for implementing this kind of SAF messaging? Or can we call another webservice from the ReplySequence?


Yes exactly. The idea of ReplySequence is to support Reply Processing. So you can invoke a another service using the response coming.   

<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/> <Invoke another webservice to update the parent application >

</sequence>

 

 



Nice picture. This captures the idea of the reply sequence nicely. Anyway Reply sequence is a just another sequence. So you can use it as any other sequence. (To Send message to a service , Persist that data in a Database etc.... )

cheers,
Charith 

 

 

 

 

 

 

 

 

 

 

 


Will this type of Design be supported by Forward Message Processor?

 

Thanks & Regards,

Debarshi Bhattacharya

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Charith Dhanushka
Sent: Friday, December 09, 2011 5:36 AM
To: [hidden email]
Cc: <[hidden email]>
Subject: Re: [esb-java-user] Issue in sending back response using ScheduledMessageForwardingProcessor

 


Hi,

 

The main purpose of message processors are to support store and forward messaging patterns.

In your scenario what you are trying to do is send the responce comming back to the original client.which we do not support.

Basically idea is to support in only invocations.we provide a way to handle the responce by using a responce sequence 

but that is for the purpose of handling the processing of the responce.you can't send the response back to the original client.

 

Message Forwarding prosessor will gurentee the delivey between esb and back end service.

But it's not intended for support end to end atomic transaction between client to backend service via esb.

 

--charith

 


On Dec 8, 2011, at 9:22 PM, <[hidden email]> wrote:

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

<SynapseDefinition.txt>

<errorLog.txt>

<ReplySequence.txt>

_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user




--
Charith Dhanushka Wickramarachchi
Software Engineer 
WSO2 Inc

blog

twitter

Mobile : 0776706568



_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
Reply | Threaded
Open this post in threaded view
|

Re: Issue in sending back response using ScheduledMessageForwardingProcessor

debarshi.bhattacharya

Hi Charith,

Thanks for the input. We have finally been able to make the Proxy working. While making this working we have observed few things which are not there in the documentation.

1.       When we make the proxy fire and forget then the Reply sequence doesn’t get invoked. Not sure if this is the desired behavior or not? But ideally the proxy should invoke the reply sequence.

2.       As mentioned above the fire and forget proxy didn’t work out, so we had to make the proxy sync. Request and response Proxy. As the first response we have sent a acknowledgement message back to the Application 1. After the message processor receives the response from Application2 we are calling another webservice exposed by Application1 to update the status.

Right Arrow: WS exposed by App 1,Right Arrow: Ack Response
 

 

 

 

 

 

 

 

 

 

 

 


Thanks & Regards,

Debarshi Bhattacharya

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Charith Wickramarachchi
Sent: Sunday, December 11, 2011 8:58 AM
To: [hidden email]
Subject: Re: [esb-java-user] Issue in sending back response using ScheduledMessageForwardingProcessor

 

 

On Fri, Dec 9, 2011 at 11:36 AM, <[hidden email]> wrote:

Ok, please correct me if I’m wrong, but what I understood is, Message Forwarding processor only supports Async Fire-and-Forget MEP.

 

 

Not really you can use it to Invoke in In-Only and In_out service operations. But in the In-Out case the response must be handle asynchronously.  

So does it mean that we need to write a custom message processor for implementing this kind of SAF messaging? Or can we call another webservice from the ReplySequence?

 

Yes exactly. The idea of ReplySequence is to support Reply Processing. So you can invoke a another service using the response coming.   

<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/> <Invoke another webservice to update the parent application >

</sequence>

 

 

 

 

Nice picture. This captures the idea of the reply sequence nicely. Anyway Reply sequence is a just another sequence. So you can use it as any other sequence. (To Send message to a service , Persist that data in a Database etc.... )

 

cheers,

Charith 

 

 

 

 

 

 

 

 

 

 

 


Will this type of Design be supported by Forward Message Processor?

 

Thanks & Regards,

Debarshi Bhattacharya

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Charith Dhanushka
Sent: Friday, December 09, 2011 5:36 AM
To: [hidden email]
Cc: <[hidden email]>
Subject: Re: [esb-java-user] Issue in sending back response using ScheduledMessageForwardingProcessor

 


Hi,

 

The main purpose of message processors are to support store and forward messaging patterns.

In your scenario what you are trying to do is send the responce comming back to the original client.which we do not support.

Basically idea is to support in only invocations.we provide a way to handle the responce by using a responce sequence 

but that is for the purpose of handling the processing of the responce.you can't send the response back to the original client.

 

Message Forwarding prosessor will gurentee the delivey between esb and back end service.

But it's not intended for support end to end atomic transaction between client to backend service via esb.

 

--charith

 


On Dec 8, 2011, at 9:22 PM, <[hidden email]> wrote:

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

<SynapseDefinition.txt>

<errorLog.txt>

<ReplySequence.txt>

_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user



 

--
Charith Dhanushka Wickramarachchi

Software Engineer 

WSO2 Inc

 

blog

 

twitter

 

Mobile : 0776706568

 

 

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
Reply | Threaded
Open this post in threaded view
|

Re: Issue in sending back response using ScheduledMessageForwardingProcessor

Charith Wickramarachchi-3


On Mon, Dec 12, 2011 at 11:35 AM, <[hidden email]> wrote:

Hi Charith,

Thanks for the input. We have finally been able to make the Proxy working. While making this working we have observed few things which are not there in the documentation.

1.       When we make the proxy fire and forget then the Reply sequence doesn’t get invoked. Not sure if this is the desired behavior or not? But ideally the proxy should invoke the reply sequence.


I think what you mean by this is you put the property OUT_ONLY=true in the in sequence, If that is the case  , Yes that is the desired behavior. Basically when you do an in only invocation we do not invoke the replySequence as there is not reply.    
--Charith

2.       As mentioned above the fire and forget proxy didn’t work out, so we had to make the proxy sync. Request and response Proxy. As the first response we have sent a acknowledgement message back to the Application 1. After the message processor receives the response from Application2 we are calling another webservice exposed by Application1 to update the status.

Right Arrow: WS exposed by App 1,Right Arrow: Ack Response
 

 

 

 

 

 

 

 

 

 

 

 


Thanks & Regards,

Debarshi Bhattacharya

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Charith Wickramarachchi
Sent: Sunday, December 11, 2011 8:58 AM
To: [hidden email]


Subject: Re: [esb-java-user] Issue in sending back response using ScheduledMessageForwardingProcessor

 

 

On Fri, Dec 9, 2011 at 11:36 AM, <[hidden email]> wrote:

Ok, please correct me if I’m wrong, but what I understood is, Message Forwarding processor only supports Async Fire-and-Forget MEP.

 

 

Not really you can use it to Invoke in In-Only and In_out service operations. But in the In-Out case the response must be handle asynchronously.  

So does it mean that we need to write a custom message processor for implementing this kind of SAF messaging? Or can we call another webservice from the ReplySequence?

 

Yes exactly. The idea of ReplySequence is to support Reply Processing. So you can invoke a another service using the response coming.   

<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/> <Invoke another webservice to update the parent application >

</sequence>

 

 

 

 

Nice picture. This captures the idea of the reply sequence nicely. Anyway Reply sequence is a just another sequence. So you can use it as any other sequence. (To Send message to a service , Persist that data in a Database etc.... )

 

cheers,

Charith 

 

 

 

 

 

 

 

 

 

 

 


Will this type of Design be supported by Forward Message Processor?

 

Thanks & Regards,

Debarshi Bhattacharya

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Charith Dhanushka
Sent: Friday, December 09, 2011 5:36 AM
To: [hidden email]
Cc: <[hidden email]>
Subject: Re: [esb-java-user] Issue in sending back response using ScheduledMessageForwardingProcessor

 


Hi,

 

The main purpose of message processors are to support store and forward messaging patterns.

In your scenario what you are trying to do is send the responce comming back to the original client.which we do not support.

Basically idea is to support in only invocations.we provide a way to handle the responce by using a responce sequence 

but that is for the purpose of handling the processing of the responce.you can't send the response back to the original client.

 

Message Forwarding prosessor will gurentee the delivey between esb and back end service.

But it's not intended for support end to end atomic transaction between client to backend service via esb.

 

--charith

 


On Dec 8, 2011, at 9:22 PM, <[hidden email]> wrote:

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

<SynapseDefinition.txt>

<errorLog.txt>

<ReplySequence.txt>

_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user



 

--
Charith Dhanushka Wickramarachchi

Software Engineer 

WSO2 Inc

 

blog

 

twitter

 

Mobile : 0776706568

 

 

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


_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user




--
Charith Dhanushka Wickramarachchi
Software Engineer 
WSO2 Inc

blog

twitter

Mobile : 0776706568



_______________________________________________
Esb-java-user mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user