Question

I'm consuming a Java Web Service from my C# Application. I have to invoke a method and read results from SOAP attachment. For me it's first time with SOAP attachment.

I invoke my method successfully, but I have problems to read results.

I understand that I must use this object:

myWebService.ResponseSoapContext.Attachments[0].Stream

But I don't understand how to read the content. It's base-64 encoded?

Thx

Was it helpful?

Solution

Resolved...

                    Stream stream = ws.ResponseSoapContext.Attachments[0].Stream;    

                //XmlTextReader reader = new XmlTextReader(stream);

                StreamReader sr = new StreamReader(stream);

                wsXmlOutput = sr.ReadToEnd();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top