Note that there are some explanatory texts on larger screens.

plurals
  1. POcall wcf service from xcode4.3
    primarykey
    data
    text
    <p>I am a .Net programmer and a beginner in Xcode. I want to display the result from a WCF service on the iPad in UITableViewController. I have successfully created stubs for the service by using wsdl2objc. The SOAP message created is as follows:</p> <pre><code>2012-07-25 14:02:37.169 TestWCF[5280:fb03] OutputHeaders: { "Content-Length" = 572; "Content-Type" = "text/xml; charset=utf-8"; Host = "XXX.XXX.XXX"; SOAPAction = "http://tempuri.org/IDocSync/getAllCategories"; "User-Agent" = wsdl2objc; } 2012-07-25 14:02:37.172 TestWCF[5280:fb03] OutputBody: &lt;?xml version="1.0"?&gt; &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:iPadDocSyncServiceSvc="http://tempuri.org/" xmlns:ns1="http://tempuri.org/Imports" xmlns:tns1="http://schemas.datacontract.org/2004/07/DocSyncService" xmlns:tns2="http://schemas.microsoft.com/2003/10/Serialization/" xsl:version="1.0"&gt; &lt;soap:Body&gt; &lt;iPadDocSyncServiceSvc:getAllCategories/&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt; 2012-07-25 14:03:03.119 TestWCF[5280:fb03] ResponseStatus: 200 2012-07-25 14:03:03.120 TestWCF[5280:fb03] ResponseHeaders: { "Cache-Control" = private; "Content-Encoding" = gzip; "Content-Length" = 421; "Content-Type" = "text/xml; charset=utf-8"; Date = "Wed, 25 Jul 2012 06:03:02 GMT"; Server = "Microsoft-IIS/7.5"; "Set-Cookie" = "ASP.NET_SessionId=55w4noiub50zqtqclwdx3ral; path=/; HttpOnly"; Vary = "Accept-Encoding"; "X-AspNet-Version" = "4.0.30319"; "X-Powered-By" = "ASP.NET"; } 2012-07-25 14:03:03.121 TestWCF[5280:fb03] ResponseBody: &lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;s:Body&gt; &lt;getAllCategoriesResponse xmlns="http://tempuri.org/"&gt; &lt;getAllCategoriesResult xmlns:a="http://schemas.datacontract.org/2004/07/DocSyncService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;a:Category&gt; &lt;a:categoryId&gt;4&lt;/a:categoryId&gt; &lt;a:categoryName&gt;IT&lt;/a:categoryName&gt; &lt;a:categoryType&gt;0&lt;/a:categoryType&gt; &lt;a:docCount&gt;3&lt;/a:docCount&gt; &lt;a:subCategoryId&gt;0&lt;/a:subCategoryId&gt; &lt;/a:Category&gt; &lt;a:Category&gt; &lt;a:categoryId&gt;6&lt;/a:categoryId&gt; &lt;a:categoryName&gt;CPG&lt;/a:categoryName&gt; &lt;a:categoryType&gt;0&lt;/a:categoryType&gt; &lt;a:docCount&gt;1&lt;/a:docCount&gt; &lt;a:subCategoryId&gt;0&lt;/a:subCategoryId&gt; &lt;/a:Category&gt; &lt;/getAllCategoriesResult&gt; &lt;/getAllCategoriesResponse&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre> <p>The code in Appdelegate.m is:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. BasicHttpBinding_IDocSyncBinding *myBinding = [iPadDocSyncServiceSvc BasicHttpBinding_IDocSyncBinding]; myBinding.logXMLInOut = YES; //iPadDocSyncServiceSvc_getAllCategories *allCate = [[iPadDocSyncServiceSvc_getAllCategories new]autorelease]; iPadDocSyncServiceSvc_getAllCategories *allCate = [[iPadDocSyncServiceSvc_getAllCategories alloc]init]; BasicHttpBinding_IDocSyncBindingResponse *response = [myBinding getAllCategoriesUsingParameters:allCate]; for(id bodyPart in response.bodyParts) { //if([bodyPart isKindOfClass:[BasicHttpBinding_IDocSyncBindingResponse class]]) //{ //tns1_ArrayOfCategory *cateClass = (tns1_ArrayOfCategory *) bodyPart; //[self.tableView reloadData]; //categories = (NSMutableArray *) cateClass; //tns1_ArrayOfCategory *cateClass = [bodyPart getAllCategoriesResult]; self.categories = (NSMutableArray *) [bodyPart getAllCategoriesResult]; //} } return YES; } </code></pre> <p>When I run this,nothing is displayed in the Simulator...it shows a blank screen. There is something very obvious that I am missing. How can I get it working?</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