<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TommyBlue.it &#187; SOAP</title>
	<atom:link href="http://www.tommyblue.it/tag/soap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tommyblue.it</link>
	<description>Bombardare per la pace è un po' come trombare per la verginità...</description>
	<lastBuildDate>Sun, 13 Jun 2010 23:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Interrogare un servizio SOAP con Ruby, Python e PHP</title>
		<link>http://www.tommyblue.it/2009/07/11/interrogare-un-servizio-soap-con-ruby-python-e-php/</link>
		<comments>http://www.tommyblue.it/2009/07/11/interrogare-un-servizio-soap-con-ruby-python-e-php/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 13:34:10 +0000</pubDate>
		<dc:creator>TommyBlue</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://www.tommyblue.it/?p=539</guid>
		<description><![CDATA[Sempre in tema di SOAP, ho avuto la necessità di interrogare un server SOAP con Ruby,Python e PHP. In tutti e tre i casi la faccenda è stata piuttosto semplice, bastano 3/4 righe di codice. Vi propongo questo breve paragone. RUBY require 'soap/wsdlDriver' @SOAPUrl = "http://HOST_URL/ws/ws208913.asmx?WSDL" @service = SOAP::WSDLDriverFactory.new(@SOAPUrl).create_rpc_driver @service.function2call(param1, param2) PYTHON from SOAPpy import [...]]]></description>
			<content:encoded><![CDATA[<p>Sempre<a href="http://www.tommyblue.it/2009/06/15/interrogare-un-servizio-soap-con-ruby/"> in tema di SOAP</a>, ho avuto la necessità di interrogare un server SOAP con Ruby,Python e PHP. In tutti e tre i casi la faccenda è stata piuttosto semplice, bastano 3/4 righe di codice. Vi propongo questo breve paragone.</p>
<h3>RUBY</h3>
<pre>require 'soap/wsdlDriver'
@SOAPUrl = "http://HOST_URL/ws/ws208913.asmx?WSDL"
@service = SOAP::WSDLDriverFactory.new(@SOAPUrl).create_rpc_driver
@service.function2call(param1, param2)</pre>
<h3>PYTHON</h3>
<pre>from SOAPpy import WSDL
server =  WSDL.Proxy('http://myurl/ws.asmx?WSDL')
result  = server.function2call(param1, param2)</pre>
<h3>PHP</h3>
<pre>$url = "http://myurl/ws.asmx?WSDL";
$client  = new SoapClient($url);
$client-&gt;function2call($param1, $param2);</pre>

<div class="sociable">
<div class="sociable_tagline">
<strong>Condividi questo post:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP&amp;bodytext=Sempre%20in%20tema%20di%20SOAP%2C%20ho%20avuto%20la%20necessit%C3%A0%20di%20interrogare%20un%20server%20SOAP%20con%20Ruby%2CPython%20e%20PHP.%20In%20tutti%20e%20tre%20i%20casi%20la%20faccenda%20%C3%A8%20stata%20piuttosto%20semplice%2C%20bastano%203%2F4%20righe%20di%20codice.%20Vi%20propongo%20questo%20breve%20paragone.%0D%0ARUBY%0D%0Arequire%20%27soap%2Fws" title="Digg"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP&amp;notes=Sempre%20in%20tema%20di%20SOAP%2C%20ho%20avuto%20la%20necessit%C3%A0%20di%20interrogare%20un%20server%20SOAP%20con%20Ruby%2CPython%20e%20PHP.%20In%20tutti%20e%20tre%20i%20casi%20la%20faccenda%20%C3%A8%20stata%20piuttosto%20semplice%2C%20bastano%203%2F4%20righe%20di%20codice.%20Vi%20propongo%20questo%20breve%20paragone.%0D%0ARUBY%0D%0Arequire%20%27soap%2Fws" title="del.icio.us"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;t=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP" title="Facebook"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP&amp;annotation=Sempre%20in%20tema%20di%20SOAP%2C%20ho%20avuto%20la%20necessit%C3%A0%20di%20interrogare%20un%20server%20SOAP%20con%20Ruby%2CPython%20e%20PHP.%20In%20tutti%20e%20tre%20i%20casi%20la%20faccenda%20%C3%A8%20stata%20piuttosto%20semplice%2C%20bastano%203%2F4%20righe%20di%20codice.%20Vi%20propongo%20questo%20breve%20paragone.%0D%0ARUBY%0D%0Arequire%20%27soap%2Fws" title="Google Bookmarks"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F" title="Identi.ca"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP&amp;source=TommyBlue.it+Bombardare+per+la+pace+%C3%A8+un+po%27+come+trombare+per+la+verginit%C3%A0...&amp;summary=Sempre%20in%20tema%20di%20SOAP%2C%20ho%20avuto%20la%20necessit%C3%A0%20di%20interrogare%20un%20server%20SOAP%20con%20Ruby%2CPython%20e%20PHP.%20In%20tutti%20e%20tre%20i%20casi%20la%20faccenda%20%C3%A8%20stata%20piuttosto%20semplice%2C%20bastano%203%2F4%20righe%20di%20codice.%20Vi%20propongo%20questo%20breve%20paragone.%0D%0ARUBY%0D%0Arequire%20%27soap%2Fws" title="LinkedIn"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP" title="Reddit"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP%20-%20http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F" title="Twitter"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F07%2F11%2Finterrogare-un-servizio-soap-con-ruby-python-e-php%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%2C%20Python%20e%20PHP&amp;body=Sempre%20in%20tema%20di%20SOAP%2C%20ho%20avuto%20la%20necessit%C3%A0%20di%20interrogare%20un%20server%20SOAP%20con%20Ruby%2CPython%20e%20PHP.%20In%20tutti%20e%20tre%20i%20casi%20la%20faccenda%20%C3%A8%20stata%20piuttosto%20semplice%2C%20bastano%203%2F4%20righe%20di%20codice.%20Vi%20propongo%20questo%20breve%20paragone.%0D%0ARUBY%0D%0Arequire%20%27soap%2Fws" title="Ping.fm"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tommyblue.it/2009/07/11/interrogare-un-servizio-soap-con-ruby-python-e-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interrogare un servizio SOAP con Ruby</title>
		<link>http://www.tommyblue.it/2009/06/15/interrogare-un-servizio-soap-con-ruby/</link>
		<comments>http://www.tommyblue.it/2009/06/15/interrogare-un-servizio-soap-con-ruby/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 22:49:03 +0000</pubDate>
		<dc:creator>TommyBlue</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://www.tommyblue.it/?p=518</guid>
		<description><![CDATA[Come spesso accade Windows &#38; Co. fanno le cose a modo loro. È il caso del web service SOAP (quando REST funziona bene e anche meglio) che, causa lavoro, ho dovuto interrogare. Per farlo ho utilizzato Ruby con l&#8217;aiuto della libreria soap/wsdlDriver. Qui di seguito un codice di esempio per connettersi al web service e [...]]]></description>
			<content:encoded><![CDATA[<p>Come spesso accade Windows &amp; Co. fanno le cose a modo loro. È il caso del web service <strong>SOAP</strong> (quando <strong>REST</strong> funziona bene e anche meglio) che, causa lavoro, ho dovuto interrogare. Per farlo ho utilizzato <strong>Ruby</strong> con l&#8217;aiuto della libreria <strong>soap/wsdlDriver</strong>.</p>
<p>Qui di seguito un codice di esempio per connettersi al web service e gestire la risposta alla chiamata a <em>getCourses208913</em></p>
<p><a href="http://blog.kreations.it/wp-content/uploads/2009/06/SOAP-wsdlDriver.rb">Scarica il file SOAP-wsdlDriver.rb</a></p>
<pre>#
# SOAP service query example
#
# Usage:
#
# course = CourseManagement.new
# course.getCourses
#
# Author::    Tommaso Visconti  (mailto:tommaso.visconti@kreations.it)
# Copyright:: Copyright (c) 2009 Kreations Agency
# License::   General Public License v.2

require 'soap/wsdlDriver'

class CourseManagement

  # Initialize the SOAP service
	def initialize
		@SOAPUrl = "http://HOST_URL/ws/ws208913.asmx?WSDL"
		@service=SOAP::WSDLDriverFactory.new(@SOAPUrl).create_rpc_driver
		@service.generate_explicit_type = true
		@service.wiredump_dev = STDOUT if $DEBUG
	end

	# Get the possible callbacks
	def getMethods
	 @service.methods.sort
	end

	#
	# Get the courses
	#
	# The first call use :IDParent =&gt; 0 which indicates the root of the tree
	#
	def getCourses
		result = @service.getCourses208913(:IDParent =&gt; 0)

		if result.getCourses208913Result.to_a.size &gt; 0
			puts "# Code =&gt; " + result.getCourses208913Result.codeDescription.code
			puts "# Description =&gt; " + result.getCourses208913Result.codeDescription.description
			puts

			self.getCourse(result.getCourses208913Result.codeDescription.code, 1)
		end
	end

	def getCourse(idParent, count)
		result = @service.getCourses208913(:IDParent =&gt; idParent)

		if result.getCourses208913Result.to_a.size &gt; 0

			result.getCourses208913Result.codeDescription.each do |course|
				puts " "*count*2 + "# Code =&gt; " + course.code
				puts " "*count*2 + "# Description =&gt; " + course.description
				puts

				# Recoursive call
				self.getCourse(course.code, count+1) if result.getCourses208913Result.to_a.size &gt; 1
			end
		end
	end
end</pre>

<div class="sociable">
<div class="sociable_tagline">
<strong>Condividi questo post:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby&amp;bodytext=Come%20spesso%20accade%20Windows%20%26amp%3B%20Co.%20fanno%20le%20cose%20a%20modo%20loro.%20%C3%88%20il%20caso%20del%20web%20service%20SOAP%20%28quando%20REST%20funziona%20bene%20e%20anche%20meglio%29%20che%2C%20causa%20lavoro%2C%20ho%20dovuto%20interrogare.%20Per%20farlo%20ho%20utilizzato%20Ruby%20con%20l%27aiuto%20della%20libreria%20soap%2FwsdlDriv" title="Digg"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby&amp;notes=Come%20spesso%20accade%20Windows%20%26amp%3B%20Co.%20fanno%20le%20cose%20a%20modo%20loro.%20%C3%88%20il%20caso%20del%20web%20service%20SOAP%20%28quando%20REST%20funziona%20bene%20e%20anche%20meglio%29%20che%2C%20causa%20lavoro%2C%20ho%20dovuto%20interrogare.%20Per%20farlo%20ho%20utilizzato%20Ruby%20con%20l%27aiuto%20della%20libreria%20soap%2FwsdlDriv" title="del.icio.us"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;t=Interrogare%20un%20servizio%20SOAP%20con%20Ruby" title="Facebook"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby&amp;annotation=Come%20spesso%20accade%20Windows%20%26amp%3B%20Co.%20fanno%20le%20cose%20a%20modo%20loro.%20%C3%88%20il%20caso%20del%20web%20service%20SOAP%20%28quando%20REST%20funziona%20bene%20e%20anche%20meglio%29%20che%2C%20causa%20lavoro%2C%20ho%20dovuto%20interrogare.%20Per%20farlo%20ho%20utilizzato%20Ruby%20con%20l%27aiuto%20della%20libreria%20soap%2FwsdlDriv" title="Google Bookmarks"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F" title="Identi.ca"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby&amp;source=TommyBlue.it+Bombardare+per+la+pace+%C3%A8+un+po%27+come+trombare+per+la+verginit%C3%A0...&amp;summary=Come%20spesso%20accade%20Windows%20%26amp%3B%20Co.%20fanno%20le%20cose%20a%20modo%20loro.%20%C3%88%20il%20caso%20del%20web%20service%20SOAP%20%28quando%20REST%20funziona%20bene%20e%20anche%20meglio%29%20che%2C%20causa%20lavoro%2C%20ho%20dovuto%20interrogare.%20Per%20farlo%20ho%20utilizzato%20Ruby%20con%20l%27aiuto%20della%20libreria%20soap%2FwsdlDriv" title="LinkedIn"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby" title="Reddit"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://twitter.com/home?status=Interrogare%20un%20servizio%20SOAP%20con%20Ruby%20-%20http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F" title="Twitter"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.tommyblue.it%2F2009%2F06%2F15%2Finterrogare-un-servizio-soap-con-ruby%2F&amp;title=Interrogare%20un%20servizio%20SOAP%20con%20Ruby&amp;body=Come%20spesso%20accade%20Windows%20%26amp%3B%20Co.%20fanno%20le%20cose%20a%20modo%20loro.%20%C3%88%20il%20caso%20del%20web%20service%20SOAP%20%28quando%20REST%20funziona%20bene%20e%20anche%20meglio%29%20che%2C%20causa%20lavoro%2C%20ho%20dovuto%20interrogare.%20Per%20farlo%20ho%20utilizzato%20Ruby%20con%20l%27aiuto%20della%20libreria%20soap%2FwsdlDriv" title="Ping.fm"><img src="http://www.tommyblue.it/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tommyblue.it/2009/06/15/interrogare-un-servizio-soap-con-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
