TOMMY WANG
TOMMY WANG

Reputation: 1402

Create a wcf receive location for receiving zip file

We are to create a generic wcf receive location, it has to be so generic that it pretty much just like the file adapter just take in whatever it receives and delivers to message box, i.e. it should allow the client to submit a zip file, a flat file, or any xml, I am confused how to implement this, I can only think of to define the schema to have xsd:any child, but will it works for the zip file?

Thanks so much in advance

Upvotes: 0

Views: 472

Answers (1)

Brett
Brett

Reputation: 1127

There are two possible way to perform separate message "unwrapping" within a single location. With either of these, you will need to either build, buy, or borrow a custom pipeline component for the unzipping, as this is not standard BizTalk functionality. The following pipeline component uses an open source zip library: http://www.codeproject.com/Articles/12867/UnzipDisassembler-A-custom-pipeline-component-for

You can now either create a custom pipeline that contains the unzip disassembler, the flat-file disassembler, and an Xml disassembler, all in the disassemble stage of the pipeline. This should be able to pick up and unwrap either type of file.

A better suggestion though, would be to use 3 distinct receive locations, all connected to the same receive port, using a separate file-mask filter (".zip", ".csv", "*.xml") to determine which file to pickup, and process. This is more efficient, and simpler to enhance if you need to add different file types later on.

Upvotes: 2

Related Questions