WCF:Using MessageContract

The operation Calculate either has a parameter or a return type that is attributed with MessageContractAttribute.  In order to represent the request message using a Message Contract, the operation must have a single parameter attributed with MessageContractAttribute.  In order to represent the response message using a Message Contract, the operation's return value must be a type that is attributed with MessageContractAttribute and the operation may not have any out or ref parameters.

 

the operation must have a single parameter attributed with MessageContractAttribute, 看来只能有一个request message,并且用MessageContract属性,

否则用DataContract 属性来构造复杂类型

posted @ 2008-12-24 17:59  upzone  阅读(582)  评论(0编辑  收藏  举报