Hi, I am trying to get some information from a web service using soap request. When it returns a small amount of data (like a few lines of XML), it works fine but when it returns a large data (like an image coded as a byte array), the second request responses after a 25-30 second delay. If i wait 20 - 30 seconds after first request, then it responses immediately. The question is: Why can't i send soap requests repeatedly. Any idea about the reason of delay?
Here is the piece of code: ------------------------ NSLog (@"creating soap req"); WSMethodInvocationRef soapReq = createSOAPRequest(url, method, namespace, params, paramOrder, reqHeaders); NSLog (@"created soap req"); NSLog (@"creating soap result"); //after this message i wait a while result = (NSDictionary *)WSMethodInvocationInvoke( soapReq); CFRelease(soapReq); NSLog (@"created soap result"); NSLog(@"Result : %@ ",result); ----------------------------- And that is the createSOAPRequest method: WSMethodInvocationRef createSOAPRequest(NSURL *url, NSString *method, NSString *namespace, NSDictionary *params, NSArray *paramOrder, NSDictionary *reqHeaders) { WSMethodInvocationRef soapReq = WSMethodInvocationCreate((CFURLRef)url, (CFStringRef)method, kWSSOAP2001Protocol); // set SOAP params WSMethodInvocationSetParameters(soapReq, (CFDictionaryRef)params, (CFArrayRef)paramOrder); // set method namespace WSMethodInvocationSetProperty(soapReq, kWSSOAPMethodNamespaceURI, (CFStringRef)namespace); // Add HTTP headers (with SOAPAction header) WSMethodInvocationSetProperty(soapReq, kWSHTTPExtraHeaders, (CFDictionaryRef)reqHeaders); // for good measure, make the request follow redirects. // WSMethodInvocationSetProperty(soapReq, kWSHTTPFollowsRedirects, kCFBooleanTrue); // set debug props WSMethodInvocationSetProperty(soapReq, kWSDebugIncomingBody, kCFBooleanFalse); WSMethodInvocationSetProperty(soapReq, kWSDebugIncomingHeaders, kCFBooleanFalse); WSMethodInvocationSetProperty(soapReq, kWSDebugOutgoingBody, kCFBooleanFalse); WSMethodInvocationSetProperty(soapReq, kWSDebugOutgoingHeaders, kCFBooleanFalse); return soapReq; } _______________________________________________ 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 arch...@mail-archive.com