Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>for get use :</strong></p> <pre><code>+(NSMutableURLRequest*)getURq_getansascreen:(NSString*)ws_name { NSLog(@"%@",ws_name); NSMutableURLRequest *urlReq = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:ws_name] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]; [urlReq addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [urlReq setHTTPMethod:@"GET"]; return urlReq; } </code></pre> <p>for post use :</p> <pre><code>+(NSMutableURLRequest*)postURq_getansascreen:(NSString*)ws_name :(NSString*)service { NSString *tempUrl = domainURL; NSString *msgLength = [NSString stringWithFormat:@"%d",[ws_name length]]; NSMutableURLRequest *urlReq = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@Service=%@",tempUrl,service]] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]; [urlReq addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [urlReq addValue:msgLength forHTTPHeaderField:@"Content-Length"]; [urlReq setHTTPMethod:@"POST"]; [urlReq setHTTPBody: [ws_name dataUsingEncoding:NSUTF8StringEncoding]]; return urlReq; } </code></pre> <p>//Call this in view did load as `</p> <pre><code>WSPContinuous *wspcontinuous = [[WSPContinuous alloc] initWithRequestForThread:[webService getURq_getansascreen:[webService GetDetails:str_filter]] sel:@selector(WS_GetDetailsLoaded:) andHandler:self];` </code></pre> <p>//create class WSPContinuous and add these fns..</p> <pre><code>-(id)initWithRequestForThread:(NSMutableURLRequest*)urlRequest sel:(SEL)seletor andHandler:(NSObject*)handler { if (self=[super init]) { self.MainHandler = handler; self.targetSelector = seletor; self.urlReq = urlRequest; [self performSelectorOnMainThread:@selector(startParse) withObject:nil waitUntilDone:NO]; } return (id)urlReq; } -(void)startParse{ NSLog(@"URL CALLING %@",urlReq.URL); con = [[NSURLConnection alloc] initWithRequest:urlReq delegate:self]; if (con) { myWebData = [[NSMutableData data] retain]; NSLog(@"myWebData old....%@",myWebData); } else { [self.MainHandler performSelectorOnMainThread:targetSelector withObject:nil waitUntilDone:NO]; } } //-------------------------------connection----------------- -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{ [myWebData setLength:0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{ [myWebData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{ [self.MainHandler performSelectorOnMainThread:targetSelector withObject:nil waitUntilDone:NO]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection{ NSString *thexml = [[NSString alloc] initWithBytes:[myWebData mutableBytes] length:[myWebData length] encoding:NSUTF8StringEncoding]; NSLog(@"xmlDictionary %@",thexml); [thexml release]; NSError *parseError = nil; NSDictionary *xmlDictionary = [XMLReader dictionaryForXMLData:myWebData error:&amp;parseError]; [AlertHandler hideAlert]; [MainHandler performSelector:targetSelector withObject:xmlDictionary]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload