私はWCFサービスを持っています。そのサービスでは、MessageContract 属性としてマークされたクラスを定義しました。
[MessageContract]
public class RemoteFileInfo : IDisposable
{
[MessageHeader(MustUnderstand = true)]
public string FileName;
[MessageHeader(MustUnderstand = true)]
public long Length;
[MessageHeader(MustUnderstand = true)]
public Picture Picture;
[MessageBodyMember(Order = 1)]
public System.IO.Stream FileByteStream;
public void Dispose()
{
if (FileByteStream != null)
{
FileByteStream.Close();
FileByteStream = null;
}
}
}
MessageHeader 属性とマークされたフィールドに問題があります。WPF アプリ (クライアント) ではすべてのフィールドが表示されますが、Windows Phone アプリでこのサービスを使用すると、MessageHeader とマークされたフィールドは表示されません。body フィールドのみが使用可能です。ヘッダーフィールドも利用できる可能性はありますか?