What is the exception you are getting?

On Thu, Feb 20, 2014 at 3:21 PM, Mihil Ranathunga <mi...@wso2.com> wrote:

> Hi Chanika,
>
> Like you said i modified the query (but it worked just as well before)
>
> *query*
>
>   <query id="GetDeviceByID" useConfig="WSO2_HWDREPO_SERVICE">
>
>       <sql>select * from device where device_id=:device_id and device_id
> in (select assignment.device_id from assignment where
> assignment.employee_id=:emp_id)</sql>
>
>       <result element="BaseElement" rowName="Element">
>
>          <element column="device_id" name="device_id" xsdType="integer"/>
>
>
> ...........................................................................................................
>
>          <element column="serial_number" name="serial_number"
> xsdType="string"/>
>
>       </result>
>
>       <param name="device_id" sqlType="INTEGER"/>
>
>       <param name="emp_id" sqlType="STRING"/>
>
>    </query>
>
> *resource*
>
>   <resource method="GET" path="user/{emp_id}/devices/{device_id}">
>
>       <description>Get device details by providing id </description>
>
>       <call-query href="GetDeviceByID">
>
>          <with-param name="device_id" query-param="device_id"/>
>
>          <with-param name="emp_id" query-param="emp_id"/>
>
>       </call-query>
>
>    </resource>
>
> but this configuration gives the same error that was before when 
> *"http://xx.xxx.x.xx:9766/services/WSO2_HWDREPO_SERVICE/user/mi...@wso2.com/devices/210
> <http://xx.xxx.x.xx:9766/services/WSO2_HWDREPO_SERVICE/user/mi...@wso2.com/devices/210>"*is
>  called in the browser
>
> but resource path set to "user/devices/{emp_id}/{device_id}" and then
> calling
>
> *"http://xx.xxx.x.xx:9766/services/WSO2_HWDREPO_SERVICE/user/devices/mi...@wso2.com/210
> <http://xx.xxx.x.xx:9766/services/WSO2_HWDREPO_SERVICE/user/devices/mi...@wso2.com/210>"*works.
>  the problem seems to be in the url template in the resource path.
> any idea why?
>



-- 
Best Regards..

Chanika Geeganage
Software Engineer
WSO2, Inc.; http://wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to