Node.js and field names as input to ipgm.js and xmlservice

Issue #8 closed
Magne Kofoed created an issue

Is it possible to put field names into ipgm.js (and xmlservice) and get the field names in the response? Both single variable names and field names in datastructures. I want to have the field names in the response from xmlservice in order to create a better json response.

Comments (4)

  1. Former user Account Deleted

    Unhelpful part ... xmlservice is not the problem ... 'names' are not a restriction in XMLSERVICE. That is, any added 'attribute' to xml comes back out ...

    <pgm name='ZZCALL'>
     <parm><data type='1A' var='myname' feild='myname'>a</data></parm>
     <parm>
      <ds var='myds' feild='myds'>
    :
    

    Helpful part ... the real issue is this particular node toolkit, which has an abbreviated idea of conversion from XML to JSON.

    So, real question should be ...

    Q: Can we change the 'interface' of the node Toolkit to allow additional 'user attributes' that return in json.

    A: Maybe. However any change to an existing interface may affect current node scripts.

  2. Aaron Bartell

    A: Maybe. However any change to an existing interface may affect current node scripts.

    Should be able to add it to the "options" portion of the call without disrupting existing API signatures. But as Tony declares, this needs to be documented as an issue on the nodejs-itoolkit repo.

  3. Log in to comment