Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone App - Would the input below be sufficient to request the webmethod?
    primarykey
    data
    text
    <p>For an iPhone App, would the input below be sufficient to request a SOAP webmethod? In Android, method_name, soap_action, namespace, url and input parameters would be sufficient. How about iOS apps?</p> <p>I had a look at the sample iPhone code - </p> <pre><code>-(IBAction)btnFindCountry:(id)sender { NSString *soapMsg = [NSString stringWithFormat: @"&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;" "&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;" "&lt;soap:Body&gt;" "&lt;GetGeoIP xmlns=\"http://www.webservicex.net/\"&gt;" "&lt;IPAddress&gt;3.4.5.6&lt;/IPAddress&gt;" "&lt;/GetGeoIP&gt;" "&lt;/soap:Body&gt;" "&lt;/soap:Envelope&gt;"]; //---print it to the Debugger Console for verification--- NSLog(@"%@",soapMsg); NSURL *url = [NSURL URLWithString: @"http://www.webservicex.net/geoipservice.asmx"]; NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url]; //---set the various headers--- NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMsg length]]; [req addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [req addValue:@"http://www.webservicex.net/GetGeoIP" forHTTPHeaderField:@"SOAPAction"]; [req addValue:msgLength forHTTPHeaderField:@"Content-Length"]; //---set the HTTP method and body--- [req setHTTPMethod:@"POST"]; [req setHTTPBody:[soapMsg dataUsingEncoding:NSUTF8StringEncoding]]; //---start animating-- [activityIndicator startAnimating]; conn = [[NSURLConnection alloc] initWithRequest:req delegate:self]; if (conn) { webData = [[NSMutableData data] retain]; } } </code></pre> <hr> <p>I am provided with the following webservice... How would I convert it for my iPhone app code like the above?</p> <pre><code>Name: xxyy Binding: Book247XMLWebServiceForMobileBinding Endpoint: yyxx.com/webservice/indexMobile.php SoapAction: yyxx.com/webservice/Book247XMLWebServiceForMobile.wsdl#tGetSearchDataByCategories Style: rpc Input: use: encoded namespace: yyxx.com/webservice/Book247XMLWebServiceForMobile.wsdl encodingStyle: schemas.xmlsoap.org/soap/encoding/ message: tGetSearchDataByCategoriesRequest parts: vendor_access_url: xsd:string category_id: xsd:integer subcategory_id: xsd:integer Output: use: encoded namespace: yyxx.com/webservice/Book247XMLWebServiceForMobile.wsdl encodingStyle:schemas.xmlsoap.org/soap/encoding/ message: xxyy parts: return: tns:Searches Namespace: webservice/Book247XMLWebServiceForMobile.wsdl Transport: schemas.xmlsoap.org/soap/http </code></pre> <p>Thanks in anticipation.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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