# RXS_GetComposeBuffer()

Retrieves the current composition engine buffer into a variable. The buffer is cleared upon successful retreival.

## Subprocedure Prototype

### IBM i 7.1+

```rpgle
      // Returns the current contents of the compose engine buffer.
     D RXS_GetComposeBuffer...
     D                 PR                  Extproc('RXS_GetComposeBuffer')
     D                                     Opdesc Like(RXS_Var16Mv_t)
     D                                     Rtnparm
```


### IBM i 6.1

```rpgle
     D RXS_GetComposeBuffer...
     D                 PR                  Extproc('RXS_GetComposeBuffer')
     D                                     Opdesc

      // Holds the current contents of the compose engine buffer.
     D   Buffer                            Like(RXS_Var16Mv_t) Options(*Varsize)
```


## Example Code

### IBM i 7.1+

#### Example 1
```rpgle
      *--------------------------------------------------------------
      * This example code retrieves the composition engine buffer and stores it in the field gXmlRequest.
      *  This process might be used when calling a web service.
      *--------------------------------------------------------------
     H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

      /copy QRPGLECPY,RXSCB

     D gXmlRequest     S                   Like(RXS_Var64Kv_t)
      /free 
       gXmlRequest = RXS_GetComposeBuffer();

       *INLR = *ON;
      /end-free
```

### IBM i 6.1

#### Example 1
```rpgle
      *--------------------------------------------------------------
      * This example code retrieves the composition engine buffer and stores it in the field gXmlRequest.
      *  This process might be used when calling a web service.
      *--------------------------------------------------------------
     H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

      /define RXSV6R1
      /copy QRPGLECPY,RXSCB

     D gXmlRequest     S                   Like(RXS_Var64Kv_t)
      /free 
       RXS_GetComposeBuffer( gXmlRequest );

       *INLR = *ON;
      /end-free
```
