Hi team,

I get the following exception when I run the Sample 150 (Introduction to
Proxy Services) in the WSO2 ESB 4.9.0 as mentioned in the [1
<https://docs.wso2.com/display/ESB490/Sample+150%3A+Introduction+to+Proxy+Services>]
with the client mode "placeorder" even though the order is placed correctly
in the back end service.

*Client Command used:*
ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy
-Dmode=placeorder -Dsymbol=MSFT

*ESB Exception:*
[2015-12-18 17:00:04,072] ERROR - NativeWorkerPool Uncaught exception
java.lang.UnsupportedOperationException: An access occurred that is not
valid.
    at
org.apache.axis2.description.InOnlyAxisOperation.getMessage(InOnlyAxisOperation.java:117)
    at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:299)
    at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:247)
    at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Since “PlaceOrder” is a method which does not return anything as a response
for a request, it was possible to avoid this exception by setting the
property OUT_ONLY for the in sequence as follows [2
<https://docs.wso2.com/display/ESB403/Generic+Properties>].

<inSequence>
    <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
</inSequence>

But this make the other client modes such as "quote" not working because it
is trying to send a request which expects a response through an OUT_ONLY
proxy which must be wrong in theoretically. So can you please let me know
the proper way of handling above ESB exception while providing the support
for both types of operations.


[1]
https://docs.wso2.com/display/ESB490/Sample+150%3A+Introduction+to+Proxy+Services
[2] https://docs.wso2.com/display/ESB403/Generic+Properties

Thanks and Regards,
-- 
Anupama Pathirage
Associate Technical Lead
WSO2, Inc.  http://wso2.com/
Email: [email protected]
Mobile:+94 71 8273 979
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to