NT11.04, Clarion 11
After reading the docs :-) I added a Sync procedure, using the Wizard, and then tried adding a SyncAccounts procedure using ServerWebServiceMethodWizard. The generated code for CheckForToken is missing information. I went through the wizard a few times to make sure I wasn't missing anything and then went trough the "Actions" tab to see if anything obvious was missing. Below is the generated code. You can see that the ExistsValue('') and GetValue('') are missing information. There is a line where the left side of the = is missing. Is there something I need to add to a setting or is this a bug?
CheckForToken routine
! Start of "Start of CheckForToken Routine"
! [Priority 5000]
! End of "Start of CheckForToken Routine"
! before getting started check to see if there is a token for the session ID
If p_web.xml = 0 and p_web.json = 0 ! incoming parameters are just url encoded, either in the URL, or as post data, or as a cookie.
If p_web.IfExistsValue('') then = p_web.GetValue('').
ElsIf p_web.xml = 1
Clear()
= strxml.between(p_web.Nocolon(lower('<token>'),Net:SingleUnderscore+Net:NoSpaces),p_web.Nocolon(lower('</token>'),Net:SingleUnderscore+Net:NoSpaces))
ElsIf p_web.json = 1
json.Start()
json.RemovePrefix = false ! token field won't be in a structure, so no concept of prefix, so no need to remove it.
json.ReplaceColons = true
json.ReplacementChars = '_'
strjson.SetValue(p_web.GetValue('_json_'))
json.SetTagCase(jf:CaseLower)
if json.LoadString(strjson) = jf:ok
Clear()
= json.GetPropertyValue('token',1)
Else ! jf:error
p_web.AddServiceError(Error:InvalidJson,'SyncAccounts', '', json.error,'Review JSON data and correct it.')
End
End
if
p_web.SessionID =
p_web.TouchSession()
end