<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Using .NET web services and dataset objects in your iphone app</title>
	<atom:link href="http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/</link>
	<description>Technobabble code updates, and random thoughts of goodness.</description>
	<lastBuildDate>Wed, 28 Jul 2010 06:56:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Nicola Fagan</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-635</link>
		<dc:creator>Nicola Fagan</dc:creator>
		<pubDate>Wed, 28 Jul 2010 06:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-635</guid>
		<description>Thank you, i try the revision 2, and work very well :) :) many thanks</description>
		<content:encoded><![CDATA[<p>Thank you, i try the revision 2, and work very well <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: o0joecool0o</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-630</link>
		<dc:creator>o0joecool0o</dc:creator>
		<pubDate>Tue, 27 Jul 2010 21:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-630</guid>
		<description>Please update to Revision 2 see the link above. I cannot support this version as there are many bugs that have been fixed and memory issues in the new version</description>
		<content:encoded><![CDATA[<p>Please update to Revision 2 see the link above. I cannot support this version as there are many bugs that have been fixed and memory issues in the new version</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Rosenthal</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-628</link>
		<dc:creator>Alan Rosenthal</dc:creator>
		<pubDate>Tue, 27 Jul 2010 15:19:45 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-628</guid>
		<description>Did you find out why passing parameters to web service doesn&#039;t work.  I am having the same problem.  Web service receives nothing.
Thanks, Alan</description>
		<content:encoded><![CDATA[<p>Did you find out why passing parameters to web service doesn&#8217;t work.  I am having the same problem.  Web service receives nothing.<br />
Thanks, Alan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Rosenthal</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-627</link>
		<dc:creator>Alan Rosenthal</dc:creator>
		<pubDate>Tue, 27 Jul 2010 15:17:30 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-627</guid>
		<description>Hi,
Did you ever find out why calling the service with parameters doesn&#039;t work.  I am 
having the same problem, without parameters it work.  When I log the web service,
the parameter aren&#039;t receiving anything.  case sensitive and typing is ok.

Thanks,
Alan</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Did you ever find out why calling the service with parameters doesn&#8217;t work.  I am<br />
having the same problem, without parameters it work.  When I log the web service,<br />
the parameter aren&#8217;t receiving anything.  case sensitive and typing is ok.</p>
<p>Thanks,<br />
Alan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicola Fagan</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-599</link>
		<dc:creator>Nicola Fagan</dc:creator>
		<pubDate>Fri, 16 Jul 2010 16:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-599</guid>
		<description>Hi, I&#039;m new for XCode developer, 
I try the code, from a my test web service,
that work correcty on C# on Visual Studio. 
The web service on Visual Studio fill a grid and work very well,
but the code on Xcode not work, the dataset is every nill, 
i dont know i think is ok(?), but not work

The col: szRagSoc, return the name of user number

Thank you very much. This has really helped me a lot.

Nicola F. :)


self.data = [[NSMutableData alloc] init];
WebServiceHelper *DataCon = [[WebServiceHelper alloc] init];
DataCon.XMLNameSpace = @&quot;http://tempuri.org/&quot;;
DataCon.XMLURLAddress = @&quot;http://www.tercera.biz/TelecomWs.asmx&quot;;
DataCon.MethodName = @&quot;GetNumber&quot;;
DataCon.MethodParameters = [[NSMutableDictionary alloc] init];
[DataCon.MethodParameters setObject:@&quot;0495590318&quot; forKey:@&quot;szNumber&quot;];
self.data = [DataCon initiateConnection];



//Create a dataset object using the new raw data we received from the service
DataSet *dsMyDataSet = [[DataSet alloc] initWithXMLData:self.data];

//Now we have a dataset filled with data from the initWithXMLData command lets
//query some data from it!
//Set up a dictionary object to hold our query data from the dataset
NSMutableDictionary *mydata= [[NSMutableDictionary alloc] init];

//retrieve all rows from the selected table and column
mydata = [dsMyDataSet getRowsForTableAndColumn:@&quot;telecom&quot; col:@&quot;szRagSoc&quot; ];
//mydata should contain all rows from column &quot;Username&quot;


//you can do what you want with the data at this point like a simple iteration
NSEnumerator *userIterator= [mydata objectEnumerator];

NSString *username;

while(username =  [userIterator nextObject])
{
	NSLog(@&quot;Username: %@&quot;, username);
}
[mydata release];</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m new for XCode developer,<br />
I try the code, from a my test web service,<br />
that work correcty on C# on Visual Studio.<br />
The web service on Visual Studio fill a grid and work very well,<br />
but the code on Xcode not work, the dataset is every nill,<br />
i dont know i think is ok(?), but not work</p>
<p>The col: szRagSoc, return the name of user number</p>
<p>Thank you very much. This has really helped me a lot.</p>
<p>Nicola F. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>self.data = [[NSMutableData alloc] init];<br />
WebServiceHelper *DataCon = [[WebServiceHelper alloc] init];<br />
DataCon.XMLNameSpace = @&#8221;http://tempuri.org/&#8221;;<br />
DataCon.XMLURLAddress = @&#8221;http://www.tercera.biz/TelecomWs.asmx&#8221;;<br />
DataCon.MethodName = @&#8221;GetNumber&#8221;;<br />
DataCon.MethodParameters = [[NSMutableDictionary alloc] init];<br />
[DataCon.MethodParameters setObject:@"0495590318" forKey:@"szNumber"];<br />
self.data = [DataCon initiateConnection];</p>
<p>//Create a dataset object using the new raw data we received from the service<br />
DataSet *dsMyDataSet = [[DataSet alloc] initWithXMLData:self.data];</p>
<p>//Now we have a dataset filled with data from the initWithXMLData command lets<br />
//query some data from it!<br />
//Set up a dictionary object to hold our query data from the dataset<br />
NSMutableDictionary *mydata= [[NSMutableDictionary alloc] init];</p>
<p>//retrieve all rows from the selected table and column<br />
mydata = [dsMyDataSet getRowsForTableAndColumn:@"telecom" col:@"szRagSoc" ];<br />
//mydata should contain all rows from column &#8220;Username&#8221;</p>
<p>//you can do what you want with the data at this point like a simple iteration<br />
NSEnumerator *userIterator= [mydata objectEnumerator];</p>
<p>NSString *username;</p>
<p>while(username =  [userIterator nextObject])<br />
{<br />
	NSLog(@&#8221;Username: %@&#8221;, username);<br />
}<br />
[mydata release];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: o0joecool0o</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-575</link>
		<dc:creator>o0joecool0o</dc:creator>
		<pubDate>Sun, 04 Jul 2010 20:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-575</guid>
		<description>Please update to Revision 2 see the link above. I cannot support this version as there are many bugs that have been fixed and memory issues in the new version.</description>
		<content:encoded><![CDATA[<p>Please update to Revision 2 see the link above. I cannot support this version as there are many bugs that have been fixed and memory issues in the new version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoyi</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-566</link>
		<dc:creator>Yoyi</dc:creator>
		<pubDate>Thu, 24 Jun 2010 04:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-566</guid>
		<description>[sRequest appendString:[NSString stringWithFormat:@&quot;&quot;,MethodName, XMLNameSpace]];

This was the line I modified. I have put some spaces so this blog text analyzer does not remove it.</description>
		<content:encoded><![CDATA[<p>[sRequest appendString:[NSString stringWithFormat:@"",MethodName, XMLNameSpace]];</p>
<p>This was the line I modified. I have put some spaces so this blog text analyzer does not remove it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoyi</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-565</link>
		<dc:creator>Yoyi</dc:creator>
		<pubDate>Thu, 24 Jun 2010 04:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-565</guid>
		<description>I fix my previous problem. It was all about the namespace name which I think is wierd because it worked before for other methods without parameters.

My namespace was http://tempuri.org after reading carefully the web service request I realize it was expecting this http://tempuri.org/  (with /). I put slash I it did not work because the helper inside add a slash when building the SoapAction value. So, I added a slash in this line of the helper class

[sRequest appendString:[NSString stringWithFormat:@&quot;&quot;,MethodName, XMLNameSpace]];

now I have to make sure not to write a slash at the end in future namespaces. Hope this can save time to everyone facing this problem.

Thanks again and good luck in the Apple Store :-)

YOYI</description>
		<content:encoded><![CDATA[<p>I fix my previous problem. It was all about the namespace name which I think is wierd because it worked before for other methods without parameters.</p>
<p>My namespace was <a href="http://tempuri.org" rel="nofollow">http://tempuri.org</a> after reading carefully the web service request I realize it was expecting this <a href="http://tempuri.org/" rel="nofollow">http://tempuri.org/</a>  (with /). I put slash I it did not work because the helper inside add a slash when building the SoapAction value. So, I added a slash in this line of the helper class</p>
<p>[sRequest appendString:[NSString stringWithFormat:@"",MethodName, XMLNameSpace]];</p>
<p>now I have to make sure not to write a slash at the end in future namespaces. Hope this can save time to everyone facing this problem.</p>
<p>Thanks again and good luck in the Apple Store <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>YOYI</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoyi</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-564</link>
		<dc:creator>Yoyi</dc:creator>
		<pubDate>Thu, 24 Jun 2010 04:11:17 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-564</guid>
		<description>Thanks for this amazing tutorial. It was working fine without parameters. But when I call a method with parameter this is what I get:

2010-06-24 00:06:36.490 MyCars101[11619:207] Parameter:year Value:2001 str:2001
2010-06-24 00:06:36.491 MyCars101[11619:207] Parameter:make Value:10 str:10
2010-06-24 00:06:37.203 MyCars101[11619:207] Document Started Parsing...
2010-06-24 00:06:37.203 MyCars101[11619:207] found this element: soap:Envelope
2010-06-24 00:06:37.204 MyCars101[11619:207] found this element: soap:Body
2010-06-24 00:06:37.204 MyCars101[11619:207] found this element: soap:Fault
2010-06-24 00:06:37.205 MyCars101[11619:207] found this element: faultcode
2010-06-24 00:06:37.205 MyCars101[11619:207] found this element: faultstring
2010-06-24 00:06:37.206 MyCars101[11619:207] found this element: detail
2010-06-24 00:06:37.207 MyCars101[11619:207] Document Ended Parsing...

I have created a second method in the web service without params that calls inside this method with hardcoded params and it works fine. Here is my code, I&#039;m completely sure that the params names and order match also the datatypes which are strings. 

WebServiceHelper * helper	= [[WebServiceHelper alloc] init];
	helper.XMLNameSpace			= @&quot;http://tempuri.org&quot;;
	helper.XMLURLAddress		= @&quot;http://localhost/yoyitest/Service.asmx&quot;;
	helper.MethodName			= @&quot;GetModels&quot;;
	helper.MethodParameters		= [[NSMutableDictionary alloc] init];
	
	
	[helper.MethodParameters setObject: carYear forKey:@&quot;year&quot;];
	[helper.MethodParameters setObject: carMake forKey:@&quot;make&quot;];
	
	NSMutableData		* rawData	= [helper initiateConnection]								;
	DataSet				* dataSet	= [[DataSet alloc] initWithXMLData:rawData]					;
    NSMutableDictionary	* data		= [dataSet getRowsForTableAndColumn:@&quot;t_car_models&quot; col:@&quot;model_name&quot; ];
	
	NSEnumerator	* enumerator	= [data objectEnumerator]		;
	NSMutableArray	* result		= [[NSMutableArray alloc] init]	;
	NSString		* model;	
	
	// ITERATE THOUGH THE DICTIONARY
	while (model = [enumerator nextObject] ) 
	{
		[result addObject:model];
	}

	
	[helper release]	;
	[rawData release]	;
	[dataSet release]	;
	[data release]		;
	
	return result;



I&#039;m also sure that the parameters values are right. I even hardcode them in the code above and the problem persisted. I think is has to do with the soap request but I haven been able to detect the problem. 

Thank you very much. This has really helped me a lot.

YOYI</description>
		<content:encoded><![CDATA[<p>Thanks for this amazing tutorial. It was working fine without parameters. But when I call a method with parameter this is what I get:</p>
<p>2010-06-24 00:06:36.490 MyCars101[11619:207] Parameter:year Value:2001 str:2001<br />
2010-06-24 00:06:36.491 MyCars101[11619:207] Parameter:make Value:10 str:10<br />
2010-06-24 00:06:37.203 MyCars101[11619:207] Document Started Parsing&#8230;<br />
2010-06-24 00:06:37.203 MyCars101[11619:207] found this element: soap:Envelope<br />
2010-06-24 00:06:37.204 MyCars101[11619:207] found this element: soap:Body<br />
2010-06-24 00:06:37.204 MyCars101[11619:207] found this element: soap:Fault<br />
2010-06-24 00:06:37.205 MyCars101[11619:207] found this element: faultcode<br />
2010-06-24 00:06:37.205 MyCars101[11619:207] found this element: faultstring<br />
2010-06-24 00:06:37.206 MyCars101[11619:207] found this element: detail<br />
2010-06-24 00:06:37.207 MyCars101[11619:207] Document Ended Parsing&#8230;</p>
<p>I have created a second method in the web service without params that calls inside this method with hardcoded params and it works fine. Here is my code, I&#8217;m completely sure that the params names and order match also the datatypes which are strings. </p>
<p>WebServiceHelper * helper	= [[WebServiceHelper alloc] init];<br />
	helper.XMLNameSpace			= @&#8221;http://tempuri.org&#8221;;<br />
	helper.XMLURLAddress		= @&#8221;http://localhost/yoyitest/Service.asmx&#8221;;<br />
	helper.MethodName			= @&#8221;GetModels&#8221;;<br />
	helper.MethodParameters		= [[NSMutableDictionary alloc] init];</p>
<p>	[helper.MethodParameters setObject: carYear forKey:@"year"];<br />
	[helper.MethodParameters setObject: carMake forKey:@"make"];</p>
<p>	NSMutableData		* rawData	= [helper initiateConnection]								;<br />
	DataSet				* dataSet	= [[DataSet alloc] initWithXMLData:rawData]					;<br />
    NSMutableDictionary	* data		= [dataSet getRowsForTableAndColumn:@"t_car_models" col:@"model_name" ];</p>
<p>	NSEnumerator	* enumerator	= [data objectEnumerator]		;<br />
	NSMutableArray	* result		= [[NSMutableArray alloc] init]	;<br />
	NSString		* model;	</p>
<p>	// ITERATE THOUGH THE DICTIONARY<br />
	while (model = [enumerator nextObject] )<br />
	{<br />
		[result addObject:model];<br />
	}</p>
<p>	[helper release]	;<br />
	[rawData release]	;<br />
	[dataSet release]	;<br />
	[data release]		;</p>
<p>	return result;</p>
<p>I&#8217;m also sure that the parameters values are right. I even hardcode them in the code above and the problem persisted. I think is has to do with the soap request but I haven been able to detect the problem. </p>
<p>Thank you very much. This has really helped me a lot.</p>
<p>YOYI</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoyi</title>
		<link>http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/#comment-563</link>
		<dc:creator>Yoyi</dc:creator>
		<pubDate>Thu, 24 Jun 2010 03:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://grabalife.com/?p=83#comment-563</guid>
		<description>I also have this problem when I&#039;m providing two parameters. Do you get to solve this issue? How?

Thanks</description>
		<content:encoded><![CDATA[<p>I also have this problem when I&#8217;m providing two parameters. Do you get to solve this issue? How?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
