Hi Buddhimala, The reason for the issue seems to be, ESB is preserving the Content-Type header as the default behavior. Since GET request doesn't have a Content-Type, ESB sends application/x-www-form-urlencoded as the Content-Type to the backend which is the reason for this failure. To overcome this issue you can comment out the following parameter in the passthru-http.properties.
http.headers.preserve=Content-Type Thanks, Vijitha. On Fri, Nov 10, 2017 at 4:29 PM, Buddhimala Ranasinghe <[email protected]> wrote: > Hi All, > > Today I tried out "Enabling REST to SOAP" sample in ESB as per the > following wso2 document. > > https://docs.wso2.com/display/ESB500/Configuring+Specific+Use+Cases# > ConfiguringSpecificUseCases-EnablingRESTtoSOAP > > But when I tried to invoke the API using the curl command, I got following > error. > > <faultstring>The endpoint reference (EPR) for the Operation not found is > /services/SimpleStockQuoteService and the WSA Action = null. If this EPR > was previously reachable, please contact the server > administrator.</faultstring> > > And the axis2 server side it gave the following error. > > [2017-11-10 16:25:33,268] ERROR {org.apache.axis2.engine.AxisEngine} - > The endpoint reference (EPR) for the Operation not found is > /services/SimpleStockQuoteService > and the WSA Action = null. If this EPR was previously reachable, please > contact the server administrator. > org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation > not found is /services/SimpleStockQuoteService and the WSA Action = null. > If this EPR was previously reachable, please contact the server > administrator. > at org.apache.axis2.engine.DispatchPhase.checkPostConditions( > DispatchPhase.java:102) > at org.apache.axis2.engine.Phase.invoke(Phase.java:329) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167) > at org.apache.axis2.transport.http.util.RESTUtil. > invokeAxisEngine(RESTUtil.java:144) > at org.apache.axis2.transport.http.util.RESTUtil. > processXMLRequest(RESTUtil.java:89) > at org.apache.synapse.transport.nhttp.util.RESTUtil. > processPOSTRequest(RESTUtil.java:213) > at org.apache.synapse.transport.nhttp.ServerWorker. > processEntityEnclosingMethod(ServerWorker.java:468) > at org.apache.synapse.transport.nhttp.ServerWorker.run( > ServerWorker.java:291) > 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:748) > [2017-11-10 16:25:33,270] ERROR > {org.apache.synapse.transport.nhttp.ServerWorker} > - Error processing POST request > org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation > not found is /services/SimpleStockQuoteService and the WSA Action = null. > If this EPR was previously reachable, please contact the server > administrator. > at org.apache.axis2.engine.DispatchPhase.checkPostConditions( > DispatchPhase.java:102) > at org.apache.axis2.engine.Phase.invoke(Phase.java:329) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167) > at org.apache.axis2.transport.http.util.RESTUtil. > invokeAxisEngine(RESTUtil.java:144) > at org.apache.axis2.transport.http.util.RESTUtil. > processXMLRequest(RESTUtil.java:89) > at org.apache.synapse.transport.nhttp.util.RESTUtil. > processPOSTRequest(RESTUtil.java:213) > at org.apache.synapse.transport.nhttp.ServerWorker. > processEntityEnclosingMethod(ServerWorker.java:468) > at org.apache.synapse.transport.nhttp.ServerWorker.run( > ServerWorker.java:291) > 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:748) > > Please help to resolve. > > Regards, > Buddhimala > -- > > > *Buddhimala Ranasinghe* > Software Engineer-Support Team | WSO2 > Emil: [email protected] > Mobile:+94771563138 <+94%2077%20156%203138> > Web:http://wso2.com > [image: https://wso2.com/signature] <https://wso2.com/signature> > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Vijitha Ekanayake Senior Software Engineer*, *WSO2, Inc.; http://wso2.com/ Mobile : +94 777 24 73 39 | +94 718 74 44 08 lean.enterprise.middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
