Hi guys,
I've made a little webservice test, using NuSOAP I've made a webservice that returns a string that is a 9k base64 encoded file. I've used different soap testers and the method works great. When I call it through Cocoa, it's called fine, all the parameters are passed correctly and the correct response (as far as I can read, anyway) is sent. My problem is, when I do:

WSMethodInvocationRef soapReq = createsoapReq(url, method, namespace, params, paramOrder, reqHeaders); NSDictionary *result = (NSDictionary *)WSMethodInvocationInvoke(soapReq); NSString *ret = [result objectForKey: (NSString *) kWSMethodInvocationResult];

ret is set to null rather than a reference to the NSString containing the 9kb base64 encoded file. Do you have any clues why it is set to null? The output of NSLog(result) follows

Secondly, are there better ways to transfer a file as a part of a SOAP answer than making it into a base64 encoded string?

Cheers

        Nik

2008-03-15 00:38:17.404 myApp[9750:60b] result: {
"/WSDebugInBody" = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"? ><SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/ \" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"; xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance \" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\";><SOAP- ENV:Body><return xsi:type=\"xsd:string\">I replaced a 9kb string that was here</return></SOAP-ENV:Body></SOAP-ENV:Envelope>";
    "/WSDebugInHeaders" =     {
        Connection = close;
        "Content-Length" = 12657;
        "Content-Type" = "text/xml; charset=ISO-8859-1";
        Date = "Fri, 14 Mar 2008 23:38:16 GMT";
Server = "Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2 PHP/5.2.4";
        "X-Powered-By" = "PHP/5.2.4";
        "X-Soap-Server" = "NuSOAP/0.7.3 (1.114)";
    };
"/WSDebugOutBody" = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n \n <SOAP-ENV:Envelope\n\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema \"\n\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n \n xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"\n \n SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/ encoding/\"\n\n xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/ \">\n\n <SOAP-ENV:Body>\n\n <initSQLite xmlns=\"urn:soap\"> \n\n <email xsi:type=\"xsd:string\">[EMAIL PROTECTED]</email>\n \n <password xsi:type=\"xsd:string\">myPasswd</password>\n \n </initSQLite>\n\n </SOAP-ENV:Body>\n\n </SOAP- ENV:Envelope>\n\n";
    "/WSDebugOutHeaders" =     {
        "Content-Type" = "text/xml";
        Host = "saers.dk";
        Initsqlite = "";
        "User-Agent" = "Mac OS X; WebServicesCore.framework (1.0.0)";
    };
    "/kWSHTTPResponseMessage" = <NSCFType: 0x124a1a0>;
}
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to