NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on March 19, 2015, 07:06:57 AM

Title: Webservice Question
Post by: osquiabro on March 19, 2015, 07:06:57 AM
how i can configure webservice for find(get) for more than column?? example

http://localhost:88/CasosServiceCatastroCasos?numerocontrol=2012-00019

this is my primary key and work


http://localhost:88/CasosServiceCatastroCasos?NUMEROCATASTRO=157-000-001-56-000
with this parameter don't work
Title: Re: Webservice Question
Post by: Bruce on March 20, 2015, 02:50:40 AM
Hi Osa,

a) create a parameter for the service called NUMEROCATASTRO
b) For the RETURNS, where you have a VIEW, set the FILTER to something like

'fil:NUMEROCATASTRO = ' & NUMEROCATASTRO

Cheers
Bruce


Title: Re: Webservice Question
Post by: osquiabro on March 20, 2015, 05:02:51 AM
i create a filter but only search by a column in a filter, i need to search for multiples fields or combination of fields
thanks
Title: Re: Webservice Question
Post by: Bruce on March 22, 2015, 09:44:51 PM
Hi Osa,

If you want more fields then just add more fields.
ie more parameters and use those parameters in the filter.

For example, in the Web77 example, There's a Customers method which returns a range of customers. There are 2 parameters (FromID and ToID) and they are both used in the filter. You can make as many parameters as you like, and the filter as complicated as you like.

cheers
Bruce

Title: Re: Webservice Question
Post by: osquiabro on March 23, 2015, 03:05:27 AM
i create another NetWebserviceMethod for a moment see image..

[attachment deleted by admin]
Title: Re: Webservice Question
Post by: osquiabro on April 25, 2015, 08:52:17 AM
why example respose is duplicate detail??

Example Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<dbProduct_response xmlns="Database">
  <ProductDetails>
    <PRO_ID>value</PRO_ID>
    <PRO_NAME>value</PRO_NAME>
    <PRO_RRP>value</PRO_RRP>
  </ProductDetails>
  <ProductDetails>
    <PRO_ID>value</PRO_ID>
    <PRO_NAME>value</PRO_NAME>
    <PRO_RRP>value</PRO_RRP>
  </ProductDetails>
</dbProduct_response>
Title: Re: Webservice Question
Post by: Bruce on April 28, 2015, 02:09:19 AM
If you are returning a Table, Queue or View then the possibility exists for multiple records (and that is what the example is showing).
Of course in your code the filter may limit it to 1 record, but there's no way for the documentation to know that.

cheers
Bruce