[progress Communities] [progress Openedge Abl] Forum Post: Re: Businessentity - Response...

  • Thread starter Thread starter jts-law
  • Start date Start date
Status
Not open for further replies.
J

jts-law

Guest
Maura, Since I'm using a WebHandler I thought I'd run through another quick test using a standard ABL Rest service to try to duplicate my issue before opening a case. What I found is that the ABL Rest service did return the prods:clientId correctly. Any thoughts on what I might need to add to my WebHandler in order to return this field? The following is the overview of how my WebHandler works for this object: CONSTRUCTOR PUBLIC myWebHandler ( ): ... oGLGroupBE = NEW GLGroupBE(). END CONSTRUCTOR. METHOD OVERRIDE PROTECTED INTEGER HandlePut( INPUT poRequest AS OpenEdge.Web.IWebRequest ): DEF VAR oResponse AS OpenEdge.Net.HTTP.IHttpResponse NO-UNDO. oResponse = NEW OpenEdge.Web.WebResponse(). oResponse:StatusCode = INTEGER(StatusCodeEnum:OK). IF poRequest:PathInfo BEGINS "/GLGroup" THEN GLGroupPut(poRequest, INPUT-OUTPUT oResponse, OUTPUT lcBody). ELSE IF... oResponse:ContentLength = LENGTH(lcBody). oWriter = NEW WebResponseWriter(oResponse). oWriter:Open(). oWriter:Write(lcBody). oWriter:Close(). RETURN 0. END METHOD. METHOD PROTECTED VOID GLGroupPut( INPUT poRequest AS OpenEdge.Web.IWebRequest, INPUT-OUTPUT poResponse AS OpenEdge.Net.HTTP.IHttpResponse, OUTPUT plcBody AS LONGCHAR ): DATASET dsGLGroup:READ-JSON("JsonObject", poRequest:Entity, "EMPTY"). oGLGroupBE:SubmitGLGroupBE(INPUT-OUTPUT DATASET dsGLGroup). DATASET dsGLGroup:WRITE-JSON ("LONGCHAR", plcBody, TRUE, ?, FALSE, FALSE, TRUE). poResponse:ContentType = "application/json". END METHOD. Thanks, Louis

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