[Progress Communities] [Progress OpenEdge ABL] Forum Post: Sending XML data through a http request

Status
Not open for further replies.
A

Andrei Popa

Guest
Hi all, I'm having trouble sending XML data through a html POST request. The errors are: LogMgrWrtr [O.N.H.L.A.ABLSocketLibrary ERROR] EXTRACT ENTITY ERROR LogMgrWrtr Error(s) raised: LogMgrWrtr X-NODEREF or X-DOCUMENT LOAD got an error: FATAL ERROR: file 'MEMPTR', line '1', column '1', message 'invalid document structure'. (9082) (9082) LogMgrWrtr [O.N.H.L.A.ABLSocketLibrary ERROR] EXTRACT ENTITY: Response entity contains raw message body LogMgrWrtr [O.N.H.L.A.ABLSocketLibrary ERROR] EXTRACT ENTITY: Response Content-Type changed from application/xml to application/octet-stream An Progress.Lang.SysError has occurred: Invalid cast from OpenEdge.Core.Memptr to OpenEdge.Core.WidgetHandle. (12869) This is the code I am using to make the request: DEFINE VARIABLE lcXmlResponseData AS LONGCHAR NO-UNDO. DEFINE VARIABLE hXmlRequestData AS HANDLE NO-UNDO. DEFINE VARIABLE hXmlResponseData AS HANDLE NO-UNDO. DEFINE VARIABLE oXmlRequestData AS WidgetHandle NO-UNDO. DEFINE VARIABLE oXmlResponseData AS WidgetHandle NO-UNDO. DEFINE VARIABLE oHttpRequest AS IHttpRequest NO-UNDO. DEFINE VARIABLE oHttpResponse AS IHttpResponse NO-UNDO. CREATE X-DOCUMENT hXmlRequestData. hXmlRequestData:LOAD("LONGCHAR", , FALSE). oXmlRequestData = NEW WidgetHandle(hXmlRequestData). oHttpRequest = RequestBuilder:post(SessionManager:ExchangeServerURI, oXmlRequestData):ContentType("application/xml"):AcceptXml():Request. oHttpResponse = ClientBuilder:Build():Client:Execute(oHttpRequest). oXmlResponseData = CAST(oHttpResponse:Entity, WidgetHandle). hXmlResponseData = oXmlResponseData:Value. hXmlResponseData:SAVE("LONGCHAR", lcXmlResponseData). The XML data is: ... ... ... ... ... If I change the X-DOCUMENT:LOAD validation parameter to TRUE, I get the following error: An Progress.Lang.SysError has occurred: X-NODEREF or X-DOCUMENT LOAD got an error: 'no declaration found for element 'BulkLoad''. (9082) There is this KB article about the error, but there is no external XSD for which the validation should fail: Progress KB - XML validation against external XSD fails starting with OpenEdge 11.6 Best regards, Andrew

Continue reading...
 
Status
Not open for further replies.
Top