I am having a hard time trying to figure out the following...
Within a DTC, I was able to take the a EnsLib.HL7.Message source and using
set a= $System.Encryption.Base64Encode(source.RawContent)
set encodedMessage=$Get(a)
to take the HL7 message encode it and add it to the Data Class as a string to be sent to an Operation to be sent out as a SOAP Request.
However to make it more universal I tried doing this within a copy of EnsLib.HL7.SOAPOperation
Method SendMessage(pMsgOut As EnsLib.HL7.Message, Output pMsgIn As EnsLib.HL7.Message, pExpectedSequenceNumber As %String) As %Status
{
Set tSourceId=$Piece(pMsgOut.Source,$C(13))
set CBORDRequest = ##class(osuwmc.Nutrition.OSU.CBOARDNetMenuRequest.SendMessageRequest).%New()
set a = $SYSTEM.Encryption.Base64Encode((pMsgOut.RawContent))
set CBORDRequest.key = ..APIKey
set CBORDRequest.encodedMessage = $Get(a).....
I keep getting the following message from the SOAP response
ERROR #6248: SOAP response is a SOAP fault: <Fault><Code><Value>S:Receiver</Value></Code><Reason><Text xml:lang="en">Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value</Text></Reason></Fault>
When I enable ^ISCSOAP, I am seeing the following...
Could someone explain what I might be doing wrong?