Unwrapping Message Contracts in Client Proxies

Topics: Service Factory Modeling Edition Forum
Jun 20, 2008 at 11:03 PM
Hi there,

All our multi-part message contracts have IsWrapped=true as required by the WSSF validation step. We are using svcutil to generate client proxies. Svcutil does not unwrap the parts of the message contracts as we expected but generates a data contract with the same name as the WSSF message contract and a message contract with "1" appended. For example the CopyOrder operation contract has CopyOrderRequest as an input message contract. The proxy generates a data contract called CopyOrder, a message contract called CopyOrder1 and a client proxy with CopyOrder function taking CopyOrder (the data contract) as input.

Single part message contracts are unwrapped as we would expect.

The generated proxy file contains a header of the forrm "CODGEN: Generating message contract since XXX is not message wrapped or in RPC format" (not the exact working but I'm sure it will be familiar to many of you).

Researching this on the web has pointed in a number of directions but nothing complete enough.

So, 2 questions:
  1. Does anynone know or can point me towards the exact set of rules needed to cause svcutil to unwrap message contracts?
  2. Can someone from the WSSF team describe the exact steps one would use to define a message contract that should unwrap correctly?

Thanks in advance

Jun 23, 2008 at 10:20 PM

Hi stephen, please take a look to the this post which may be useful in your scenario (specially the second post): http://www.codeplex.com/servicefactory/Thread/View.aspx?ThreadId=21981.  If that didn't help, can you please provide some code samples of  the output that you are getting from the svcutil and what exactly are you looking forward to obtain instead? In addition, it could be good to know how the Message Contract elements look like in your Service model.

Thanks


stephenr092562 wrote:
Hi there,

All our multi-part message contracts have IsWrapped=true as required by the WSSF validation step. We are using svcutil to generate client proxies. Svcutil does not unwrap the parts of the message contracts as we expected but generates a data contract with the same name as the WSSF message contract and a message contract with "1" appended. For example the CopyOrder operation contract has CopyOrderRequest as an input message contract. The proxy generates a data contract called CopyOrder, a message contract called CopyOrder1 and a client proxy with CopyOrder function taking CopyOrder (the data contract) as input.

Single part message contracts are unwrapped as we would expect.

The generated proxy file contains a header of the forrm "CODGEN: Generating message contract since XXX is not message wrapped or in RPC format" (not the exact working but I'm sure it will be familiar to many of you).

Researching this on the web has pointed in a number of directions but nothing complete enough.

So, 2 questions:
  1. Does anynone know or can point me towards the exact set of rules needed to cause svcutil to unwrap message contracts?
  2. Can someone from the WSSF team describe the exact steps one would use to define a message contract that should unwrap correctly?

Thanks in advance




Jun 26, 2008 at 5:50 PM
Thanks for the link it provided what looks like the answer. Our standard is that our response message contracts have a single part. This means the client proxy will return the part as the return value (if you have multiple parts the additional ones are mapped to out parameters in the signature). Since the response objects were single part message contracts they had IsWrapped = false. Setting this to true appears to be causing the proxy to be generated the way we need it.

Thanks again!