Hi Jens and all,

The issue https://issues.apache.org/jira/browse/SYNAPSE-241 has been reconsidered in the https://issues.apache.org/jira/browse/SYNAPSE-252 and is now fixed, so that you don't need to do additional configurations to get the dual channel (asynchronous) invocation to work.

Please follow the JIRA SYNAPSE-252. I have added a client which will invoke the SimpleStockQuoteService provided as a sample service with synapse, through synapse using the dual channel invocation. In-order to test this, you can start the synapse with it's default configuration and deploy the SimpleStockQuoteService under the samples/axis2Server and then invoke the client on the sample/axis2Client folder as follows;

ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/ -Dmode=dualquote

I will be fixing the dual channel invocation between synapse and the server (client side of synapse) soon [https://issues.apache.org/jira/browse/SYNAPSE-269].

Thanks,
Ruwna

Ruwan Linton wrote:
Hi Jens,

As I have told you there is an issue in axis2 which sends a 200 OK HTTP
status message rather than a HTTP 202 Accepted status message which is
the root cause for the problem (synapse assumes this 200 OK message as a
POX message which is correct and mediates the message).

Please try the latest WSAS release, I think this issue is fixed in that.

Thanks,
Ruwan

Jens Goldhammer wrote:
Me again,

the client shows increased activity too in this case. I have attached the log-file of the client (setting log4j to debug). There you can see that the client gets many responses from the esb? It is too complicated for me at this time. Maybe I will dive deeper into Axis2 and Synapse soon (after my diploma thesis :-))...

Thanks,
Jens




Jens Goldhammer schrieb:
Hello Ruwan,

tried your solution by hosting the real service on a Tomcat. Yes, I get the message within the client, but there is a lot of (sync) traffic between the esb and tomcat. Maybe I should try the wsas for it... I have attached two complete conversation between esb and tomcat and client and esb and the complete synapse logs...

Any idea?
Thanks,
Jens

Ruwan Linton schrieb:
Hi Jens,

