Failed to serialize the message part “XXX” into the type “XX” using namespace “XXX”. Please ensure that the message part stream is created properly.

Failed to serialize the message part “XXX” into the type “XX” using namespace “XXX”. Please ensure that the message part stream is created properly.

You would have got this error while consuming a webservice and trying to send a message to that webservice.

Reason:

The request message that you have constructed does not really match the specification that is expected by the webservice. to put in simple words, the data types of 1 or many fields in the webservice is expecting a different value that is given value in the request message. Below are the list of items you can consider to re-construct your request message.

1. Some field in your webservice requires a integer field and you have passed a empty string in your request message.

2. Some field … requires a date field and you have passed a empty string or incorrect date format.

3. Some field … requires some enumeration value and you have not passed the right value.

There might be many more, but the base reason is the same.. your request message is not right and you will have to re-construct it. It might be really hard to this trial and error in BizTalk. So I would suggest using SOAP UI or an equivalent tool to first try sending a message and getting the response. If that is successfull, then we can try the same mapping in BizTalk.

Shankar

Leave a comment