I'm using a web service proxy with a method that accepts a byte[] as a parameter. The intent is to send an XML document via this byte[]. I'm trying to do it with the following code
MemoryStream byteStream = new MemoryStream()
XmlTextWriter xml = new XmlTextWriter(byteStream, System.Text.UTF8Encoding.UTF8)
.....write the doc....
xml.Flush()
xml.Close()
byte[] data = byteStream.getBuffer()
webServiceClass.webServiceMethod(data)
the call to webServiceMethod reports a deserialization exception, array index out of bounds
Any help?