Kbase P65352: How to convert an X-DOCUMENT into a MEMPTR and put it into the document to ship to a WebService?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Unverified
GOAL:
How to convert an X-DOCUMENT into a MEMPTR and put it into the document to ship to a WebService?
FACT(s) (Environment):
OpenEdge 10.x
FIX:
Use code similar to the following:
hMyDocument:CREATE-NODE(hText,?,"TEXT").
/* embed the document as a text node */
CREATE ttblob.
COPY-LOB FROM pOrderDocument TO ttblob.BLOB.
COPY-LOB FROM ttblob.BLOB TO file "temp.txt" CONVERT TARGET BASE64.
COPY-LOB FROM FILE "temp.txt" TO lcOrderDocument.
hText:LONGCHAR-TO-NODE-VALUE(lcOrderDocument).
hNode:APPEND-CHILD(hText).