请帮忙 我有正确的编码临床文件到基地64并将其发送到文档对象的问题。 这是我正在使用的代码。编码base64在C#解码在Java
1.step我编码的PDF文件为Base64
byte[] bytes = System.IO.File.ReadAllBytes(pdffile);
return Convert.ToBase64String(bytes);
此字符串连接到临床documet
2.Attaching CDA文档元数据提交的要求
byte[] bytes = System.IO.File.ReadAllBytes(CDADocument.xml);
string ReturnValue = Convert.ToBase64String(bytes);
byte[] newbyte = System.Text.Encoding.UTF8.GetBytes(ReturnValue);
doc[0].Value = newbyte;
提交请求传递所有的步骤,但解码不起作用。 他们使用Java API来解码提交请求。 感谢您的帮助
什么是*临床文件*? –
明显的问题......如果'.Value'是'byte []',为什么不直接给它'bytes'而不是base-64和utf-8呢? –
我不能使用字节,因为我必须先编码为base64.Base64 returs字符串,但值参数期望字节 – juliak