Sending Soap with Attachments (SwA) using BizTalk – Part 2

This is a continuation to my previous article.

Create a WCF service which can send the SOAP message with attachment.

1. Create a standard wcf service ( I guess this shouldnt be an issue )

2. Below is a very rough idea of what should go inside the service implementation

string endpoint = “”
ResponseObject resp = null;
using(var cf = new ChannelFactory<IService>(endpoint)
var channel = cf.CreateChannel();
using(var scope = new OperationContextScope(IContextChannel)channel))
OperationContext.Current.OutgoingMessageProperties[SWAEncoderConstants.AttachmentProperty] = attachment.ToSimpleXmlUTF8();
resp = channel.method(request).response;

I will write a detailed post with a sample implementation later.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s