You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Kishanthan Thangarajah <ks...@gmail.com> on 2012/02/18 06:09:49 UTC

REST functionality is broken in current trunk

Hi All,

I find that REST functionality is not working in current trunk. I tried a
sample with a wsdl2 where I define whttp:location in HttpBinding to access
the service operations. But im getting EPR not found for service operation
error in the response. Attached is the sample I used. This sample has two
operations, update and getPrice.

According to WSDL 2.0 specification we can control the URL's using the
whttp:location in HttpBinding. In the sample, I have defined whttp:location
for �getPrice� operation as whttp:location="price/{symbol}".

When accessing
http://localhost:8080/axis2/services/StockQuoteService/getPrice?symbol=IBM it
works without any issues.
But when I access
http://localhost:8080/axis2/services/StockQuoteService/price/IBM, I'm
getting following exception'

"The endpoint reference (EPR) for the Operation not found is
/axis2/services/StockQuoteService/price/IBM and the WSA Action = null"

After reading this tutorial [1], I tried the attached sample on Axis2
1.4.1. The above works without any errors in there. So I think the problem
is in current trunk.

With some debugging in HTTPLocationBasedDispatcher i found that the
AxisEndpoint, which is used to get the axisOperation from httpLocation, is
missing in the messageContext. Comparing it with axis2-1.4.1, i found that
this endPoint is set to msgContext in the RequestURIBasedServiceDispatcher
first (using inferEndpoint method) and then used in the
HTTPLocationBasedDispatcher to get the axisOperation. This part is missing
in current trunk(in RequestURIBasedServiceDispatcher). Based on these
findings, i have provided a fix [2].

Thanks,
Kishanthan.

[1] http://wso2.org/library/3726
[2] https://issues.apache.org/jira/browse/AXIS2-5247