Finally I was able to figure out the problem and it has two parts. (when I check this last time I have not enabled the use separate listener :-( thats why it worked for me last time)

  1.  Your configuration needs to be updated to handle the RelatesTo
header (this is because the response from the WSAS server is a new
     message to ESB). I have attached the modified configuration. In
     order to run this configuration we had to do a fix to the
     synapse-core and it is also attached here with.
Ok, thanks.

  2. After fixing this issue we found that the axis2 client is sending
     a unexpected acknowledge of HTTP 200 OK, but ideally the client
should send a HTTP 202 Accepted instead. Since this 200 OK message
     is considered as a application message by ESB (which is correct)
     this will lead to a loop back. In order to overcome this I had to
filter out the messages that are not application messages by using
     a simple filter.
Do you have implemented it into the patch?


Here are the steps that you need to do to get this working;

  1. Copy the attached synapse-core-1.2-002.jar in to the
     $ESB_HOME/webapp/WEB_INF/lib/patches folder
  2. Replace the synapse.xml with the provided one
  3. I have commented the sandesha2 module in the services.xml of the
     QueService in WSAS since we are not using RM.

Now it should work. I will work on with the WSAS (Axis2) team to fix the issue of the axis2 client side, but till then you can use this workaround.
Ok.

Thanks,
Ruwan

Jens Goldhammer wrote:
Hello Ruwan,

I have opened a JIRA issuse. http://issues.apache.org/jira/browse/SYNAPSE-241
I hope, you can have a look on it.

Thanks,
Jens

Ruwan Linton schrieb:
Jens,

I think you spotted the problem, I was again not well and had to rest today and now only I saw both these responses (Now I am completely fine and back to work). I have figured this problem while reading the first response of yours, I think synapse has an issue in handling separateListener case, though I need a little bit more tests to confirm that.

At the mean time you could go ahead and add a JIRA describing the issue, if it is critical to your work.

Thanks,
Ruwan

Jens Goldhammer wrote:
Hello,

I have made some further investigation.
When I communicate directly from the client to the Tomcat Server, I can see that there is only an acception which is returned back to the client. The response indeed has been transported on an other channel... If I look at the soap messages which will be forwarded by tcpmon to synapse and the server, I see that the response does not come on a different http channel as I expected. It seems to me that it is the same channel and the callback handler will not be activated because it listens to another port...

Does Synapse allow this behaviour? Do I have to configure it?

Thanks,
Jens

Jens Goldhammer schrieb:
Hello Ruwan,

thanks for your testing! But I cannot get it working on my machine. I have commented the proxysettings, but nothing happens. Only sync invocation without setting the useSeparateListener works...
Here is the log for the async operation:

[DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
[DEBUG] *********************** RampartSender sent out
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="Timestamp-14452459"><wsu:Created>2008-02-18T09:36:32.402Z</wsu:Created><wsu:Expires>2008-02-18T09:41:32.402Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="UsernameToken-15612583"><wsse:Username>bob</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";>mKnse6/vk7Lz3Hl23m/Y5YQg3F8=</wsse:Password><wsse:Nonce>PT+fEBZWSTc1+ax9tTnaTg==</wsse:Nonce><wsu:Created>2008-02-18T09:36:32.392Z</wsu:Created></wsse:UsernameToken></wsse:Security><wsa:To>http://localhost:8280/soap/ESBQueueServiceProxy</wsa:To><wsa:ReplyTo><wsa:Address>http://192.168.88.1:8200/axis2/services/QueueService2737550</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:3648A6EE2346FB37891203327392146</wsa:MessageID><wsa:Action>urn:queueOperation1</wsa:Action></soapenv:Header><soapenv:Body><ns1:fromClientRequest xmlns:ns1="http://de/ibm/com/xsd/queue";><ns1:reqEl> World, hello to you!</ns1:reqEl></ns1:fromClientRequest></soapenv:Body></soapenv:Envelope> [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Checking post-conditions for phase "Security" [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() in Phase "Security" [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() for Handler 'Apache Rampart outflow handler' in Phase 'Security' [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() for Handler 'SecurityOutHandler' in Phase 'Security' [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() in Phase "MessageOut" [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() for Handler 'AddressingOutHandler' in Phase 'MessageOut' [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() in Phase "PolicyDetermination" [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() in Phase "RMPhase" [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() in Phase "OperationOutPhase" [DEBUG] [MessageContext: logID=urn:uuid:3648A6EE2346FB37891203327392287] Invoking flowComplete() in Phase "soapmonitorPhase"
[DEBUG] contentType from the OMOutputFormat =text/xml
[DEBUG] contentType returned =text/xml; charset=UTF-8
[DEBUG] start writeTo()
[DEBUG]   preserve=false
[DEBUG]   isOptimized=false
[DEBUG]   isDoingSWA=false
[DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
[DEBUG] end writeTo()
[DEBUG] >> "607[\r][\n]"
[DEBUG] >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header>[\n]" [DEBUG] >> "<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="Timestamp-14452459"><wsu:Created>2008-02-18T09:36:32.402Z</wsu:Created><wsu:Expires>2008-02-18T09:41:32.402Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="UsernameToken-15612583"><wsse:Username>bob</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";>mKnse6/vk7Lz3Hl23m/Y5YQg3F8=</wsse:Password><wsse:Nonce>PT+fEBZWSTc1+ax9tTnaTg==</wsse:Nonce><wsu:Created>2008-02-18T09:36:32.392Z</wsu:Created></wsse:UsernameToken></wsse:Security><wsa:To>http://localhost:8280/soap/ESBQueueServiceProxy</wsa:To><wsa:ReplyTo><wsa:Address>http://192.168.88.1:8200/axis2/services/QueueService2737550</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:3648A6EE2346FB37891203327392146</wsa:MessageID><wsa:Action>urn:queueOperation1</wsa:Action></soapenv:Header><soapenv:Body><ns1:fromClientRequest xmlns:ns1="http://de/ibm/com/xsd/queue";><ns1:reqEl> World, hello to you!</ns1:reqEl></ns1:fromClientRequest></soapenv:Body></soapenv:Envelope>"
[DEBUG] >> "[\r][\n]"
[DEBUG] >> "0"
[DEBUG] >> "[\r][\n]"
[DEBUG] >> "[\r][\n]"
[DEBUG] Did not find RequestResponseTransport cannot set response written

That´s it.
For sync operation I get following output:

[DEBUG] *********************** RampartSender sent out
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="Timestamp-7216620"><wsu:Created>2008-02-18T09:39:39.271Z</wsu:Created><wsu:Expires>2008-02-18T09:44:39.271Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="UsernameToken-4889213"><wsse:Username>bob</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";>tIIo/IgUirJ8zFf4YNYCkJBol0U=</wsse:Password><wsse:Nonce>bEx7btoHpLD+4ly6LPk+/g==</wsse:Nonce><wsu:Created>2008-02-18T09:39:39.261Z</wsu:Created></wsse:UsernameToken></wsse:Security><wsa:To>http://localhost:8280/soap/ESBQueueServiceProxy</wsa:To><wsa:MessageID>urn:uuid:188A1A629C7395DA9A1203327579045</wsa:MessageID><wsa:Action>urn:queueOperation1</wsa:Action></soapenv:Header><soapenv:Body><ns1:fromClientRequest xmlns:ns1="http://de/ibm/com/xsd/queue";><ns1:reqEl> World, hello to you!</ns1:reqEl></ns1:fromClientRequest></soapenv:Body></soapenv:Envelope> [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Checking post-conditions for phase "Security"
[DEBUG] contentType from the OMOutputFormat =text/xml
[DEBUG] contentType returned =text/xml; charset=UTF-8
[DEBUG] start writeTo()
[DEBUG]   preserve=false
[DEBUG]   isOptimized=false
[DEBUG]   isDoingSWA=false
[DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
[DEBUG] end writeTo()
[DEBUG] >> "594[\r][\n]"
[DEBUG] >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header>[\n]" [DEBUG] >> "<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="Timestamp-7216620"><wsu:Created>2008-02-18T09:39:39.271Z</wsu:Created><wsu:Expires>2008-02-18T09:44:39.271Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="UsernameToken-4889213"><wsse:Username>bob</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";>tIIo/IgUirJ8zFf4YNYCkJBol0U=</wsse:Password><wsse:Nonce>bEx7btoHpLD+4ly6LPk+/g==</wsse:Nonce><wsu:Created>2008-02-18T09:39:39.261Z</wsu:Created></wsse:UsernameToken></wsse:Security><wsa:To>http://localhost:8280/soap/ESBQueueServiceProxy</wsa:To><wsa:MessageID>urn:uuid:188A1A629C7395DA9A1203327579045</wsa:MessageID><wsa:Action>urn:queueOperation1</wsa:Action></soapenv:Header><soapenv:Body><ns1:fromClientRequest xmlns:ns1="http://de/ibm/com/xsd/queue";><ns1:reqEl> World, hello to you!</ns1:reqEl></ns1:fromClientRequest></soapenv:Body></soapenv:Envelope>"
[DEBUG] >> "[\r][\n]"
[DEBUG] >> "0"
[DEBUG] >> "[\r][\n]"
[DEBUG] >> "[\r][\n]"
[DEBUG] Did not find RequestResponseTransport cannot set response written

If I try to work in sync mode with a seperate Listener, I cannot get the response, too.
log from sync operation (without setting the useSeparateListener):

[DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() in Phase "Security" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() for Handler 'Apache Rampart outflow handler' in Phase 'Security' [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() for Handler 'SecurityOutHandler' in Phase 'Security' [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() in Phase "MessageOut" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() for Handler 'AddressingOutHandler' in Phase 'MessageOut' [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() in Phase "PolicyDetermination" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() in Phase "RMPhase" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() in Phase "OperationOutPhase" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579066] Invoking flowComplete() in Phase "soapmonitorPhase" [DEBUG] createSOAPEnvelope using Builder (class org.apache.axis2.builder.SOAPBuilder) selected from type (text/xml)
[DEBUG] << "1"
[DEBUG] << "2"
[DEBUG] << "f"
[DEBUG] << "[\r]"
[DEBUG] << "[\n]"
[DEBUG] << "<?xm"
[DEBUG] char set encoding set from default =UTF-8
[DEBUG] << "l version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><ns1:fromQueueResponse xmlns:ns1="http://de/ibm/com/xsd/queue";><ns1:respEl>from ibm World, hello to you!</ns1:respEl></ns1:fromQueueResponse></soapenv:Body></soapenv:Envelope>"
[DEBUG] XMLStreamReader is com.ctc.wstx.sr.ValidatingStreamReader
[DEBUG] Starting to process SOAP 1.1 message
[DEBUG] Build the OMElelment EnvelopeBy the StaxSOAPModelBuilder
[DEBUG] Build the OMElelment BodyBy the StaxSOAPModelBuilder
[DEBUG] Build the OMElelment fromQueueResponseBy the StaxSOAPModelBuilder [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579968] Checking pre-condition for Phase "Transport" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579968] Invoking phase "Transport" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579968] Invoking Handler 'RequestURIBasedDispatcher' in Phase 'Transport' [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579968] Invoking Handler 'SOAPActionBasedDispatcher' in Phase 'Transport' [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579968] Checking post-conditions for phase "Transport" [DEBUG] [MessageContext: logID=urn:uuid:188A1A629C7395DA9A1203327579968] Checking pre-condition for Phase "Addressing" [DEBUG] [MessageContext:





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



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

Reply via email to