Error doing a POST request Omnis 8.1.3
Hi Kelly,
I don’t now how this happend but in the my code there is no such thing as het <…. <…./>>. Something happend there when I copy pasted it.
I’ve tried it with http in front but that still doesn’t work.
Anybody else some ideas?
Met vriendelijke groeten,
An Bayens
Product Manager
> Op 10 jan. 2018, om 11:47 heeft Kelly Burgess <kellyb@montana.com> het volgende geschreven:
>
> I’m just guessing, but when I see your code
>
>
>
> I wonder if you should try changing that one line to
>
> Calculate iURL as ‘xando.channelengine.net’
>
> leaving out the space and the repeated url in
>
> If that didn’t work, I’d add the leading ‘http://’
>
> Good luck,
>
> Kelly
Hi all,
I’m having a problem with Omnis 8.1.3 with doing a POST request in JSON. I get the error that the Java Native Interface couldn’t be initilalized.
This is what I do in my code:
Do method $BuildListHeader (‘POST’)
Calculate iURL as ‘xando.channelengine.net <xando.channelengine.net/>’
Calculate iURI as con(iURL,’/’,iAPIname,’?apikey=’,ivChannelEngineApiKey)
Do iRestfulObj.$init(iURI,kOWEBhttpMethodPost,iListHeaders,iContentBinary)
Do iRestfulObj.$run() Returns lStatus
If lStatus
Do iRestfulObj.$returnJSON(iResponseHeaders,iRowResponse,iRowJSON) Returns iJSONString
Calculate msg as con(iAPIname,’ ‘,iRowJSON.code,’ ‘,iRowJSON.object.$colcount)
Else
Calculate msg as iRestfulObj.$errortext
End If
If iRowResponse.httpStatusCode>=200&iRowResponse.httpStatusCode<=209
Calculate ok as kTrue
Else
Calculate msg as con(iAPIname,' ',iRowResponse.errorCode,' ',iRowResponse.errorInfo,' ',iRowResponse.httpStatusCode,' ',iRowResponse.httpStatusText)
Calculate ok as kFalse
End If
If iRowJSON.code<>‘200’
Do iListResponseCodes.$search($ref.C1=iRowJSON.code,kTrue,kFalse,kFalse,kFalse)
Calculate msg as con(iAPIname,’ ‘,iRowJSON.code,’ ‘,iListResponseCodes.description)
Calculate ok as kFalse
End If
Quit method ok
The result of the iRestfulObj.$run is an error which is Java Native Interface couldn’t be initilalized.
Thanks in advance.
Met vriendelijke groeten,
An Bayens
Product Manager
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com <lists.omnis-dev.com/>
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com