Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow NetTalk Web Serverarrow Web Server - Ask For Helparrow NetWebServiceMethod - how to return complex structure
NetTalk Central
October 19, 2017, 09:10:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: NetWebServiceMethod - how to return complex structure  (Read 114 times)
Thys
Full Member
***
Posts: 224



View Profile WWW Email
« on: September 01, 2017, 04:54:28 AM »

Hi,

I would like a method to return a combination of records that when combined serve a business purpose. It's like returning the content of a Clarion view in the response. The only indication in the documentation is to have two or more queue output parameters, which doesn't make it easy for the client app to consume. The documentation goes further to explain that it may be possible to have queue pointers within a queue - but that the explanation of how to do this might be too complex to understand, given that you need to use NEW and DISPOSE to manage memory. But I went the full way in doing this, but the response doesn't show the objects related to the queue pointers, only values. So this method doesn't seem to work although the documentation alludes to that it may be possible.

Is there any other way to have a complex response objects in a method, other than "flattening" it out to multiple output parameters?

Thys
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 8786



View Profile
« Reply #1 on: September 01, 2017, 08:41:59 AM »

Hi Thys,

I know I'm behind on examples at the moment, but generating complex data (as per the xFiles / jFiles docs) is working here. So Perhaps the best step to debugging is if you post an example of what you are doing and I can check it for you.

cheers
Bruce

Logged
Thys
Full Member
***
Posts: 224



View Profile WWW Email
« Reply #2 on: October 04, 2017, 01:09:39 AM »

Hi Bruce.

Attached is a small example app that shows the sub-queue values displayed as numbers. Please tell me what I'm doing wrong.

Thanks
Thys
Logged
Thys
Full Member
***
Posts: 224



View Profile WWW Email
« Reply #3 on: October 04, 2017, 11:56:32 PM »

Hi Bruce.

I worked through the Demo app in the jFiles example folder. I found that one of the tests read "if pName.GetValue() = 'Apaid'" and I think it must be "if pName.GetValue() = 'paid'". Then where the LineItems are added, the resultant JSON doesn't give the customary [ ] on the boundaries, but rather { }.

I still have to rework my example app in this thread. In the Demo app, the sub-sections are retrieved using a Clarion VIEW. In my example it's a Clarion QUEUE and I get different results from the VIEW. Still working on it...

Thys
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search