Hi, so I am trying to use the web service to fax PDF documents. I looked at the sample code provided here. I’m using the schedule.xml file provided. I am getting an error closing the request stream:
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close(); //Error received “Cannot close stream until all bytes are written”
Here’s what I am doing: I am opening this schedule.xml, in the <attachment> section, I am replacing the sample <content> tag with my content (which is the base 64 encoded string from my PDF document).
Now the sample code runs fine by itself. Once I swap it out with my the base 64 encoded string of my PDF, the error happens.
Any help, suggestions would be greatly appreciated!