NetTalk Central

Author Topic: Webservice Question  (Read 4812 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Webservice Question
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Webservice Question
« Reply #1 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



osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Webservice Question
« Reply #2 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Webservice Question
« Reply #3 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


osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Webservice Question
« Reply #4 on: March 23, 2015, 03:05:27 AM »
i create another NetWebserviceMethod for a moment see image..

[attachment deleted by admin]

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Webservice Question
« Reply #5 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>

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Webservice Question
« Reply #6 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