Note that there are some explanatory texts on larger screens.

plurals
  1. POsoap web service not working in iphone
    text
    copied!<p>i am trying the following code, soap web service.It is not working .</p> <p>please help me out.</p> <p><a href="http://www.simpleupc.com/api/methods/FetchProductByUPC.php" rel="nofollow">Link</a></p> <p><a href="http://www.searchupc.com/service/UPCSearch.asmx" rel="nofollow">Service</a></p> <pre><code>NSString *soapMessage = [NSString stringWithFormat: @"&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n" "&lt;soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;\n" "&lt;soap:Body&gt;\n" "&lt;request xmlns=\"http://searchupc.com/GenerateBarcode\"&gt;\n" "&lt;auth&gt;5ggpf54TRghbnIvqS2XVGQQ0q6qCNuJ&lt;/auth&gt;\n" "&lt;method&gt;FetchProductByUPC&lt;/method&gt;" "&lt;params&gt;" "&lt;upc&gt;026274920257&lt;/upc&gt;" "&lt;/params&gt;" "&lt;/request&gt;\n" "&lt;/soap:Body&gt;\n" "&lt;/soap:Envelope&gt;\n" ]; NSLog(soapMessage); NSURL *url = [NSURL URLWithString:@"http://www.simpleupc.com/api/"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue: @"http://searchupc.com/GenerateBarcode/" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; NSLog(@"SOAP CONNECTED qqq%@",theRequest); NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; </code></pre>
 

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