NetTalk Central

Author Topic: NetWebServiceMethod: Passing multiple records to insert  (Read 3502 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
NetWebServiceMethod: Passing multiple records to insert
« 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
« Last Edit: June 09, 2017, 01:25:20 AM by Thys »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: NetWebServiceMethod: Passing multiple records to insert
« Reply #1 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