WCF MessageContract属性未显示在WSDL中

MessageContract为了Stream通过WCF与其他一些数据一起传输,我定义了一个:


[MessageContract]

public class DTSetGeotagImageMessage

{

    [MessageHeader(MustUnderstand = true)]

    public DTGeotagImageFileInfo GeotagImageFileInfo;


    [MessageBodyMember(Order = 1)]

    public Stream FileData;

}


public class DTGeotagImageFileInfo

{ //All these properties are not showing up in the WSDL:

    public long? GeotagID { get; internal set; }

    public string GeotagGuid { get; internal set; }

    public string ImageGuid { get; internal set; }

    public long GeotagFieldId { get; internal set; }

    public double Lat { get; internal set; }

    public double Lon { get; internal set; }

}

WSDL:


<xs:complexType name="DTGeotagImageFileInfo">

 <xs:sequence/>

</xs:complexType>

<xs:element name="DTGeotagImageFileInfo" nillable="true" type="tns:DTGeotagImageFileInfo"/>

但是标头数据类的属性未显示在WSDL文件中。如何让他们出现?


浮云间
浏览 172回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP