0
我正在使用以下代码从SOAP服务下载PDF。它工作正常,但不是PDF文件中的内容,所有页面都是空白的。从soap web服务下载PDF
string path = Request.PhysicalApplicationPath + "request.txt";
string response = HttpSOAPRequest(GetRequestXML(path), null, "https://soap.service", "http://tempuri.org/retrieveContract");
string[] seperator = new string[] {"--MIME_Boundary"};
string[] splitRes = response.Split(seperator, StringSplitOptions.RemoveEmptyEntries);
string xx = splitRes[1];
byte[] final = Encoding.UTF8.GetBytes(xx.Trim());
具有与soap服务重新创建页数相同的PDF被创建 - 但所有页面都是空白的。
请建议,发生了什么问题。
它没有工作更换的最后一行。而是给出了以下错误:输入不是有效的Base-64字符串,因为它包含非基本64字符,多于两个填充字符或填充字符中的非法字符。异常详细信息:System.FormatException: – iomca4u