none
Error while accessing a WCF REST service from iphone

    Question

  • Hi All, I have a WCF Rest service which gets a image file as a byte array[]. It works fine if the client is .net. if the client is iphone[objective c] it says the following error. The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation of WebContentTypeMapper for more details. The service has been hosted secure site in iis.Please help me to resolve the issue. my method is

    public string ImageData(byte[] imgfile) {

     long ll = imgfile.Length; byte[] dBytes = imgfile;

     Stream imgStream = new MemoryStream(dBytes, 0, dBytes.Length);

    Bitmap bmpImage = new Bitmap(imgStream);

     bmpImage.Save(@"C:\1.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg); return true; }

    Wednesday, September 29, 2010 10:30 AM

Answers