<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<DownloadFaxDocResponse xmlns="http://tempuri.org/">
<DownloadFaxDocResult>
<FileDownload xmlns="" />
</DownloadFaxDocResult>
</DownloadFaxDocResponse>
</soap:Body>
</soap:Envelope>
The documentation says that I am to get a base64 encoded TIF/PNG file. I don't see anything. Does this mean something wrong with my web service call?
The docu开发者_StackOverflow社区mentation is at:
http://glostream.faxregistration.com/sfaxapi.asmx?op=DownloadFaxDoc
And this is my header code:
//---set the headers---
NSString *msgLength = [NSString stringWithFormat:@"%d", [xmlString length]];
[request addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[request addValue:@"http://tempuri.org/DownloadFaxDoc" forHTTPHeaderField:@"SOAPAction"];
[request addValue:msgLength forHTTPHeaderField:@"Content-Length"];
//---set the HTTP method and body---
[request setHTTPMethod:@"POST"];
[request setHTTPBody: data];
Yes, I'd say there's something wrong with the query. If you were getting base64 encoded data, it would look something like this:
<DownloadFaxDocResult>iVBORw0KGgoAAAANSUhEUgA25CSFPinfIIQQvaGIMQyjrYj98hohhOgNRYxhGH1F7AghhOg
NOviD1GCCF6QxFjGER ... LOTS MORE ... <DownloadFaxDocResult>
From the link you attached, it shows:
<soap:Body>
<DownloadFaxDocResponse xmlns="http://tempuri.org/">
<DownloadFaxDocResult>xml</DownloadFaxDocResult>
</DownloadFaxDocResponse>
</soap:Body>
The return result is expected as XMLNode object, not a binary file.
精彩评论