A little more information.

This is the XML I have:

<?xml version="1.0" encoding="UTF-8"?>
<ICNARC xmlns="http://tempuri.org/ICMPDSv3_1.xsd">
   <ADMISSION>
      <InpatientSpellidentifier>53352</InpatientSpellidentifier>
      <ACON>U</ACON>
      <ACSD>0</ACSD>
   </ADMISSION>
</ICNARC>

This is the class

Class pacIPM.reqICNARC Extends (%Persistent, %Populate, %XML.Adaptor)
{ 
Property InpatientSpellidentifier As %String;

Property ACON As %String;

Property ACSD As %String;
}

However, I am getting the following error when I enable the service.

ERROR #6232: Datatype validation failed for tag, ADMISSION (ending at line 3 character 13), with value:

Thanks both for your response. 

Marc I have tried the above but seem to now be getting another error

So this is what I currently have.

Parameter CHUNKSIZE = 2097144;

ClassMethod B64EncodeStream(pStream As %Stream.Object, pAddCRLF As %Boolean = 0) As %Stream.Object
{ set tEncodedStream=##class(%Stream.GlobalCharacter).%New()
    
    do pStream.Rewind()
    
    while ('pStream.AtEnd) {
        set tReadLen=..#CHUNKSIZE
        set tChunk=pStream.Read(.tReadLen)
        
        do tEncodedStream.Write($System.Encryption.Base64Encode(tChunk,'pAddCRLF))
        if (pAddCRLF && 'pStream.AtEnd) {
            do tEncodedStream.Write($c(13,10))
        }
    }
    
    do tEncodedStream.Rewind()
quit tEncodedStream
}
 

And then in my main piece of code:

set context.strDocumentEncoded = B64EncodeStream(request.streamPDF)

However, I am now getting an error: 

proDOCMAN BPL Error: 5002 : Cache error: <UNDEFINED>zS2+61^pacDOCMAN.proDOCMAN.Thread1.1 *B64EncodeStream(24@%Stream.GlobalBinary) (alert request ID=6809)