tags:

views:

28

answers:

1

I have an orchestration that calls a web service. The web service returns 2 arrays. One with log details and one with error messages.

I want to write those two to a file. I have tried different methods. But they all end up with

Exception thrown from: segment -1, progress -1 Inner exception: The XLANG/s message has no part at index '2'. The total number of parts found in the message is '2'. If you expect a multipart message, check that the pipeline supports multipart messages such as MIME.

I can not construct the web service´s return message in a Message Assignment. I guess what I have left is to do something in the message assignment control.

Any ideas?

+1  A: 

Many adapters don't really know how to deal with multi-part message.

You could always try an N-to-1 map that generates a new message with a single part and send that to the file adapter instead.

Alternatively, you could write a custom pipeline component that would generate a new single-part message out of the multi-part message you are sending.

tomasr
Thank you! I tried to write a custom pipeline but gave up after a while. I just solved it by writing a proxy web service that repacked the return values as a single string and it worked instantly. So I solved it the easy way - outside BizTalk! ;)