Hi all,
I am having a problem. It is in deserializing a Mime document. The error I am getting is"The data at the root level is invalid."
The reply coming in on the wire looks like this�/span>
<body>
<RetrieveImageResponse>
<ScanData>
<xop:Include Href =”cid:1@body�gt;</xop:include>
</ScanData>
</RetrieveImageResponse>
</body>
�93c23400-1dd2-11b2-8d4e-e93374a1c48e
Content-Type: image/jfif
Content-Transfer-Encoding: binary
Content-ID: <1@body>
{my binary data}
Myservice contract looks like this ...
ServiceContract]
[XmlSerializerFormat]
public interface IHTTPContract
//RetrieveImageRequest
[
[OperationContract(Action = StringConst.WSDScanNamespace + "/RetrieveImage",
StringConst.WSDScanNamespace + "/RetrieveImageResponse")]
RetrieveImageResponseMessage RetrieveImage(RetrieveImageRequest IMGRequestObject);
My current Message Contract looks as follows
[MessageContract(IsWrapped = false)]
public class RetrieveImageResponseMessage
{
[MessageBodyMember(Name = "RetrieveImageResponse", Namespace = StringConst.WSDScanNamespace)]
public RetrieveImageResponseType RetrieveImageResponse;
}
[XmlRoot("RetrieveImageResponse", Namespace = StringConst.WSDScanNamespace)]
public class RetrieveImageResponsetype
{
[XmlElement("ScanData")]
public byte[] ScanData;
[XmlAnyElement]
public XmlElement[] AnyElements;
[XmlAnyAttributeAttribute()]
public XmlAttribute[] AnyAttributes;
}
I have rearanged this many different ways. I have used DataContracts. I have tried several combinations. All to no avail.
I can and have trapped the buffer lower in the stack and can deserialize the buffer my self so the data is there. WCF just has a problem with my message contract.
I need the Content-Type And the binary data. Any ideas?
Eric
E Schlosser