Hi Vijitha, Thanks a lot for the clear explanation.
On Fri, Dec 18, 2015 at 11:43 PM, Vijitha Ekanayake <[email protected]> wrote: > Hi Anupama, > > We set *OUT_ONLY *property to "true" on a message to indicate that no > response message is expected for it once it is forwarded from the ESB. This > prevents the ESB from registering unnecessary callbacks for response > handling. > > One possible option to get sample working for client modes, We can check > the header value and change synapse configuration accordingly. We can > support for both types of operations by using config[1]. > > > [1]. > > <?xml version="1.0" encoding="UTF-8"?><proxy > xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy" > transports="https,http" statistics="disable" trace="disable" > startOnLoad="true"> > <target> > <inSequence> > <filter xmlns:wsa="http://www.w3.org/2005/08/addressing" > source="$header/wsa:Action" regex="urn:placeOrder"> > <then> > <property name="OUT_ONLY" value="true" scope="default" > type="STRING" /> > </then> > </filter> > </inSequence> > <outSequence> > <send /> > </outSequence> > <endpoint> > <address > uri="http://localhost:9000/services/SimpleStockQuoteService" /> > </endpoint> > </target> > <publishWSDL > uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl" /> > <description /></proxy> > > > Thanks, > > Vijitha. > > > On Fri, Dec 18, 2015 at 6:00 PM, Anupama Pathirage <[email protected]> > wrote: > >> >> 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 >> >> > > > -- > Vijitha Ekanayake > Software Engineer*, *WSO2, Inc.; http://wso2.com/ > Mobile : +94 777 24 73 39 | +94 718 74 44 08 > lean.enterprise.middleware > -- Anupama Pathirage Associate Technical Lead WSO2, Inc. http://wso2.com/ Email: [email protected] Mobile:+94 71 8273 979 Blog:http://mycodeideas.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
