NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Thys on June 09, 2017, 01:22:56 AM

Title: NetWebServiceMethod: Passing multiple records to insert
Post by: Thys on June 09, 2017, 01:22:56 AM
Hi,

I would like to add multiple records with one call. This is to ensure that a transaction frame can handle a single commit or rollback for all records. In the web method the payload is received in JSON (see attached) in the body with content type set to application/json. The parameter queue has a structure like below, with the parameter setup as in the second attachment.

When called, the parameter queue doesn't get populated. Should the JSON structure be changed?

AttributeValues QUEUE,PRE(AVQ)
AttributeValueNo  DECIMAL(19,0)
AttributeCode     CSTRING(11)
RequiredNo        LONG
ContextObjectNo   LONG
ContextInstanceRefNo CSTRING(101)
TargetObjectNo    LONG
TargetInstanceRefNo CSTRING(101)
Value             CSTRING(1001)
                END


Thanks
Thys
Title: Re: NetWebServiceMethod: Passing multiple records to insert
Post by: Bruce on June 12, 2017, 11:38:32 PM
I'd suggest just debugging the incoming json in the usual way.
If you want to, post an example, and I'll take a look.

cheers
Bruce