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.
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.
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.
Thanks, Ruwan Jens Goldhammer wrote:
Hello Ruwan,I have opened a JIRA issuse. http://issues.apache.org/jira/browse/SYNAPSE-241I 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 writtenThat´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 writtenIf 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:
synapse-core-1.2-002.jar
Description: application/java-archive
<?xml version="1.0" encoding="UTF-8"?> <syn:definitions xmlns:syn="http://ws.apache.org/ns/synapse"> <syn:registry provider="org.wso2.esb.registry.ESBRegistry"> <syn:parameter name="root">file:registry/</syn:parameter> </syn:registry> <syn:proxy name="ESBQueueServiceProxy" transports="http" startOnLoad="true" statistics="enable" trace="enable"> <syn:target> <syn:inSequence> <syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="reply-to" expression="get-property('ReplyTo')"/> <syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="message-id" expression="get-property('MessageID')"/> <syn:log level="full"> <syn:property name="Text" value="Request Received ====>> "/> <syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="SAVED REPLY-TO : " expression="get-property('reply-to')"/> <syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="SAVED MESSAGE-ID : " expression="get-property('message-id')"/> </syn:log> <syn:send> <syn:endpoint> <syn:address uri="http://10.100.1.152:9762/services/QueueService"> <syn:enableAddressing/> </syn:address> </syn:endpoint> </syn:send> <syn:property name="RESPONSE" value="true"/> <syn:property name="SC_ACCEPTED" value="true" scope="axis2"/> <syn:header name="To" action="remove"/> <syn:send/> </syn:inSequence> <syn:outSequence> <syn:header xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="To" expression="get-property('reply-to')"/> <syn:header name="RelatesTo" action="remove"/> <syn:header xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="RelatesTo" expression="get-property('message-id')"/> <syn:log level="full"> <syn:property name="Text" value="Response being sent ====>> "/> <syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="TO" expression="get-property('To')"/> <syn:property xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="RELATES-TO" expression="get-property('message-id')"/> </syn:log> <syn:send/> </syn:outSequence> </syn:target> </syn:proxy> <syn:sequence name="main"> <syn:log separator=","/> <syn:iterate xmlns:ns1="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" preservePayload="true" attachPath="//SendMessageRequest" expression="//SendMessageRequest/Message"> <syn:target sequence="iterated"/> </syn:iterate> </syn:sequence> <syn:sequence name="fault"> <syn:log/> </syn:sequence> <syn:sequence name="iterated"> <syn:log level="full" separator=","/> </syn:sequence> </syn:definitions>
_______________________________________________ Esb-java-user mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user
