0

I need to send a file attachment along with a SOAP message. I've managed to generate a working client using the Connected Service with WCF feature in Visual Studio, but I can't find any way to include my binary file data. I can't seem to be able to modify the SOAP payload myself at all.

Is this possible and how do I go about it?

Valyrion
  • 2,342
  • 9
  • 29
  • 60
  • Hi, May I know how is the issue going on now? – Theobald Du Feb 25 '21 at 02:46
  • @TheobaldDu I was ultimately unsuccessful in getting MTOM to work with the generated WCF code. I've also seen some indications that this might not even be fully supported in .net core. I had to resort to almost manually recreating the payload from scratch based on what SoapUI sent out and using a plain HttpRequest to send it. – Valyrion Feb 25 '21 at 08:11

1 Answers1

1

For adding binary file data attachments in SOAP messages, it is recommended to use MTOM.

SoapUI also supports specifying the file name inline to insert the binary content of the file into the message body.

Here are some references I found:Adding an attachment to SOAP request, SOAP Attachments and Files.

Theobald Du
  • 824
  • 4
  • 7