Hi Minuri, Thank you for the explanation. It works fine with DSS-3.5.1 beta.
I think it is better to add this in DSS documentation as well. (May be under subtopic "Sample data service configuration"[1] or under "Exposing Data as REST-Style Resources"[2] or wherever it suits in docs) Currently, the documentation explains only about path-params. I think it is better if there's at least one endpoint with query-params as well. (I suppose this can be included in a sample data service which is already there in DSS, like "ResourcesSample"). [1] https://docs.wso2.com/display/DSS350/Data+Services+and+Resources# DataServicesandResources-Sampledataserviceconfiguration [2] https://docs.wso2.com/display/DSS350/Exposing+Data+ as+REST-Style+Resources Thank you Best Regards, Madhawa On Wed, Aug 31, 2016 at 12:21 PM, Manuri Amaya Perera <[email protected]> wrote: > Hi Madhawa, > > You should be able to do this in latest DSS snapshot or you can you > DSS-3.5.1-beta. You need to have the resource config as below. > > <resource method="GET" path="product"> > <call-query href="getProductByCodeQuery"> > <with-param name="productCode" query-param="productCode"/> > </call-query> > </resource> > > Thanks, > Manuri > > On Tue, Aug 30, 2016 at 2:11 PM, Madhawa Perera <[email protected]> wrote: > >> Hi DSS team, >> >> When exposing data service as a set of REST style resources (in addition >> to the SOAP services) how do we define the resource path with query params? >> >> Example given below >> >> *Required style*: http://{ip address:port}/services/samples >> /ResourcesSample.HTTPEndpoint/product >> *?productCode=S10_4757&productStatus=new* >> >> Documentation explains how to do the configuration to set path params, >> but what is the procedure when defining a query param as shown in the above >> example. >> >> As per docs, to configure a resource path like; >> >> "http://{ip address:port}/services/samples/ResourcesSample.HTTPEndpoint/ >> product/S10_4757" >> >> following data service configuration can be used. >> >> *Data service configuration* >> >> <resource method="GET" path="product/{productCode}"> >> <call-query href="getProductByCodeQuery"> >> <with-param name="productCode" query-param="productCode"/> >> </call-query> >> </resource> >> >> Can we change the attribute "path", to accept query-params in resource >> path? >> >> Thank you >> Best Regards, >> Madhawa >> >> >> -- >> Madhawa Perera >> *Software Engineer* >> Mobile : +94 (0) 773655496 >> <%2B94%20%280%29%20773%20451194> >> [email protected] >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "WSO2 Engineering Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/a/wso2.com/d/optout. >> > > > > -- > > *Manuri Amaya Perera* > > *Software Engineer* > > *WSO2 Inc.* > > *Blog: http://manuriamayaperera.blogspot.com > <http://manuriamayaperera.blogspot.com>* > > > -- Madhawa Perera *Software Engineer* Mobile : +94 (0) 773655496 <%2B94%20%280%29%20773%20451194> [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
