NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Wolfgang Orth on November 03, 2014, 03:56:12 AM
-
Hello again,
another question....
The Web77 example has the SOAPACTION stored ina GROUP.
Does it mandatory have to be a GROUP?
Action_Group GROUP
Customer_Action STRING(20)
END
The table, which will be written to, has also the name CUSTOMER.
In the "AutoService:<filename> ROUTINE" I see that the server seems to expect a Value names "LOWER(<filename>_Action)". Those variable are all declared in source by the template.
As I have several NetWebServerMethods on several Tables, I then would need
Customer_Action
Product_Action
Employee_Action
whatever_Action each?
However, when I add them all to a GROUP, the server then every whatever_Action, none execpt one is needed.
! End of "Start of AutoService: Routine"
case lower(<filename>_Action)
of 'insert'
orof 'add'
! Start of "Before Insert AutoService: Routine"
! [Priority 4000]
dbgView('AutoService:<filename> We just received ' & records(q:<filename>) & ' Records in records(q:<filename>) from Client ')
! End of "Before Insert AutoService: Routine"
Loop x = 1 to records(q:<filename>)
get(q:<filename>,x)
do InsertRecord:<filename>
end
of 'update'
...... etc
I assume, that everything you do, Bruce, has some deeper reason. So - what is the reason behind this stuffing into a GROUP?
Or can we have simple local (global?) variables for each action, adding them as a STRING to the Parameters, without causing harm?
Thanks so far,
Wolfgang
-
>> The Web77 example has the SOAPACTION stored in a GROUP.
where?
I'm not seeing that myself....
cheers
Bruce
-
see this screenshot from the DataPad of Client.APP in WebServiceRequiresXFiles (77)
[attachment deleted by admin]
-
Bruce,
I got it now.....
You made it a GROUP, because you can easily append it value into the XML.
xml.append = 1
xml.DontCloseTags = 1
Inventory_Action = 'insert'
xml.save(InventoryAction_Group,'','')
My solution is now to have one Action_Group per Table / Method.
However..... XML is case-sensitive.....
The Client sends INVENTORY_ACTION, while the Server expects AsIs-CASE: p_web.Nocolon('<Inventory_Action>
Clear(InventoryAction_Action)
InventoryAction_Action = strxml.between(p_web.Nocolon('<Inventory_Action>',
Net:SingleUnderscore+Net:NoSpaces),
p_web.Nocolon('</Inventory_Action>',
Net:SingleUnderscore+Net:NoSpaces)
)
My workaround is to repeat that particular line inthe next embed, but with p_web.Nocolon('<INVENTORY_ACTION>) etc.
For now it works.
If this is not changeable, because ot the nature of XML, you may add a note into the manual.
bye
Wolfgang