<?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: Complex Types &#8211; 2</title>
	<atom:link href="http://rossoft.wordpress.com/2006/02/17/complex-types-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/</link>
	<description>CakePHP Tips &#38; Tricks</description>
	<lastBuildDate>Tue, 08 Dec 2009 11:58:14 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: bobby</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-8113</link>
		<dc:creator>bobby</dc:creator>
		<pubDate>Wed, 13 Jun 2007 10:33:56 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-8113</guid>
		<description>have we got the way to call with wsdl file</description>
		<content:encoded><![CDATA[<p>have we got the way to call with wsdl file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ianh</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2507</link>
		<dc:creator>ianh</dc:creator>
		<pubDate>Wed, 14 Mar 2007 15:07:43 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2507</guid>
		<description>I have this working really well for fairly simple structures but got stuck on more complex structures; let me explain:

In the $api var on this page, there is a browse function that returns an array of articles &#039;Array_Articulos&#039;. In the $complexTypes var this translates to meaning an array of &#039;MyArticulo’s with the struct defined thereafter. So far this works brilliantly.

What I am now trying to do is to return an array of associated objects within MyArticluo (e.g. tags). I have gotten as far as making the $complexType definition like this:

‘MyArticulo’=&gt;array(’struct’=&gt;array(
                              ‘codigo’=&gt;’xsd:string’,
                              ‘nombre’=&gt;’xsd:string’,
                              ‘precio’=&gt;’xsd:float’,
                              &#039;array&#039;=&gt;&#039;Tags&#039;)),
&#039;Tags&#039;=&gt;array(&#039;struct&#039;=&gt;array(
                      &#039;id&#039; =&gt; &#039;xsd:integer&#039;)),

I then get stuck figuring out how to format the results from a findAll() query to match. Doing a var_dump on my returned data I find the MyArticulo data gets returned just fine, except the array which comes back null.

Any ideas would be very welcome. Unfortunately there are people chopping down trees right outside my office today so not the best environment to focus!</description>
		<content:encoded><![CDATA[<p>I have this working really well for fairly simple structures but got stuck on more complex structures; let me explain:</p>
<p>In the $api var on this page, there is a browse function that returns an array of articles &#8216;Array_Articulos&#8217;. In the $complexTypes var this translates to meaning an array of &#8216;MyArticulo’s with the struct defined thereafter. So far this works brilliantly.</p>
<p>What I am now trying to do is to return an array of associated objects within MyArticluo (e.g. tags). I have gotten as far as making the $complexType definition like this:</p>
<p>‘MyArticulo’=&gt;array(’struct’=&gt;array(<br />
                              ‘codigo’=&gt;’xsd:string’,<br />
                              ‘nombre’=&gt;’xsd:string’,<br />
                              ‘precio’=&gt;’xsd:float’,<br />
                              &#8216;array&#8217;=&gt;&#8217;Tags&#8217;)),<br />
&#8216;Tags&#8217;=&gt;array(&#8217;struct&#8217;=&gt;array(<br />
                      &#8216;id&#8217; =&gt; &#8216;xsd:integer&#8217;)),</p>
<p>I then get stuck figuring out how to format the results from a findAll() query to match. Doing a var_dump on my returned data I find the MyArticulo data gets returned just fine, except the array which comes back null.</p>
<p>Any ideas would be very welcome. Unfortunately there are people chopping down trees right outside my office today so not the best environment to focus!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Franck</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2184</link>
		<dc:creator>Franck</dc:creator>
		<pubDate>Thu, 25 Jan 2007 17:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2184</guid>
		<description>I managed to get it works, I have modified the Webservice_controllers in order to take in account &#039;exclude_fields&#039; as well as &#039;fields&#039;, also added some $var CommonExclude definition if you want to exclude variable in models that are always there (ie : created, modified)..

I have also amended the BuildComplextypes, to be able to do this in a structure :
&#039;tstl&#039; =&gt; array(&#039;struct&#039; =&gt; array(array(&#039;model&#039;  =&gt; &#039;Applicant&#039;,
                                                        exclude_fields&#039;  =&gt; array(&#039;isvalid&#039;, &#039;title&#039;))
                        &#039;Addr&#039;       =&gt; &#039;alladdr&#039;))

That allow to add  a model in a structure without having to make another &quot;array&quot;, very usefull for some realtions such as
parent
   - child 
       - child
where in output you do not want to &quot;move&quot; the data for each occurence..

I can send it to Ross to check if I have done too many mistakes, or anyone who wants to play with..

Ciao</description>
		<content:encoded><![CDATA[<p>I managed to get it works, I have modified the Webservice_controllers in order to take in account &#8216;exclude_fields&#8217; as well as &#8216;fields&#8217;, also added some $var CommonExclude definition if you want to exclude variable in models that are always there (ie : created, modified)..</p>
<p>I have also amended the BuildComplextypes, to be able to do this in a structure :<br />
&#8216;tstl&#8217; =&gt; array(&#8217;struct&#8217; =&gt; array(array(&#8216;model&#8217;  =&gt; &#8216;Applicant&#8217;,<br />
                                                        exclude_fields&#8217;  =&gt; array(&#8216;isvalid&#8217;, &#8216;title&#8217;))<br />
                        &#8216;Addr&#8217;       =&gt; &#8216;alladdr&#8217;))</p>
<p>That allow to add  a model in a structure without having to make another &#8220;array&#8221;, very usefull for some realtions such as<br />
parent<br />
   &#8211; child<br />
       &#8211; child<br />
where in output you do not want to &#8220;move&#8221; the data for each occurence..</p>
<p>I can send it to Ross to check if I have done too many mistakes, or anyone who wants to play with..</p>
<p>Ciao</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erich</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2181</link>
		<dc:creator>Erich</dc:creator>
		<pubDate>Thu, 25 Jan 2007 15:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2181</guid>
		<description>What a pain...

&lt;service name=&quot;Leads&quot;&gt;
&lt;port name=&quot;LeadsPort&quot; binding=&quot;tns:LeadsBinding&quot;&gt;
&lt;soap:address location=&quot;http://192.168.1.24/app/webroot/index.php&quot;/&gt;
&lt;/port&gt;
&lt;/service&gt;</description>
		<content:encoded><![CDATA[<p>What a pain&#8230;</p>
<p>&lt;service name=&#8221;Leads&#8221;&gt;<br />
&lt;port name=&#8221;LeadsPort&#8221; binding=&#8221;tns:LeadsBinding&#8221;&gt;<br />
&lt;soap:address location=&#8221;http://192.168.1.24/app/webroot/index.php&#8221;/&gt;<br />
&lt;/port&gt;<br />
&lt;/service&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erich</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2180</link>
		<dc:creator>Erich</dc:creator>
		<pubDate>Thu, 25 Jan 2007 15:10:54 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2180</guid>
		<description>I&#039;ve managed to get this working, although something is really wrong with the generated WSDL file:



  
     
  



When the soap action gets called, it returns the content of the application home page, as defined in the soap:address.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve managed to get this working, although something is really wrong with the generated WSDL file:</p>
<p>When the soap action gets called, it returns the content of the application home page, as defined in the soap:address.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erich</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2179</link>
		<dc:creator>Erich</dc:creator>
		<pubDate>Thu, 25 Jan 2007 15:09:02 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-2179</guid>
		<description>I&#039;ve managed to get this working, although something is really wrong with the generated WSDL file:


  
    
  


When the soap action gets called, it returns the content of the application home page.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve managed to get this working, although something is really wrong with the generated WSDL file:</p>
<p>When the soap action gets called, it returns the content of the application home page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Franck</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-1990</link>
		<dc:creator>Franck</dc:creator>
		<pubDate>Thu, 18 Jan 2007 21:25:47 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-1990</guid>
		<description>well I figure out for the warnings, but still can&#039;t get any data back from the webservice
If someone has an idea of what I can do to bring more information, I get the infos :-)
Thanks</description>
		<content:encoded><![CDATA[<p>well I figure out for the warnings, but still can&#8217;t get any data back from the webservice<br />
If someone has an idea of what I can do to bring more information, I get the infos <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Franck</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-1986</link>
		<dc:creator>Franck</dc:creator>
		<pubDate>Thu, 18 Jan 2007 19:37:06 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-1986</guid>
		<description>Hello,

I have tried it with the latest version of cake 1.1.12.4205, and I keep having warning and no response, I mean the date are not transmitted back.
The warning concerns session/php line 146 / 147 mainly also I needed to add the type &#039;string&#039; =&gt; &#039;xsd:string&#039; and &#039;integer&#039; =&gt; &#039;xsd:integer&#039; to the array in the webservices_controller ..
I am sure it&#039;s something stupid, but I cana&#039;t figure out what..</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I have tried it with the latest version of cake 1.1.12.4205, and I keep having warning and no response, I mean the date are not transmitted back.<br />
The warning concerns session/php line 146 / 147 mainly also I needed to add the type &#8217;string&#8217; =&gt; &#8216;xsd:string&#8217; and &#8216;integer&#8217; =&gt; &#8216;xsd:integer&#8217; to the array in the webservices_controller ..<br />
I am sure it&#8217;s something stupid, but I cana&#8217;t figure out what..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-568</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 27 Oct 2006 13:50:19 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-568</guid>
		<description>This is awesome, but what if I want to do the following (would it be possible?)

I want to create my controller classes, but I want that one controller to handle both the http transactions, as well as the webservice transactions.

So if someone were to go to www.whatever.com/controller/action in their browser it would work just fine, displaying the appropriate template, but if they were to go to  www.whatever.com/webservice/controller/action it would call the same action in the controllers file, and would return the appropriate soap call.

I would just like to minimize re-writing the same code, to do the exact same thing.

Thanks (email me back if possible!)</description>
		<content:encoded><![CDATA[<p>This is awesome, but what if I want to do the following (would it be possible?)</p>
<p>I want to create my controller classes, but I want that one controller to handle both the http transactions, as well as the webservice transactions.</p>
<p>So if someone were to go to <a href="http://www.whatever.com/controller/action" rel="nofollow">http://www.whatever.com/controller/action</a> in their browser it would work just fine, displaying the appropriate template, but if they were to go to  <a href="http://www.whatever.com/webservice/controller/action" rel="nofollow">http://www.whatever.com/webservice/controller/action</a> it would call the same action in the controllers file, and would return the appropriate soap call.</p>
<p>I would just like to minimize re-writing the same code, to do the exact same thing.</p>
<p>Thanks (email me back if possible!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rossoft</title>
		<link>http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-15</link>
		<dc:creator>rossoft</dc:creator>
		<pubDate>Sat, 25 Feb 2006 11:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://rossoft.wordpress.com/2006/02/17/complex-types-2/#comment-15</guid>
		<description>I have fixed some bugs like &quot;XXX has no namespace!&quot;.
Now you can generate the WSDL in two ways: mycontroller?wsdl or mycontroller/wsdl</description>
		<content:encoded><![CDATA[<p>I have fixed some bugs like &#8220;XXX has no namespace!&#8221;.<br />
Now you can generate the WSDL in two ways: mycontroller?wsdl or mycontroller/wsdl</p>
]]></content:encoded>
	</item>
</channel>
</rss>
