Hi Tijs

Thanks for your very fast reply and fix!
  
You are welcome!
The fire and forget MEP now works.
I have one comment at this moment. Because of the action value error of the previous version I think the error handling of the fire and forget MEP does not work correctly. When an error occurs in the web service (for example the exception that the action mapping can not be found), I think this error should be logged within Synapse. Now I could only retrieve the error in a request/response MEP. In the fire and forget MEP the error just is not logged anywhere.
  
The ServiceClient.fireAndForget() API on your client side will not return you an error as the message is successfully delivered to Synapse. (See http://ws.apache.org/axis2/1_1/api/org/apache/axis2/client/ServiceClient.html#fireAndForget(org.apache.axiom.om.OMElement - i.e. it will only return you errors such as host not found...)

However, if Synapse receives an error message from a back-end server (such as the Axis2 instance with example #1) you can log this message (i.e. the SOAP fault) at Synapse using the Log mediator. Although Synapse will try to send this back to the client, the client will not accept/process this reply. Hence I think that the current operation is correct from both the Synapse point of view and the fireAndForget() API call....

I tried example #1 with  the 'ant placeorder' client but without deploying the SimpleStockQuoteService on the Axis2 instance.. Here is the trace

Synapse received the request from the client
[HttpConnection-8080-1] DEBUG SynapseMessageReceiver - Synapse received a new message...
[HttpConnection-8080-1] DEBUG SynapseMessageReceiver - Received To: /StockQuote
[HttpConnection-8080-1] DEBUG SynapseMessageReceiver - SOAPAction: urn:placeOrder
[HttpConnection-8080-1] DEBUG SynapseMessageReceiver - Body :
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope..<m0:symbol>IBM</m0:symbol></m0:order></m0:placeOrder></soapenv:Body></soapenv:Envelope>
[HttpConnection-8080-1] DEBUG SynapseMediator - Synapse main mediator :: mediate()
....
[HttpConnection-8080-1] DEBUG SendMediator - Sending To: http://localhost:9000/axis2/services/SimpleStockQuoteService
[HttpConnection-8080-1] DEBUG SendMediator - SOAPAction: urn:placeOrder
[HttpConnection-8080-1] DEBUG SendMediator - Body :
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope...<m0:symbol>IBM</m0:symbol></m0:order></m0:placeOrder></soapenv:Body></soapenv:Envelope>
and sent it to the specified endpoint
[HttpConnection-8080-1] DEBUG Axis2FlexibleMEPClient - sending [add = false] [sec = false] [ rm = false] [ to Address: http://localhost:9000/axis2/services/SimpleStockQuoteService]
It receives a SOAP fault from the Axis2 server that the service cannot be found
[HttpConnection-8080-1] DEBUG SynapseMediator - Synapse main mediator :: mediate()
....
Its trying to send this back to the client now...
[HttpConnection-8080-1] DEBUG SendMediator - Sending To: null
[HttpConnection-8080-1] DEBUG SendMediator - SOAPAction: urn:placeOrder
[HttpConnection-8080-1] DEBUG SendMediator - Body :
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Service not found operation terminated !!</faultstring><detail><Exception>org.apache.axis2.AxisFault: Service not found operation terminated....</Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

If you execute the client call to Synapse through TCPMon you will notice that a HTTP 200 message with the error was sent back to the client by Synapse, but was ignored at the client end - as expected.

thanks
asankha



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to