<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-318260700307541498</id><updated>2024-09-19T10:59:11.365-07:00</updated><category term="PHP"/><category term="Literatura"/><category term="VideoGames"/><category term="Heroes"/><category term="Libros"/><category term="Base de Datos"/><category term="WML"/><category term="Hunter x Hunter"/><category term="Software"/><category term="Consejos Pc"/><category term="House"/><title type='text'>El Blog de George</title><subtitle type='html'>Animes e Informática. TH3 P0W3R 1N Y0UR H@ND5</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>112</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-8412156107777974932</id><published>2009-12-21T11:55:00.000-08:00</published><updated>2009-12-21T11:55:07.891-08:00</updated><title type='text'>Visiten mi nuevo Blog</title><content type='html'>En el nuevo blog encontrar toda la informacion q he publicado hasta ahora, como muchas cosas nuevas. Proximamente tb publicare codigo en Vb. Net &lt;br /&gt;
&lt;a href=&quot;http://binarycodefree.blogspot.com/&quot;&gt;click Aqui&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/8412156107777974932/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/12/visiten-mi-nuevo-blog.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/8412156107777974932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/8412156107777974932'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/12/visiten-mi-nuevo-blog.html' title='Visiten mi nuevo Blog'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-9221959847081562960</id><published>2009-11-28T09:04:00.000-08:00</published><updated>2009-11-28T09:04:06.553-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="House"/><title type='text'>House 6 Temporada - Capitulo 3</title><content type='html'>&lt;object width=&quot;440&quot; height=&quot;330&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.megavideo.com/v/IBVFQEN6f0d7d902411ff127fa4b004f95ff681f&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.megavideo.com/v/IBVFQEN6f0d7d902411ff127fa4b004f95ff681f&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;440&quot; height=&quot;330&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/9221959847081562960/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/house-6-temporada-capitulo-3.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/9221959847081562960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/9221959847081562960'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/house-6-temporada-capitulo-3.html' title='House 6 Temporada - Capitulo 3'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-877302985427049981</id><published>2009-11-28T08:58:00.001-08:00</published><updated>2009-11-28T08:58:59.924-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="House"/><title type='text'>House 6 Temporada - Capitulo 1 y 2</title><content type='html'>&lt;object width=&quot;440&quot; height=&quot;330&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.megavideo.com/v/5EHI2RLYb956bed27fa782d276cb3be4ab458fa1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.megavideo.com/v/5EHI2RLYb956bed27fa782d276cb3be4ab458fa1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;440&quot; height=&quot;330&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/877302985427049981/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/house-6-temporada-capitulo-1-y-2.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/877302985427049981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/877302985427049981'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/house-6-temporada-capitulo-1-y-2.html' title='House 6 Temporada - Capitulo 1 y 2'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-1560128958869061721</id><published>2009-11-27T08:27:00.000-08:00</published><updated>2009-11-28T05:28:55.535-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Base de Datos"/><title type='text'>Triggers y Procedimientos Almacenados en MySQL</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Unas opciones no muy usadas cuando se trabaja con MySQL son los triggers y los procedimientos almacenados (&lt;em&gt;stored procedures&lt;/em&gt;), supongo que a que es algo nuevo en MySQL y la gente no está acostumbrada a estas dos funcionalidades.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Vamos a mostrar un ejemplo de uso de triggers y procedimientos almacenados paso a paso. Quizás el ejemplo no sea el más correcto, o simplemente sea poco útil, pero lo importante es el uso en sí, no el ejemplo.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Nuestro sistema tendrá dos tablas, una con ventas y la otra con comisiones. En la primera se almacenarán cada venta que se realiza en un comercio, y en la segunda las comisiones que le corresponden a cada vendedor en el momento.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;color: red;&quot;&gt;CREATE TABLE `ventas` (
  `vendedor` int(11),
  `producto` int(11),
  `importe` float
)
 
CREATE TABLE `comisiones` (
  `vendedor` int(11),
  `comision` float
)&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Las comisiones se calcula de una forma especial, le corresponde un porcentaje de las ventas según el tipo de producto, y es importante para los vendedores el que se sepa en cada momento qué comisiones lleva ganadas (esto es una justificación para no usar un &lt;em&gt;cron&lt;/em&gt; o algo parecido).&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para calcular qué comisión le corresponde a un vendedor, calcularemos los porcentajes para cada tipo de producto vendido y luego lo añadiremos/actualizaremos en la tabla de comisiones. Todo se realizará en un procedimiento almacenado.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color: red;&quot;&gt;DELIMITER $$
DROP PROCEDURE IF EXISTS `test`.`sp_comisiones`$$
CREATE PROCEDURE `test`.`sp_comisiones` (IN mivendedor INT)
BEGIN
 DECLARE micomision INT DEFAULT 0;
 DECLARE suma INT;
 DECLARE existe BOOL;
 
 select IFNULL(sum(importe),0) into suma from ventas where producto = 1 and vendedor = mivendedor;
 SET micomision = micomision + (suma * 0.15);
 
 select IFNULL(sum(importe),0) into suma from ventas where producto = 2 and vendedor = mivendedor;
 SET micomision = micomision + (suma * 0.1);
 
 select IFNULL(sum(importe),0) into suma from ventas where producto = 3 and vendedor = mivendedor;
 SET micomision = micomision + (suma * 0.2);
 
 select count(1)&amp;gt;0 into existe from comisiones where vendedor = mivendedor;
 if existe then
  UPDATE comisiones set comision = comision+micomision where vendedor = mivendedor;
 else
  insert into comisiones (vendedor, comision) values (mivendedor, micomision);
 end if;
END$$
 
DELIMITER ;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ahora, para actualizar los datos de las comisiones usaremos un trigguer, así cuando se haga una venta (insert en la tabla ventas), se llamará al procedimiento almacenado (&lt;em&gt;sp_comisiones&lt;/em&gt;), que recalculará la comisión para ese vendedor.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color: red;&quot;&gt;DELIMITER $$
DROP TRIGGER `test`.`tr_ventas_insert`$$
CREATE TRIGGER `test`.`tr_ventas_insert` AFTER INSERT on `test`.`ventas`
FOR EACH ROW BEGIN
 call sp_comisiones(new.vendedor);
END$$
DELIMITER ;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/1560128958869061721/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/triggers-y-procedimientos-almacenados.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1560128958869061721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1560128958869061721'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/triggers-y-procedimientos-almacenados.html' title='Triggers y Procedimientos Almacenados en MySQL'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-1270688432578905682</id><published>2009-11-27T08:19:00.000-08:00</published><updated>2009-11-27T08:19:47.395-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WML"/><title type='text'>Manual WML - Parte VI Final</title><content type='html'>&lt;DIV align=&quot;Justify&quot;&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Las URL &lt;br /&gt;
relativas o absolutas&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;Puede ocurrir que el dispositivo WAP o el gateway no interprete correctamente una URL relativa. Para evitar esto ser recomienda usar la URL absoluta:&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;TABLE cellPadding=5 border=1&gt;  &lt;TBODY&gt;
  &lt;TR align=middle&gt;
    &lt;TD&gt;&lt;FONT color=red size=+1&gt;&lt;B&gt;NO&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
    &lt;TD&gt;&lt;FONT color=red size=+1&gt;&lt;B&gt;SÍ&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
  &lt;TR align=middle&gt;&lt;br /&gt;
    &lt;TD&gt;&amp;lt;a href=&quot;../foo/bar.wml&quot;&amp;gt;&lt;BR&gt;&amp;lt;a href=&quot;#myID&quot;&amp;gt;&lt;br /&gt;
    &lt;TD&gt;&amp;lt;a ref=&quot;http://my.server.com/foo/bar.wml&quot;&amp;gt;&lt;BR&gt;&amp;lt;a &lt;br /&gt;
      href=&quot;http://my.server.com/foo/bar.wml#myID&quot;&amp;gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Nombre de variables &lt;br /&gt;
y ficheros&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;No olvides que los datos se envian y reciben a través del aire. La velocidad suele se de 9600. Intenta que se envien el menor volumen de datos posible.&lt;BR&gt;&lt;B&gt;Idea 1:&lt;/B&gt; Usa nombres de ficheros lo más cortos posibles. Ej: http:&quot;//my.server.com/i.wml&quot; mejor que http://my.server.com/index.wml&lt;BR&gt;&lt;B&gt;Idea 2:&lt;/B&gt; Usa nombres de variables lo más cortos posibles. Si usas menos de 25 variables lo mejor es que uses las letras del alfabeto.&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Imágenes&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;Cuidado. No todos los dispositivos WAP aceptan imágenes. Utilízalas lo menos posible. Alguna SDK si las aceptan, pero... Y si las utilizas no te olvides &lt;B&gt;nunca&lt;/B&gt; de poner el atributo &lt;B&gt;alt&lt;/B&gt; &amp;lt;img src=&quot;imagen.gif&quot; alt=&quot;Icono&quot; /&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Nombre de variables &lt;br /&gt;
y ficheros&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;¿Has intentado alguna vez escribir un password en un teléfono móvil? Es muy fácil en un PC o en un PDA, pero en un teléfono... Procura no usar el atributo type=&quot;password&quot; en los input&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;¿Listas o Links &lt;br /&gt;
normales?&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;Hay dos formas de crear una lista de 2 links, con un select o con a. Recomendamos la segunda por lo que se explica abajo&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;TABLE cellPadding=5 border=1&gt;  &lt;TBODY&gt;
  &lt;TR align=middle&gt;
    &lt;TD&gt;&lt;FONT color=red size=+1&gt;&lt;B&gt;NO&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
    &lt;TD&gt;&lt;FONT color=red size=+1&gt;&lt;B&gt;SÍ&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
  &lt;TR&gt;&lt;br /&gt;
    &lt;TD&gt;&amp;lt;select ivalue=&quot;0&quot;&amp;gt;&lt;BR&gt;&amp;lt;option onpick=&quot;#Card2&quot;&amp;gt;Link &lt;br /&gt;
      1&amp;lt;/option&amp;gt;&lt;BR&gt;&amp;lt;option onpick=&quot;#Card3&quot;&amp;gt;Link &lt;br /&gt;
      2&amp;lt;/option&amp;gt;&lt;BR&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;
    &lt;TD&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;#Card2&quot;&amp;gt;Link &lt;br /&gt;
      1&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;BR&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;#Card3&quot;&amp;gt;Link &lt;br /&gt;
      2&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;TR&gt;&lt;br /&gt;
    &lt;TD&gt;&lt;br /&gt;
      &lt;CENTER&gt;&lt;B&gt;Así se va a ver&lt;/B&gt;&lt;/CENTER&gt;&lt;br /&gt;
    &lt;TD&gt;&lt;br /&gt;
      &lt;CENTER&gt;&lt;B&gt;Así se va a ver&lt;/B&gt;&lt;/CENTER&gt;&lt;br /&gt;
  &lt;TR&gt;&lt;br /&gt;
    &lt;TD&gt;&lt;br /&gt;
      &lt;FORM&gt;&lt;INPUT type=radio CHECKED&gt;aaaa&lt;BR&gt;&lt;INPUT type=radio&gt;bbb&lt;/FORM&gt;El &lt;br /&gt;
      problema es que como aparece&lt;BR&gt;seleccionado el primer link,&lt;BR&gt;no podemos &lt;br /&gt;
      accionarlo, y&lt;BR&gt;si bajamos al segundo,&lt;BR&gt;se inicializa el evento &lt;br /&gt;
      onpick&lt;BR&gt;y nos vamos a al Card3&lt;br /&gt;
    &lt;TD&gt;&lt;U&gt;Link 1&lt;BR&gt;Link 2 &lt;/U&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; 
color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Newcontext=&quot;true&quot;&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;&amp;amp;Iquest;Has visto en el código de alguna página &amp;lt;card id=&quot;card1&quot; title=&quot;Currency&quot; newcontext=&quot;true&quot;&amp;gt;? ¿ Lo has probado?&lt;BR&gt;Si pones ese atributo, las variables se borran, &lt;B&gt;incluso la history&lt;/B&gt;, por lo que no se puede usar el back. Para inicializar variables es mejor&lt;BR&gt;&amp;lt;card title=&quot;Titulo&quot;&amp;gt;&lt;BR&gt;&amp;lt;&amp;lt;onevent &quot;onenterforward&quot;&amp;gt;&lt;BR&gt;&amp;lt;refresh&amp;gt;&lt;BR&gt;&amp;lt;setvar name=&quot;Var1&quot; value=&quot; &lt;br /&gt;
&quot;/&amp;gt;&lt;BR&gt;&amp;lt;setvar name=&quot;some_var2&quot; value=&quot; &lt;br /&gt;
&quot;/&amp;gt;&lt;BR&gt;&amp;lt;/refresh&amp;gt;&lt;BR&gt;&amp;lt;/onevent&amp;gt;&lt;BR&gt;...&lt;BR&gt;&amp;lt;/card&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Pasar datos a ASP o &lt;br /&gt;
CGI&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;Por ejemplo con un &lt;br /&gt;
input:&lt;BR&gt;&amp;lt;input format=&quot;NN&quot; name=&quot;Var1&quot; title=&quot;Var1:&quot;/&amp;gt;&lt;BR&gt;&amp;lt;do &lt;br /&gt;
type=&quot;accept&quot; label=&quot;Mandar:&quot;&amp;gt;&lt;BR&gt;&amp;lt;go &lt;br /&gt;
href=&quot;http://*****/test.asp?datos=$(Var1)&quot;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;CENTER&gt;&lt;br /&gt;
&lt;HR width=&quot;65%&quot;&gt;&lt;/CENTER&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;B&gt;&lt;I&gt;Detectar en el &lt;br /&gt;
servidor si se accede con un dispositivo WAP&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;Sorry, pero no lo he traducido... &lt;/font&gt;&lt;br /&gt;
XP &lt;BR&gt;Sacado de http://www.egroups.com/group/wmlprogramming &lt;br /&gt;
&lt;P&gt;I tried to redirect my browser clients using ASP and following your sample &lt;br /&gt;
code. For some reason the content type is text/html. I submit the code see if &lt;br /&gt;
any of you can see whats wrong. The redirect woks fine when I use the web &lt;br /&gt;
browser. &lt;br /&gt;
&lt;P&gt;---------code----------------------------------------------------- &lt;br /&gt;
&lt;BR&gt;&amp;lt;%Response.ContentType = &quot;text/vnd.wap.wml&quot;%&amp;gt; &lt;BR&gt;&amp;lt;% Dim uastring, &lt;br /&gt;
wmlURL, htmlURL &lt;BR&gt;uastring = request.ServerVariables(&quot;HTTP_USER_AGENT&quot;) &lt;br /&gt;
&lt;BR&gt;wmlURL = &quot;/martin/index.wml&quot; &lt;BR&gt;htmlURL = &quot;some URL&quot; &lt;BR&gt;If &lt;br /&gt;
(InStr(uastring,&quot;UP&quot;) Or InStr(uastring, &quot;Nokia&quot;) Or InStr(uastring, &lt;BR&gt;&quot;Wap&quot;)) &lt;br /&gt;
Then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Redirect wmlURL &lt;BR&gt;else &lt;br /&gt;
&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Redirect htmlURL &lt;BR&gt;End If %&amp;gt; &lt;br /&gt;
&lt;BR&gt;-------End of code--------------------------------------- &lt;BR&gt;Marco &lt;br /&gt;
&lt;BR&gt;&amp;nbsp; &lt;br /&gt;
&lt;P&gt;The only problem with this approach is when you encounter a phone that does &lt;br /&gt;
not support WMLScript, or your site gets hit by an HTML client. You&#39;re much &lt;br /&gt;
better off checking on the server end first. This is a trivial exercise in just &lt;br /&gt;
about any language, Perl, ASP, Java, etc... &lt;br /&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;In Perl 5&lt;/I&gt;&lt;/B&gt; &lt;BR&gt;#!/usr/local/bin/perl5 &lt;br /&gt;
&lt;P&gt;$ua = $ENV{&quot;HTTP_USER_AGENT&quot;}; &lt;BR&gt;if ($ua =~ &quot;UP&quot;){ print &quot;Status: 302 Moved &lt;br /&gt;
Temporarily\r Location: &amp;lt;one location&amp;gt;&quot;; } elsif($ua =~ &quot;Nokia&quot;){ ... &lt;br /&gt;
&lt;P&gt;You get the picture. &lt;br /&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;In asp, this construct would look like:&lt;/I&gt;&lt;/B&gt; &lt;BR&gt;&lt;br /&gt;
&lt;P&gt;Dim uastring &lt;BR&gt;uastring = request.ServerVariables(&quot;HTTP_USER_AGENT&quot;) &lt;BR&gt;If &lt;br /&gt;
(InStr(uastring,&quot;UP&quot;))Then Response.Redirect(&amp;lt;onelocation&amp;gt;) &lt;BR&gt;&lt;br /&gt;
&lt;P&gt;&lt;B&gt;and in a Java Servlet it would look like this:&lt;/B&gt; &lt;br /&gt;
&lt;P&gt;String ua = req.getHeader(HTTP_USER_AGENT); &lt;BR&gt;if (ua.indexOf(&quot;UP&quot;)!= null){ &lt;br /&gt;
&lt;BR&gt;res.setStatus(res.SC_MOVED_TEMPORARILY); &lt;BR&gt;res.setHeader(&quot;Location&quot;, &lt;br /&gt;
&amp;lt;one location&amp;gt;); &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/1270688432578905682/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-vi-final.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1270688432578905682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1270688432578905682'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-vi-final.html' title='Manual WML - Parte VI Final'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-1432180714515618066</id><published>2009-11-27T07:51:00.000-08:00</published><updated>2009-11-27T07:51:25.052-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WML"/><title type='text'>Manual WML - Parte V</title><content type='html'>&lt;FONT face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;B&gt;&lt;I&gt;17-La etiqueta &lt;br /&gt;
postfield&lt;/I&gt;&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;P&gt;&lt;FONT face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;TABLE cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;  &lt;TBODY&gt;
  &lt;TR align=&quot;middle&quot;&gt;
    &lt;TD&gt;&lt;B&gt;Etiqueta&lt;/B&gt;&lt;/td&gt;
    &lt;TD&gt;&lt;B&gt;Explicación&lt;/B&gt;&lt;/td&gt;
    &lt;TD&gt;&lt;B&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;TR&gt;
    &lt;TD&gt;&lt;I&gt;name&lt;/I&gt;&lt;/td&gt;
    &lt;TD&gt;Nombre de la variable que va a enviar el usuario(Obligatorio)&lt;/td&gt;
    &lt;TD&gt;Texto&lt;/td&gt;&lt;/tr&gt;
  &lt;TR&gt;
    &lt;TD&gt;&lt;I&gt;value&lt;/I&gt;&lt;/td&gt;
    &lt;TD&gt;Valor que toma la variable a enviar&lt;/td&gt;
    &lt;TD&gt;Texto&lt;/td&gt;&lt;/tr&gt;
  &lt;TR&gt;
    &lt;TD colSpan=&quot;3&quot;&gt;&lt;B&gt;Notas: &lt;/B&gt;&lt;B&gt;Atención:&lt;/B&gt; Normalmente los datos deben ser enviados en formato escape al servidor, por lo que si los recibimos de un input debemops transformarlos(&amp;lt;postfield name=&quot;f&quot; &lt;br /&gt;
      value=&quot;$(datos:e)&quot;/&amp;gt; este tema se amplia en variables) Se utiliza &lt;br /&gt;
      dentro de una etiqueta go. Acaba siempre con una barra /.&lt;FONT color=&quot;red&quot;&gt; &lt;br /&gt;
      No todos los dispositivos WAP (Ej. Nokia 7110) aceptan el envio de &lt;br /&gt;
      datos&lt;/FONT&gt;&lt;/Td&gt;&lt;/tr&gt;
  &lt;TR&gt;
    &lt;TD colSpan=&quot;2&quot;&gt;&lt;B&gt;Ejemplo&lt;/B&gt;&lt;BR&gt;&amp;lt;go method=&quot;post&quot; &lt;br /&gt;
      href=&quot;http://www.empresa.com/cgi/banco&quot;&amp;gt;&lt;BR&gt;&amp;lt;postfield name=&quot;Dinero&quot; &lt;br /&gt;
      value=&quot;10000&quot;/&amp;gt;&lt;BR&gt;&amp;lt;postfield name=&quot;Num_Cta&quot; &lt;br /&gt;
      value=&quot;12345&quot;/&amp;gt;&lt;BR&gt;&amp;lt;postfield name=&quot;Operacion&quot; &lt;br /&gt;
      value=&quot;Deposito&quot;/&amp;gt;&lt;BR&gt;&amp;lt;/go&amp;gt; &lt;/td&gt;
    &lt;TD vAlign=&quot;top&quot;&gt;&lt;B&gt;Explicación:&lt;/B&gt;&lt;BR&gt;Enviamos los campos Dinero=10000, Num_Cta=12345 y Operacion=Deposito al servidor &lt;/td&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR&gt;&lt;FONT 
face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;B&gt;&lt;I&gt;18- La etiqueta setvar&lt;/I&gt;&lt;/B&gt;&lt;br /&gt;
&lt;/font&gt;&lt;P&gt;&lt;FONT face=&quot;verdana, arial&quot; size=&quot;2&quot;&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;TABLE cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;  &lt;TBODY&gt;
  &lt;TR align=&quot;middle&quot;&gt;
    &lt;TD&gt;&lt;B&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;
    &lt;TD&gt;&lt;B&gt;Explicación&lt;/B&gt;&lt;/TD&gt;
    &lt;TD&gt;&lt;B&gt;Valores que puede tomar &lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
  &lt;TR&gt;
    &lt;TD&gt;&lt;I&gt;name&lt;/I&gt;&lt;/Td&gt;
    &lt;TD&gt;Nombre de la variable que va a inicializar(Obligatorio)&lt;/Td&gt;
    &lt;TD&gt;Texto&lt;/TD&gt;&lt;/Tr&gt;
  &lt;TR&gt;
    &lt;TD&gt;&lt;I&gt;value&lt;/I&gt;&lt;/tD&gt;
    &lt;TD&gt;Valor que toma la variable&lt;/TD&gt;
    &lt;TD&gt;Texto&lt;/Td&gt;&lt;/TR&gt;
  &lt;TR&gt;
    &lt;TD colSpan=&quot;3&quot;&gt;&lt;B&gt;Notas: &lt;/B&gt;Se suele utilizar dentro de otras etiquetas. Acaba siempre con una barra /&lt;/TD&gt;&lt;/TR&gt;
  &lt;TR&gt;
    &lt;TD colSpan=&quot;3&quot;&gt;&lt;B&gt;Ejemplo&lt;/B&gt;&lt;BR&gt;&amp;lt;go href=&quot;#card2&quot;&amp;gt;&lt;BR&gt;&amp;lt;setvar name=&quot;Anterior&quot; value=&quot;Card1&quot; /&amp;gt;&lt;BR&gt;&amp;lt;/go&amp;gt;&lt;/td&gt; 
&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR&gt;&lt;FONT face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;B&gt;&lt;I&gt;&lt;br /&gt;
19- Las variables. Nombres y Usos&lt;/I&gt;&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;P&gt;&lt;DIV align=&quot;justify&quot;&gt;Las variables, siguen el formato normal de la gran mayoría de lenguajes. Deben empezar por una letra o guión bajo y pueden seguir por otras letras, guiones o números. No uses símbolos ni eñes y &lt;B&gt;ni mucho menos el signo dólar &amp;amp;&lt;/B&gt;. Las variables son &lt;B&gt;Case Sensitive&lt;/B&gt;, lo que implica que diferencian mayúsculas de minúsculas, Variable no es lo mismo que variable, ni que VaRiAbLe.&lt;br /&gt;
&lt;/p&gt;&lt;P&gt;&lt;U&gt;Sustitución de variables&lt;/U&gt;: A veces queremos que una valor o atributo sea sustituido por los datos que hay almacenados en una variable, y esto se consigue anteponiendo el signo dolar al nombre de la variable entre paréntesis. &lt;br /&gt;
&lt;B&gt;Ej.&lt;/B&gt;&lt;BR&gt;&amp;lt;input type=&quot;text&quot; name=&quot;Nombre&quot;/&amp;gt;&amp;lt;postfield name=&quot;dato1&quot; value=&quot;Nombre&quot;/&amp;gt; Esto lo que hace es pasar al servidor el campo dato1 con el valor Nombre, no el nombre que introdujo el usuaior&lt;BR&gt;&amp;lt;input type=&quot;text&quot; name=&quot;Nombre&quot;/&amp;gt;&amp;lt;postfield name=&quot;dato1&quot; value=&quot;$(Nombre)&quot;/&amp;gt; Esto lo que hace es pasar al servidor el campo dato1 con el nombre que el usuario ha escrito en el input. (Cuidado aún tiene un pequeqo fallo que explicamos ahora).&lt;br /&gt;
&lt;/p&gt;&lt;P&gt;&lt;U&gt;Caracteres de escape&lt;/U&gt;: A veces los servidores necesitan obtener la información en formato de caracteres de escape(el típico &lt;br /&gt;
&lt;I&gt;http:\\empresa.com\bancos?%24insertar%24%26true&lt;/I&gt;), o una información &lt;br /&gt;
obtenida en este formato pasarla a normal. Para ello usamos las transformaciones que implementa WML.&lt;BR&gt;$(nombre_variable:e) --&amp;gt; Pasar a formato escape --&amp;gt; Si el valor de la variable es &lt;B&gt;abc=?&lt;/B&gt; nos da &lt;br /&gt;
&lt;B&gt;abc%3D%3F&lt;/B&gt;&lt;BR&gt;$(nombre_variable:unesc) --&amp;gt; Pasar a formato unescape --&amp;gt;Si el valor de la variable es &lt;B&gt;abc%3D%3F&lt;/B&gt; nos da &lt;B&gt;abc=?&lt;/b&gt;&lt;/P&gt;&lt;/DIV&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/1432180714515618066/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-v.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1432180714515618066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1432180714515618066'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-v.html' title='Manual WML - Parte V'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-4374902815602547335</id><published>2009-11-26T14:12:00.000-08:00</published><updated>2009-11-26T14:14:42.116-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WML"/><title type='text'>Manual WML - Parte IV</title><content type='html'>&lt;font face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;&lt;i&gt;13- La etiqueta &lt;br /&gt;
input&lt;/I&gt;&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=&quot;2&quot;&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;name&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Nombre de la variable que va a tomar los datos que introduzca el &lt;br /&gt;
usuario(Obligatorio)&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;value&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Valor que aparece en el campo input por defecto. Debe cumplir las &lt;br /&gt;
reglas de formato de este campo o si no será ignorado; También será &lt;br /&gt;
ignorado si la variable ya tiene un valor previo&lt;/td&gt;     &lt;td&gt;Texto&lt;/Td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;type&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Forma en la que se introducen los datos&lt;/td&gt;     &lt;td&gt;&lt;i&gt;text&lt;/I&gt; Texto normal&lt;br /&gt;
&lt;i&gt;password&lt;/I&gt; Aparecen asteriscos en vez del texto tecleado. &lt;b&gt;NO&lt;/B&gt; se recomienda, ya que para escribir con un telef. móvil es muy complicado &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;format&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Formato en que se acepta la introducción de datos&lt;/td&gt;     &lt;td&gt;El formato por defecto es &lt;i&gt;*M&lt;/I&gt;, o sea cualquier caracter en &lt;br /&gt;
mayúsculas.&lt;br /&gt;
&lt;i&gt;A=&lt;/I&gt; Cualquier caracter no numérico en &lt;br /&gt;
mayúsculas&lt;br /&gt;
&lt;i&gt;a=&lt;/I&gt; Cualquier caracter no numérico en &lt;br /&gt;
minúsculas&lt;br /&gt;
&lt;i&gt;N=&lt;/I&gt; Sólo números&lt;br /&gt;
&lt;i&gt;X=&lt;/I&gt; Cualquier caracter en mayúsculas&lt;br /&gt;
&lt;i&gt;x=&lt;/I&gt; Cualquier caracter en minúsculas&lt;br /&gt;
&lt;i&gt;\dato=&lt;/I&gt; Dato es un valor que queremos que aparezca tal cual &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;emptyok&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;En true si queremos que no sea obligatorio introducir este dato, ya que si tenemos un formato en un campo y no queremos cubrirlo, si lo &lt;br /&gt;
dejamos en blanco puede no cumplir el formato, lo que nos da un error&lt;/td&gt;     &lt;td&gt;True o false(Por defecto si el campo tiene formato)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;size&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Especifica el ancho en caracteres del input&lt;/td&gt;     &lt;td&gt;Número&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;maxlenght&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Especifica el número máximo de caracteres a introducir&lt;/td&gt;     &lt;td&gt;Número&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;title&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Título usado en la presentación del objeto&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;tabindex&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Especifica el orden en que se accede a los distintos objetos dentro de una card. Por defecto de arriba a abajo&lt;/td&gt;     &lt;td&gt;Número&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;Siempre se acaba la etiqueta con una barra /&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo&lt;/B&gt;&lt;br /&gt;
&amp;lt;input type=&quot;text&quot; name=&quot;ape1&quot; &lt;br /&gt;
format=&quot;A&quot; maxlength=&quot;25&quot; emptyok=true /&amp;gt;&amp;nbsp; &lt;i&gt;Acepta 25 letras en mayúsculas y las almacena en la variable ape1. No es un campo &lt;br /&gt;
obligatorio(emptyok=true)&lt;/I&gt;&lt;br /&gt;
&amp;lt;input type=&quot;text&quot; name=&quot;fecha&quot; &lt;br /&gt;
format=&quot;NN\-NN\-19NN&quot; maxlength=&quot;10&quot;/&amp;gt; &amp;nbsp; &lt;i&gt;Acepta solamente &lt;br /&gt;
números y ya pone el los quiones y el 19, almacenando esto en la variable fecha. Es un campo obligatorio &lt;/I&gt;&lt;/td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font 
face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;&lt;i&gt;14- La etiqueta select&lt;/I&gt;&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=&quot;2&quot;&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;name&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Nombre de la variable que va a tomar los datos que introduzca el &lt;br /&gt;
usuario(Obligatorio)&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;value&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Valor que tiene la variable por defecto.&lt;/Td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;multiple&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Posibilidad de seleccionar más de una opción. Si es así el valor de la variable será ambos valores separados po ;&lt;/td&gt;     &lt;td&gt;True ó False(por defecto)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;ivalue&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Deternima el index de la opción que queremos que esté seleccionada por defecto. El primer item es 0, el segundo 1....&lt;/td&gt;     &lt;td&gt;Número&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;title&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Título usado en la presentación del objeto&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;Siempre utilizaremos la opción ivalue=0, o al menu que queremos que sea seleccionado por defecto. Siempre se acaba con la etiqueta &amp;lt;/select&amp;gt;. Dentro de esta etiqueta deben ir &lt;br /&gt;
&amp;lt;option&amp;gt; o &amp;lt;optgroup&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo:&lt;/B&gt; Se ven en las siguientes etiquetas &lt;br /&gt;
&lt;/td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;&lt;i&gt;15- La etiqueta option&lt;/I&gt;&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;value&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Valor que toma la variable al seleccionar este item&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;title&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Título usado en la presentación del objeto&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;onpick=&lt;/td&gt;     &lt;td&gt;Evento que ocurre al seleccionar o deseleccionar un item&lt;/td&gt;     &lt;td&gt;Href. URL o dirección de otra card&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;Siempre se acaba con la etiqueta &lt;br /&gt;
&amp;lt;/option&amp;gt;. Debe estar dentro de la etiqueta &amp;lt;select&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;b&gt;Ejemplo:&lt;/B&gt;&lt;br /&gt;
&amp;lt;select name=&quot;mascota&quot; value=&quot;N&quot; &lt;br /&gt;
ivalue=1&amp;gt;&lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;N&quot;&amp;gt;Ninguno&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;P&quot;&amp;gt;Perro&amp;lt;&amp;lt;/option&amp;gt; &lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;G&quot;&amp;gt;Gato&amp;lt;&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;/select&amp;gt;&lt;br /&gt;
&lt;/td&gt;     &lt;td vAlign=&quot;top&quot; colSpan=&quot;2&quot;&gt;&lt;b&gt;Explicación:&lt;/B&gt;&lt;br /&gt;
Tenemos 3 opciones, y por defecto Ninguno seleccionada(ivalue=1). Sólo podemos elegir 1 de ellas. Si elegimos Perro, la variable mascota es P, gato es G y si no elegimos nada N(value=&quot;N&quot;). &lt;/td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font face=&quot;verdana, arial&quot; 
color=&quot;#0057dc&quot;&gt;&lt;b&gt;&lt;i&gt;16- La etiqueta optgroup&lt;/I&gt;&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;title&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Título usado en la presentación del objeto&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;Siempre se acaba con la etiqueta &lt;br /&gt;
&amp;lt;/optgroup&amp;gt;. Esta etiqueta es usada para aglurinar a varias option&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;b&gt;Ejemplo:&lt;/B&gt;&lt;br /&gt;
&amp;lt;select name=&quot;Pais&quot;&amp;gt;&lt;br /&gt;
&amp;lt;optgroup &lt;br /&gt;
title=&quot;América&quot;&amp;gt;&lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;USA&quot;&amp;gt;USA&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;Mex&quot;&amp;gt;México&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;/optgroup&amp;gt; &lt;br /&gt;
&amp;lt;optgroup title=&quot;Europa&quot;&amp;gt;&lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;Esp&quot;&amp;gt;Espaqa&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;option &lt;br /&gt;
value=&quot;Fra&quot;&amp;gt;Francia&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;/optgroup&amp;gt;&lt;br /&gt;
&amp;lt;/select&amp;gt;&lt;/td&gt;     &lt;td vAlign=&quot;top&quot; colSpan=&quot;2&quot;&gt;&lt;b&gt;Explicación:&lt;/B&gt;&lt;br /&gt;
Tenemos 2 opciones dentro de cada subgrupo. Sólo podemos elegir 1 de ellas. Primero seleccionamos el continente, y dependiendo del seleccionado, nos salen las siguientes opciones, y allí elegimos el valor que asignaremos a la variable Pais&lt;/td&gt; &lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/4374902815602547335/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-iv.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/4374902815602547335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/4374902815602547335'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-iv.html' title='Manual WML - Parte IV'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-4647786518553137733</id><published>2009-11-26T13:54:00.000-08:00</published><updated>2009-11-26T13:55:37.388-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WML"/><title type='text'>Manual WML - Parte III</title><content type='html'>&lt;font face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;9- La etiqueta &lt;br /&gt;
a&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=&quot;2&quot;&gt;Los atributos de esta etiqueta son:&lt;br /&gt;
&lt;/FONT&gt;&lt;/P&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;
&lt;/TR&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/TD&gt;
&lt;td&gt;El texto que sale al entrar en las opciones&lt;/TD&gt;
&lt;td&gt;Texto&lt;/TD&gt;
&lt;/TR&gt;

&lt;tr&gt;
&lt;td&gt;href&lt;/TD&gt;
&lt;td&gt;Dirección a la que accederemos&lt;/TD&gt;
&lt;td&gt;Href. URL u otra card&lt;/TD&gt;
&lt;/TR&gt;

&lt;tr&gt;
&lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;Se cierra con &amp;lt;/a&amp;gt;&lt;/TD&gt;
&lt;/TR&gt;

&lt;tr&gt;
&lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo&lt;/B&gt;&lt;br /&gt;
&amp;lt;?xml &lt;br /&gt;
version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML &lt;br /&gt;
1.1//EN&quot; &lt;br /&gt;
&quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot;&amp;gt;&lt;br /&gt;
&amp;lt;wml&amp;gt;&lt;br /&gt;
&amp;lt;card id=&quot;links&quot; title=&quot;Links&quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Este es un texto normal, pero aquí hay un&lt;br /&gt;
&amp;lt;a title=&quot;LINK&quot; href=&quot;#card2&quot;&amp;gt;link!&lt;br /&gt;
&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;&lt;br /&gt;
&amp;lt;card &lt;br /&gt;
id=&quot;card2&quot; title=&quot;Segunda Card&quot;&amp;gt;&lt;br /&gt;
&amp;lt;p &lt;br /&gt;
align=&quot;center&quot;&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Estamos en la&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Card2       &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;&lt;br /&gt;
&amp;lt;/wml&amp;gt;&lt;br /&gt;
&lt;b&gt;Explicación:&lt;/B&gt; &lt;br /&gt;
Aparece en la pantalla: Este es un texto normal, pero aquí hay un &lt;br /&gt;
&lt;u&gt;link!&lt;/U&gt; y en la barra de navegación del browser aparece &lt;br /&gt;
&lt;b&gt;options&lt;/B&gt;. Al acceder a &lt;b&gt;options&lt;/B&gt; nos aparece la lista de links activos(en este caso solamente uno). &lt;/TD&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font 
face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;10- La etiqueta &lt;br /&gt;
timer&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/FONT&gt;&lt;/P&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/Td&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;id&lt;/TD&gt;     &lt;td&gt;Identificador del objeto. Usado para referirse a ella&lt;/TD&gt;     &lt;td&gt;Texto&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;value&lt;/Td&gt;     &lt;td&gt;Tiempo que debe pasar para que se inicialize el evento. Se expresa en décimas de segundo&lt;/Td&gt;     &lt;td&gt;Número &lt;/TD&gt;  &lt;/TR&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;Si se utiliza una etiqueta timer, siempre hay que definir en la card el valor ontimer, bién sea a otra card &lt;br /&gt;
ontimer=&quot;#card2&quot; u a otra URL ontimer=&quot;http://otraempresa.com/pub/inicio.wml&quot;&lt;/TD&gt;&lt;/TR&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo&lt;/B&gt;&lt;br /&gt;
&amp;lt;?xml &lt;br /&gt;
version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML &lt;br /&gt;
1.1//EN&quot; &lt;br /&gt;
&quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot;&amp;gt;&lt;br /&gt;
&amp;lt;wml&amp;gt;&lt;br /&gt;
&amp;lt;card  id=&quot;card1&quot; ontimer=&quot;#card2&quot; title=&quot;Demostrando un timer&quot;&amp;gt;&lt;br /&gt;
&amp;lt;timer value=&quot;35&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;p align=&quot;center&quot;&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt; Bienvenidos a ... &amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;&lt;br /&gt;
&amp;lt;card &lt;br /&gt;
id=&quot;card2&quot; ontimer=&quot;#card3&quot; title=&quot;Demostrando un timer&quot;&amp;gt;&lt;br /&gt;
&amp;lt;timer  value=&quot;50&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;p align=&quot;center&quot;&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; &lt;br /&gt;
WAP facil&amp;lt;br/&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt; Wireless Application Protocol  &amp;lt;/u&amp;gt;&lt;br /&gt;
... &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;&lt;br /&gt;
&amp;lt;card id=&quot;card3&quot;  title=&quot;Demostrando un timer&quot;&amp;gt;&lt;br /&gt;
&amp;lt;p &lt;br /&gt;
align=&quot;center&quot;&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;i&amp;gt; El mejor curso! &lt;br /&gt;
&amp;lt;/i&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;&lt;br /&gt;
&amp;lt;/wml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;&lt;b&gt;Explicación:&lt;/B&gt; Lo primero que vemos es una &lt;br /&gt;
pantalla con un texto que dice Bienvenidos a ... y al cumplirse el timer &lt;b&gt;&amp;lt;timer&amp;nbsp;value=&quot;35&quot;/&amp;gt;&lt;/B&gt;, pasa a la siguiente y al cumplirse el timer de esta se pasa a la última. &lt;br /&gt;
&lt;/DIV&gt;&lt;/Td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font face=&quot;verdana, arial&quot; 
color=#0057dc&gt;&lt;b&gt;11- La etiqueta img&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;src&lt;/Td&gt;     &lt;td&gt;Lugar donde se encuentra la imagen&lt;/td&gt;     &lt;td&gt;Href. Por ahora solamente se aceptan ficheros &lt;b&gt;.wbmp&lt;/B&gt;, pero en un futuro se aceptarán GIF y JPG(El Nokia WAP Toolkit 1.2 acepta GIF y JPG) .  Descárgate el conversor de ficheros &lt;a 
  href=&quot;http://www.terra.es/personal/wapfacil/archie/conv.zip&quot;&gt;PULSANDO &lt;br /&gt;
AQUÍ&lt;/A&gt;&lt;/Td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;alt&lt;/td&gt;     &lt;td&gt;Texto alternativo. Se recomienda usarlo siempre&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;vspace y hspace&lt;/td&gt;     &lt;td&gt;Espacio en blanco entre la imagen y el resto de contenidos. Si es &lt;br /&gt;
expresado en porcentaje, representa el espacio total de visión del &lt;br /&gt;
browser, no las medidas de la imagen&lt;/td&gt;     &lt;td&gt;Número o porcentaje&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;align&lt;/Td&gt;     &lt;td&gt;Alineación del texto con respecto a la imagen&lt;/td&gt;     &lt;td&gt;top, middle o bottom&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;height y width&lt;/Td&gt;     &lt;td&gt;Alto y ancho de la imagen(por este orden)&lt;/td&gt;     &lt;td&gt;Número&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;id&lt;/Td&gt;     &lt;td&gt;Identificador del objeto. Usado para referirse a ella&lt;/td&gt;     &lt;td&gt;Texto&lt;/Td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;&lt;font color=&quot;red&quot;&gt;Siempre&lt;/FONT&gt; se debe &lt;br /&gt;
utilizar la propiedad alt, ya que al estar WML aún en desarrollo, &lt;br /&gt;
nunca sabemos si el navegador que se está usando acepta imágenes. Esta etiqueta siempre acaba con una barra / &lt;/Td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo&lt;/B&gt;&lt;br /&gt;
&amp;lt;img src=&quot;./images/ojo.wbmp&quot; alt=&quot;ojo&quot; &lt;br /&gt;
align=&quot;middle&quot; /&amp;gt; &lt;/td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font face=&quot;verdana, arial&quot; 
color=&quot;#0057dc&quot;&gt;&lt;b&gt;12- La etiqueta table&lt;/B&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/Td&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/td&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;title&lt;/tD&gt;     &lt;td&gt;Título de este elemento.&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;colums&lt;/td&gt;     &lt;td&gt;Número de columnas que van a ser representadas. Se recomienda usarlo siempre. El valor 0 es un error en WML&lt;/td&gt;     &lt;td&gt;Número&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;align&lt;/td&gt;     &lt;td&gt;Alineación del texto dentro de su celda&lt;/td&gt;     &lt;td&gt;L= Izquierda&lt;br /&gt;
C= Centro&lt;br /&gt;
R= Derecha&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;id&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Identificador del objeto. Usado para referirse a el&lt;/td&gt;     &lt;td&gt;Texto&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;&amp;lt;tr&amp;gt;&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Definición de salto de línea. Se cierra con &amp;lt;/tr&amp;gt;&lt;/td&gt;     &lt;td&gt;Ninguno&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;&lt;i&gt;&amp;lt;td&amp;gt;&lt;/I&gt;&lt;/td&gt;     &lt;td&gt;Definición de salto de columna. Se cierra con &amp;lt;/td&amp;gt;&lt;/td&gt;     &lt;td&gt;Ninguno &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;center&gt;Ejemplo&lt;/CENTER&gt;&lt;/B&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;2&quot;&gt;&amp;lt;table &lt;br /&gt;
columns=2&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;Pais&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;l/m2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;Suiza&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1,3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;Francia&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2,5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/td&gt;     &lt;td&gt;&lt;br /&gt;
&lt;center&gt;&lt;b&gt;Ventana del browser&lt;/B&gt;&lt;br /&gt;
&lt;table cellPadding=&quot;20&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;           &lt;td&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;                 &lt;td&gt;Pais&lt;/TD&gt;                 &lt;td&gt;l/m2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;                 &lt;td&gt;Suiza&lt;/TD&gt;                 &lt;td&gt;1,3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;                 &lt;td&gt;Francia&lt;/TD&gt; &lt;td&gt;2,5&lt;/td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/td&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/CENTER&gt;&lt;/TR&gt;&lt;br /&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/4647786518553137733/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-iii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/4647786518553137733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/4647786518553137733'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-iii.html' title='Manual WML - Parte III'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-1316781409471430996</id><published>2009-11-26T12:59:00.000-08:00</published><updated>2009-11-26T13:03:54.127-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WML"/><title type='text'>Manual WML - Parte II</title><content type='html'>5- La etiqueta access&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;br /&gt;
&lt;/FONT&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar&lt;/B&gt;&lt;/TD&gt;
&lt;tr&gt;
&lt;tr&gt;     &lt;td&gt;id&lt;/TD&gt;     &lt;td&gt;Nombre de la etiqueta. Usado para referirse a ella&lt;/TD&gt;     &lt;td&gt;Texto&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;domain&lt;/TD&gt;     &lt;td&gt;Dominio de acceso&lt;/TD&gt;     &lt;td&gt;Href&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;path&lt;/TD&gt;     &lt;td&gt;Dirección de acceso&lt;/TD&gt;     &lt;td&gt;Href&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas:&lt;/B&gt; &lt;font color=&quot;red&quot;&gt;Atención&lt;/FONT&gt; Esta etiqueta debe ir dentro de la etiqueta &amp;lt;head&amp;gt; AQUI&lt;br /&gt;
&amp;lt;/head&amp;gt;. Si no se aplica la etiqueta access el acceso es libre.&lt;br /&gt;
&lt;/TD&gt;&lt;/TR&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Ej.&lt;/B&gt;&lt;br /&gt;
&amp;lt;access domain=&quot;miempresa.com&quot; &lt;br /&gt;
path=&quot;/pub&quot;&amp;gt;&lt;br /&gt;
Se accede a: miempresa.com/pub/stock.asp , &lt;br /&gt;
miempresa.com/pub/demos/ventas.cgi&lt;br /&gt;
&lt;b&gt;No&lt;/B&gt; se accede a: &lt;br /&gt;
miempresa.com/cgi-bin/ , otraempresa.com/index.wml&lt;/TD&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;6- La etiqueta &lt;br /&gt;
do&lt;/B&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;br /&gt;
&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;/FONT&gt;&lt;br /&gt;
&lt;table cellPadding=&quot;1&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;name&lt;/TD&gt;     &lt;td&gt;Nombre del objeto. Usado para referirse a ella&lt;/TD&gt;     &lt;td&gt;Texto&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;label&lt;/td&gt;
&lt;td&gt;Texto que aparece al pulsar el botón options en el navegador para &lt;br /&gt;
iniciar el evento&lt;/TD&gt;
&lt;td&gt;Texto&lt;/TD&gt;
&lt;/TR&gt;
&lt;tr&gt;
&lt;td&gt;type&lt;/TD&gt;
&lt;td&gt;Define el tipo de evento que se va a realizar&lt;/TD&gt;
&lt;td&gt;accept Aceptar&lt;br /&gt;
prev Ir atrás&lt;br /&gt;
reset Resetea el estado actual&lt;br /&gt;
options Operaciones opcionales&lt;br /&gt;
delete &lt;br /&gt;
Borra un objeto o selección &lt;/TD&gt;
&lt;/TR&gt;
&lt;tr&gt;
&lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas:&lt;/B&gt; Las etiquetas que pueden ir dentro de un do son &lt;b&gt;&lt;a      href=&quot;http://www.terra.es/personal/wapfacil/manwml2.htm#go&quot;&gt;&amp;lt;go &lt;br /&gt;
href=&quot;....&quot;/&amp;gt;,&lt;/A&gt; &lt;a 
href=&quot;http://www.terra.es/personal/wapfacil/manwml2.htm#pnr&quot;&gt;&amp;lt;prev/&amp;gt;,&lt;br /&gt;
&amp;lt;noop/&amp;gt;, &amp;lt;refresh/&amp;gt;.&lt;/A&gt;&lt;/B&gt;&lt;b&gt; Si una etiqueta&lt;/B&gt; &lt;br /&gt;
do tiene el mismo name que otra definida en la &lt;br /&gt;
template se usa la de esta card. &lt;br /&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;tr&gt;
&lt;td align=&quot;middle&quot; colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo&lt;/B&gt;&lt;br /&gt;
Si quieres ver este ejemplo &lt;br /&gt;
en acción con fotografías del teléfono móvil &lt;a 
      href=&quot;http://www.terra.es/personal/wapfacil/ejemplo2.htm&quot; 
      target=&quot;_blank&quot;&gt;PULSA AQUI&lt;/A&gt; y se abrirá otra ventana &lt;br /&gt;
&lt;/TD&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font face=&quot;verdana, arial&quot; color=#0057dc&gt;&lt;b&gt;7- La etiqueta go&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Los atributos de esta etiqueta son:&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Valores que puede tomar &lt;/B&gt;&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;href&lt;/TD&gt;     &lt;td&gt;Dirección a la que se quiere ir&lt;/TD&gt;     &lt;td&gt;Href. Url o nombre de otra card &lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;method&lt;/TD&gt;     &lt;td&gt;Utilizado para enviar datos al servidor. Se amplia con el tema &lt;br /&gt;
postfield&lt;/TD&gt;     &lt;td&gt;post o get &lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td colSpan=3&gt;&lt;b&gt;Notas: &lt;/B&gt;esta etiqueta siempre acaba con una barra &lt;br /&gt;
&amp;lt;go href=&quot;...&quot;/&amp;gt;&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td align=&quot;middle&quot; colSpan=&quot;3&quot;&gt;&lt;b&gt;Ejemplo&lt;/B&gt;&lt;br /&gt;
Si quieres ver este ejemplo en acción con fotografías del teléfono móvil &lt;a 
      href=&quot;http://www.terra.es/personal/wapfacil/ejemplo3.htm&quot; 
      target=&quot;_blank&quot;&gt;PULSA AQUI&lt;/A&gt; y se abrirá otra ventana &lt;br /&gt;
&lt;/TD&gt;&lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;font face=&quot;verdana, arial&quot; color=&quot;#0057dc&quot;&gt;&lt;b&gt;8- Las etiquetas prev, noop y refresh&lt;/B&gt;&lt;/FONT&gt;&lt;br /&gt;
&lt;p&gt;&lt;font face=&quot;verdana, arial&quot; size=2&gt;Estas etiquetas no tienen atributos&lt;br /&gt;
&lt;/FONT&gt;&lt;/P&gt;&lt;table cellPadding=&quot;5&quot; width=&quot;100%&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt;     &lt;td&gt;&lt;b&gt;Etiqueta&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Explicación&lt;/B&gt;&lt;/TD&gt;     &lt;td&gt;&lt;b&gt;Ejemplo &lt;/B&gt;&lt;/Td&gt;  &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;&amp;lt;prev/&amp;gt;&lt;/TD&gt;     &lt;td&gt;Ir a la página anterior&lt;/Td&gt;     &lt;td&gt;&amp;lt;do type=&quot;accept&quot; label=&quot;Oprima select&quot;&amp;gt;&amp;lt;go &lt;br /&gt;
href=&quot;#card2&quot;/&amp;gt;&amp;lt;/do&amp;gt;&lt;/TD&gt;   &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;&amp;lt;noop/&amp;gt;&lt;/TD&gt;     &lt;td&gt;Ninguna operación&lt;/TD&gt;     &lt;td&gt;&amp;lt;do type=&quot;accept&quot; label=&quot;Oprima select&quot;&amp;gt;&amp;lt;noop/&amp;gt;&amp;lt;/do&amp;gt;&lt;/TD&gt; &lt;/TR&gt;
&lt;tr&gt;     &lt;td&gt;&amp;lt;refresh/&amp;gt;&lt;/TD&gt;     &lt;td&gt;Resetea los valores&lt;/TD&gt;     &lt;td&gt;&amp;lt;do type=&quot;accept&quot; label=&quot;Oprima &lt;br /&gt;
select&quot;&amp;gt;&amp;lt;refresh/&amp;gt;&amp;lt;/do&amp;gt;&lt;/TD&gt;   &lt;/TD&gt;
&lt;tr&gt;     &lt;td colSpan=&quot;3&quot;&gt;&lt;b&gt;Notas: &lt;/B&gt;estas etiquetas siempre acaban con una barra / &lt;/TD&gt;   &lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/1316781409471430996/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-ii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1316781409471430996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1316781409471430996'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-ii.html' title='Manual WML - Parte II'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-3536232261604273632</id><published>2009-11-24T05:51:00.000-08:00</published><updated>2009-11-24T05:51:06.455-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Heroes"/><title type='text'>Heroes 5 Temporada: Redemption Capitulo 11 Thanksgiving</title><content type='html'>&lt;object height=&quot;330&quot; width=&quot;440&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.megavideo.com/v/B2YZOQOV74086a8034459251ee596af8f1171dfe&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.megavideo.com/v/B2YZOQOV74086a8034459251ee596af8f1171dfe&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;440&quot; height=&quot;330&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/3536232261604273632/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/heroes-5-temporada-redemption-capitulo_24.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3536232261604273632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3536232261604273632'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/heroes-5-temporada-redemption-capitulo_24.html' title='Heroes 5 Temporada: Redemption Capitulo 11 Thanksgiving'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-7031128471245703008</id><published>2009-11-23T08:03:00.000-08:00</published><updated>2009-11-23T08:03:54.405-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WML"/><title type='text'>Manual WML - Parte I</title><content type='html'>&lt;div aling=&quot;justify&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Lo primero es lo  primero. Si no tienes ni idea de HTML, lo veo muy dificil. Lee el manual de  HTML que hay en la URL &lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.wmaestro.com/&quot; target=&quot;_blank&quot;&gt;http://www.wmaestro.com/&lt;/a&gt;. Si te quieres arriesgar, es cosa  tuya, pero te advierto que se parte de la base de que se controla el tema de la  edición de páginas HTML.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;- Las páginas hechas en WML tiene extensión &lt;i&gt;.wml&lt;/i&gt;, los scripts  &lt;i&gt;.wmls&lt;/i&gt; y los dibujos &lt;i&gt;.wbmp&lt;/i&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;- Este es el encabezado que define la versión de WML que usamos:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: red; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML  1.1//EN&quot; &quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: red; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;No lo vamos a explicar ya que es un tema avanzado. Simplemente es lo que  pondremos al principio de nuestra página.  &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;- Como en el HTML el resto del código va entre las etiquetas &amp;lt;wml&amp;gt; y &amp;lt;/wml&amp;gt;. Ej.:  &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;color: red; font-family: verdana,arial; font-size: x-small;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: verdana,arial; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div aling=&quot;justify&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana,arial; font-size: x-small;&quot;&gt;&amp;lt;!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML  1.1//EN&quot; &quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div aling=&quot;justify&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana,arial; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: verdana,arial; font-size: x-small;&quot;&gt;&amp;lt;wml&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div aling=&quot;justify&quot;&gt;&lt;div style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;b&gt;Aquí  va el código&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;lt;/wml&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;- Una página se denomina &lt;i&gt;deck(baraja)&lt;/i&gt; y se subdivide en  &lt;i&gt;cards(cartas)&lt;/i&gt;, de tal forma que podemos movernos por varias cards dentro  de la misma deck. Ej.:  &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td style=&quot;color: red;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE wml PUBLIC &quot;-//WAPFORUM//DTD WML  1.1//EN&quot;  &quot;http://www.wapforum.org/DTD/wml_1.1.xml&quot;&amp;gt;&lt;br /&gt;
&amp;lt;wml&amp;gt;&lt;br /&gt;
&amp;lt;card  id=&quot;First_Card&quot;&amp;gt;&lt;br /&gt;
&amp;lt;do type=&quot;accept&quot; label=&quot;Next&quot;&amp;gt; &lt;br /&gt;
&amp;lt;go  href=&quot;#Second_Card&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/do&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Select &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; to display the next card.  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt; &lt;br /&gt;
&amp;lt;card id=&quot;Second_Card&quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;  &lt;br /&gt;
This card contains the following:... &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;  &lt;br /&gt;
&amp;lt;/wml&amp;gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;http://www.terra.es/personal/wapfacil/images/ej1.jpg&quot; /&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;Esto define un deck que contiene 2 cards, de tal forma que cuando pulsemos  &lt;b&gt;Next&lt;/b&gt; nos iremos a la segunda card, en la cual podremos elegir la opción  &lt;b&gt;Back&lt;/b&gt; para volver a la anterior. El objeto y propiedades de card se  definirán más adelante.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://www.blogger.com/post-create.do&quot; name=&quot;formateo&quot;&gt;&lt;/a&gt;2- El  formateo de los textos&lt;/i&gt;&lt;/b&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;Lo primero que debemos aprender es  el formateo de los textos, para conseguir una presentación aceptable de nuestros  datos, cosa difícil debido al pequeño espacio que se nos proporciona en el  navegador WML. &lt;b&gt;TODOS&lt;/b&gt; los textos deben ir dentro de una etiqueta &lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;b&gt;&lt;i&gt;&amp;lt;p&amp;gt;  Textos....&amp;lt;/p&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;&lt;tbody&gt;
&lt;tr bgcolor=&quot;#ffffff&quot;&gt; &lt;td&gt;&lt;b&gt; &lt;center&gt;Etiqueta &lt;/center&gt;&lt;/b&gt; &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;b&gt;Uso&lt;/b&gt;&lt;/center&gt; &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&amp;lt;em&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
&amp;amp;lt,small&amp;gt;&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;i&gt;Texto con énfasis&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Texto con mucho  énfasis&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Texto con cursiva&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Texto con  negrilla&lt;/b&gt;&lt;br /&gt;
&lt;u&gt;Texto con subrayado&lt;/u&gt;&lt;br /&gt;
&lt;big&gt;Texto con letra  grande&lt;/big&gt;&lt;br /&gt;
&lt;small&gt;Texto con letra  pequeña&lt;/small&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;Ej.:El código &amp;lt;b&amp;gt;Hola&amp;lt;/b&amp;gt;a todos --&amp;gt; &lt;b&gt;Hola&lt;/b&gt; a todos // &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Hola&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;a todos --&amp;gt; &lt;b&gt;&lt;i&gt;Hola&lt;/i&gt;&lt;/b&gt; a  todos  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;La alineación también es importante, y esta se consigue utilizando &lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;la etiqueta &amp;lt;p align=&quot;....&quot;&amp;gt;  &lt;i&gt;Texto&lt;/i&gt; &amp;lt;/p&amp;gt;&lt;/span&gt;. En la siguiente tabla vemos los usos de la  misma.  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;&lt;tbody&gt;
&lt;tr valign=&quot;center&quot;&gt; &lt;td aling=&quot;center&quot;&gt;&lt;b&gt;Alineado a la izquierda&lt;br /&gt;
(Por defecto)&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td aling=&quot;center&quot;&gt;&lt;b&gt;Alineado al centro&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td aling=&quot;center&quot;&gt;&lt;b&gt;Alineado a la derecha&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&amp;lt;p align=&quot;left&quot;&amp;gt;&lt;br /&gt;
El resultado final&lt;br /&gt;
&amp;lt;br/&amp;gt;es el  siguiente&lt;br /&gt;
&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&amp;lt;p align=&quot;center&quot;&amp;gt;&lt;br /&gt;
El resultado final&lt;br /&gt;
&amp;lt;br/&amp;gt;es el  siguiente&lt;br /&gt;
&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&amp;lt;p align=&quot;right&quot;&amp;gt;&lt;br /&gt;
El resultado final&lt;br /&gt;
&amp;lt;br/&amp;gt;es el  siguiente&lt;br /&gt;
&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;El resultado final&lt;br /&gt;
es el siguiente  &lt;br /&gt;
&lt;/td&gt;&lt;td align=&quot;middle&quot;&gt;El resultado final&lt;br /&gt;
es el siguiente  &lt;br /&gt;
&lt;/td&gt;&lt;td align=&quot;right&quot;&gt;El resultado final&lt;br /&gt;
es el  siguiente&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;La etiqueta &amp;lt;br/&amp;gt;&lt;/span&gt; se utiliza para hacer un  salto de línea&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt; RECUERDA que igual que en HTML, hay ciertos caracteres que no se pueden  escribir literalmente  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td colspan=&quot;2&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;b&gt;Caracteres especiales &lt;/b&gt;&lt;/center&gt;&lt;b&gt;&lt;/b&gt; &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;á&lt;br /&gt;
é&lt;br /&gt;
í&lt;br /&gt;
ó&lt;br /&gt;
ú&lt;br /&gt;
ñ&lt;br /&gt;
&amp;amp;&lt;br /&gt;
cedilla&lt;br /&gt;
&quot;&lt;br /&gt;
abrir  comillas&lt;br /&gt;
cerrar comillas&lt;br /&gt;
apóstrofe&lt;br /&gt;
&amp;lt;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
nbsp&lt;br /&gt;
$  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;á&lt;br /&gt;
é&lt;br /&gt;
í&lt;br /&gt;
ó&lt;br /&gt;
ú&lt;br /&gt;
ñ&lt;br /&gt;
&amp;amp;#38&lt;br /&gt;
ç&lt;br /&gt;
&quot;&lt;br /&gt;
«&lt;br /&gt;
»&lt;br /&gt;
&#39;&lt;br /&gt;
&amp;lt;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$$&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;/center&gt;&lt;/center&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://www.blogger.com/post-create.do&quot; name=&quot;card&quot;&gt;&lt;/a&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div aling=&quot;justify&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;b&gt;&lt;i&gt;3- La etiqueta card&lt;/i&gt;&lt;/b&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;Los atributos de esta etiqueta son:   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt; &lt;td&gt;&lt;b&gt;Etiqueta&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;b&gt;Explicación&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;b&gt;Valores que puede tomar&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;id&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Nombre de la card. Usado para referirse a ella  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Texto  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;title&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Es el título que sale en la parte superior del navegador al entrar en la  card  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Texto  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;newcontext&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Borra el historial de navegación. Resetea todas las variables. Sólo actúa al  realizar el evento &lt;i&gt;go.&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;True ó false(valor por defecto)  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;ordered&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;No se explica por el momento  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;True(valor por defecto) ó false  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;onenterforward&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Dirección a la que se va al ocurrir este evento(ir adelante) usando la  etiqueta &lt;i&gt;go.&lt;/i&gt;Se amplia más adelante  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Href. URL o dirección de otro card.  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;onenterforward&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Dirección a la que se va al ocurrir este evento(ir atrás) usando la etiqueta  &lt;i&gt;go.&lt;/i&gt;Se amplia más adelante  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;href. URL o dirección de otro card.  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;ontimer&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Dirección a la que se va al ocurrir este evento(reloj) usando la etiqueta  &lt;i&gt;timer.&lt;/i&gt;Se amplia más adelante  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Href. URL o dirección de otro card.  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td colspan=&quot;3&quot;&gt;&lt;b&gt;Ej.&lt;/b&gt; &amp;lt;card id=&quot;card_1&quot; title=&quot;Primera Card&quot;  onenterforward=&quot;http://www.wapserver.com/3.wml&quot;  onenterbackward=&quot;http://www.wapserver.com/1.wml&quot; ontimer=&quot;#card_2&quot;&amp;gt; Resto del  &lt;i&gt;código&lt;/i&gt; &amp;lt;/card&amp;gt; &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://www.blogger.com/post-create.do&quot; name=&quot;template&quot;&gt;&lt;/a&gt;4- La etiqueta template&lt;/i&gt;&lt;/b&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0057dc; font-family: verdana,arial;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;Los atributos de esta etiqueta son:   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;middle&quot;&gt; &lt;td&gt;&lt;b&gt;Etiqueta&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;b&gt;Explicación&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;b&gt;Valores que puede tomar&lt;/b&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;id&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Nombre de la plantilla. Usado para referirse a ella  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Texto  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;onenterforward&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Dirección a la que se va al ocurrir este evento(ir adelante) usando la  etiqueta &lt;i&gt;go.&lt;/i&gt;Se amplia más adelante  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Href. URL o dirección de otro card.  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;onenterforward&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Dirección a la que se va al ocurrir este evento(ir atrás) usando la etiqueta  &lt;i&gt;go.&lt;/i&gt;Se amplia más adelante  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;href. URL o dirección de otro card.  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;i&gt;ontimer&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Dirección a la que se va al ocurrir este evento(reloj) usando la etiqueta  &lt;i&gt;timer.&lt;/i&gt;Se amplia más adelante  &lt;br /&gt;
&lt;/td&gt;&lt;td&gt;Href. URL o dirección de otro card.  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td colspan=&quot;3&quot;&gt;&lt;b&gt;Notas:&lt;/b&gt; Como una plantilla que es, sus valores se aplican a  todas las cards que definamos en esa página WML. &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Atención&lt;/b&gt;&lt;/span&gt; Si dentro de una card definimos un evento  onenterforward, onenterbackward u ontimer con el mismo id que en la plantilla el  que se &lt;i&gt;utiliza es el definido en la card.&lt;/i&gt;  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td colspan=&quot;3&quot;&gt;&lt;b&gt;Ej.&lt;/b&gt;&lt;br /&gt;
&amp;lt;template id=&quot;Template_1&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;do  type=&quot;options&quot; name=&quot;hazlo&quot; label=&quot;Default&quot;&amp;gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Código  eliminado...&lt;/i&gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/do&amp;gt;&lt;br /&gt;
&amp;lt;/template&amp;gt;&lt;br /&gt;
&amp;lt;card  id=&quot;Card_1&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;do type=&quot;options&quot; name=&quot;hazlo&quot;&amp;gt; &lt;span style=&quot;color: red;&quot;&gt;Esta  definición sobreescribe la de la plantilla para esta card al tener el mismo  nombre&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Código  eliminado...&lt;/i&gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/do&amp;gt;&lt;br /&gt;
&amp;lt;/card&amp;gt;  &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: verdana,arial; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/7031128471245703008/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-i.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/7031128471245703008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/7031128471245703008'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/manual-wml-parte-i.html' title='Manual WML - Parte I'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-2199653446294794959</id><published>2009-11-21T09:00:00.000-08:00</published><updated>2009-11-21T09:00:05.377-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte IX Final</title><content type='html'>&lt;strong&gt;Código de mostrarPronostico.php&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;/** &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;* Codigo para consumir un servicio web (Web Service) por medio de NuSoap &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;* La distribucion del codigo es totalmente gratuita y no tiene ningun tipo de restriccion. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;* Se agradece que mantengan la fuente del mismo. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;*/ &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;// Le indicamos a PHP que no muestre los Notices (por si el servicio no retorna datos) &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;// (esto se puede evitar preguntando si hay datos antes de mostrarlos) &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;error_reporting(1); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;// Inclusion de la libreria nusoap (la que contendra toda la conexión con el servidor &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;//require_once(&#39;lib/nusoap.php&#39;); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;$oSoapClient = new soapclient(&#39;http://live.capescience.com/wsdl/GlobalWeather.wsdl&#39;, true); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;if ($sError = $oSoapClient-&amp;gt;getError()) { &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;echo &quot;No se pudo realizar la operación [&quot; . $sError . &quot;]&quot;; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;die(); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;// Viene de un POST =&amp;gt; Selecciono una ciudad &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;if ($_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot;) { &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;$aParametros = array(&quot;code&quot; =&amp;gt; $_POST[&quot;codLocalidad&quot;]); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;$aRespuesta = $oSoapClient-&amp;gt;call(&quot;getWeatherReport&quot;, $aParametros); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;// Existe alguna falla en el servicio? &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;if ($oSoapClient-&amp;gt;fault) { // Si &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;echo &#39;No se pudo completar la operación&#39;; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;die(); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;} else { // No &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;$sError = $oSoapClient-&amp;gt;getError(); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;// Hay algun error ? &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;if ($sError) { // Si &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;echo &#39;Error:&#39; . $sError; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;html&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;body&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;table width=&quot;367&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;lt;div align=&quot;center&quot;&amp;gt;Datos del tiempo&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td width=&quot;147&quot;&amp;gt; &amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td width=&quot;220&quot;&amp;gt; &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Nombre:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;station&quot;][&quot;name&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Elevación:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;station&quot;][&quot;elevation&quot;]; ?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Fecha y Hora:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;timestamp&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;País:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;station&quot;][&quot;country&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Latitud:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;station&quot;][&quot;latitude&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Longitud:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;station&quot;][&quot;longitude&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Presión:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;pressure&quot;][&quot;string&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Temperatura:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;temperature&quot;][&quot;string&quot;];?&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Visibilidad:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;?=$aRespuesta[&quot;visibility&quot;][&quot;distance&quot;];?&amp;gt; mts.&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/table&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/body&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/2199653446294794959/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-ix-final.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/2199653446294794959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/2199653446294794959'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-ix-final.html' title='Web Services en PHP - Parte IX Final'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-8580432603899149501</id><published>2009-11-20T15:54:00.000-08:00</published><updated>2009-11-20T15:54:47.154-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte VIII</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Cómo lo podemos usar?:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Existen muchas formas en que podríamos usar este Web Service, podemos dejar que el visitante seleccione su país y localidad, y que nuestro sitio le retorne cual es el pronostico actual (solo deberíamos incorporar un paso anterior al que se ofrece en el código, el de selección del país). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Otro uso que podemos darle es el de mostrar cual es el clima actual para una localidad determinada (lo mismo que hacen muchos diarios en sus cabeceras). Si decidimos implementar la segunda opción debemos tener especial cuidado en como lo hacemos, ya que si por cada petición que haga el usuario debemos conectarnos con el servidor que ofrece el web service, esto provocaría una gran demora para el usuario, y una sobrecarga innecesaria del servidor. Para solucionar esto podemos guardar en un archivo de texto o en una base de datos, el clima actual, para leerlo desde allí. Este archivo, o base de datos, la actualizaríamos cada un tiempo prudencial (como puede ser una hora o más). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Otros Web Services:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Actualmente existen gran cantidad de Web Services, gratuitos y no. En el sitio de XMethods pueden encontrar gran cantidad de ellos. Sin ir más lejos Google ofrece un web service para realizar búsquedas (solo hay que registrarse en http://www.google.com/apis/) y nos permitirá realizar 1000 consultas por día (creo que puede ser más que interesante para muchos). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Conclusión:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los Web Services son un tema apasionante, ya que brindan gran funcionalidad y posibilidad de realizar cambios y mejorar nuestras aplicaciones. Un mismo web service puede ser consumido tanto por aplicaciones que se ejecutan en un servidor y entregan código html al cliente, como por aplicaciones que corren directamente en la máquina del cliente. Como vemos las posibilidades son infinitas, es sólo cuestión de comenzar a experimentar. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Apéndice: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Código de seleccionarLocalidad.php &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;/** &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;* Codigo para consumir un servicio web (Web Service) por medio de NuSoap. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;* La distribucion del codigo es totalmente gratuita y no tiene ningun tipo de restriccion. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;* Se agradece que mantengan la fuente del mismo. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;*/ $sPais = &quot;argentina&quot;; // Nombre del pais que queremos el listado de localidades &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;// Inclusion de la libreria nusoap (la que contendra toda la conexión con el servidor // require_once(&#39;lib/nusoap.php&#39;); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$oSoapClient = new soapclient(&#39;http://live.capescience.com/wsdl/GlobalWeather.wsdl&#39;, true); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;if ($sError = $oSoapClient-&amp;gt;getError()) { &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;echo &quot;No se pudo realizar la operación [&quot; . $sError . &quot;]&quot;; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;die(); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$aParametros = array(&quot;country&quot; =&amp;gt; $sPais); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$respuesta = $oSoapClient-&amp;gt;call(&quot;searchByCountry&quot;, $aParametros); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;// Existe alguna falla en el servicio? if ($oSoapClient-&amp;gt;fault) { // Si &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;echo &#39;No se pudo completar la operación&#39;; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;die(); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;} else { // No &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$sError = $oSoapClient-&amp;gt;getError(); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;// Hay algun error ? &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;if ($sError) { // Si &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;echo &#39;Error:&#39; . $sError; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;die(); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;html&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;form action=&quot;mostrarPronostico.php&quot; method=&quot;post&quot; name=&quot;frmLocalidades&quot; id=&quot;frmLocalidades&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;table width=&quot;400&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;:tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td colspan=&quot;2&quot;&amp;gt;&amp;lt;div align=&quot;center&quot;&amp;gt;Seleccione una localidad&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td width=&quot;61&quot;&amp;gt; &amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td width=&quot;339&quot;&amp;gt; &amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;Localidad:&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;select name=&quot;codLocalidad&quot; id=&quot;codLocalidad&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$aElemento) &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;echo &quot;&amp;lt;option value=&#39;&quot;.$aElemento[&quot;wmo&quot;].&quot;&#39;&amp;gt;&quot;.$aElemento[&quot;name&quot;].&quot;&amp;lt;/option&amp;gt;&quot;; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt; &amp;amp;lt,/td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Quiero ver el pronostico&quot;&amp;gt;&amp;lt;/td&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/tr&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/table&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/form&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/body&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/8580432603899149501/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-viii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/8580432603899149501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/8580432603899149501'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-viii.html' title='Web Services en PHP - Parte VIII'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-7715147285158434884</id><published>2009-11-20T15:42:00.000-08:00</published><updated>2009-11-20T15:42:48.617-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte VII</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Comenzamos a programar!&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como mencione anteriormente he dividido la aplicación de prueba del Web Service en dos (2) archivos, uno que mostrara todas las localidades donde existen pronósticos (seleccionarLocalidad.php) y otro que mostrara el pronóstico para la localidad seleccionada (mostrarPronostico.php) &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Veamos como consumimos un web service (searchByCountry): &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En el código se han eliminado las comprobaciones de errores para poder facilitar la lectura de los pasos. Veamos cuales son los pasos para consumir un servicio web desde PHP: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;require_once(“lib/nusoap.php”);&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Debemos incluir la librería NuSOAP. En este ejemplo asumimos que el directorio donde se encuentra el archivo nusoap.php esta ubicado en el subdirectorio lib (a partir de donde esta nuestro script). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$oSoapClient = new soapclient(&#39;http://live.capescience.com/wsdl/GlobalWeather.wsdl&#39;, true);&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Debemos instanciar la clase soapclient, ya que en esta ocasión utilizaremos solo el cliente que nos provee NuSOAP. Los parámetros enviados son la ubicación del documento WSDL y true como segundo parametro (este último parámetro indica que el primer documento es un WSDL) . &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Definimos un array con el país para el cual se quieren obtener las localidades que tienen pronósticos disponibles. Volviendo al documento WSDL podemos ver que la variable que debemos enviar es “country” y que es del tipo string &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$aParametros = array(&quot;country&quot; =&amp;gt; &quot;argentina&quot;); &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;280. &amp;lt;message name=&quot;searchByCountry&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;281. &amp;lt;part name=&quot;country&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;282. &amp;lt;/message&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$aRespuesta = $oSoapClient-&amp;gt;call(&quot;searchByCountry&quot;, $aParametros);&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Llamamos al método call del objeto soapclient. Al mismo le pasamos como parámetro el nombre del método que queremos ejecutar en el web service (searchByCountry) y los parámetros ($aParametros). En nuestra variable $aRespuesta tenemos un array con la respuesta del Web Service. Este array tiene el formato descripto en “ArrayOfStation” (el cual fue visto anteriormente). Es decir podemos acceder a las variables descriptas en ArrayOfStation de la siguiente manera: $aRespuesta[“wmo”], $aRespuesta[“elevation”], $aRespuesta[“name”], etc. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ahora que ya conocemos c&amp;amp;oacte;mo sería el procedimiento para consumir un Web Service, veamos un poco más en profundidad los métodos de soapclient que utilizamos: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Al crear una instancia de soapclient, existen varios parámetros que podemos enviar para su creación: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;$oSoapClient = new soapclient( &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;url donde se encuentra el web service o WSDL&amp;gt;, &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;booleana indicando si el primer parámetro es un WSDL&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;entero con el Portéame&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena proxyHost&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena proxyPort&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena nombre de usuario&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena password&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;entero con el timeout de la conexión&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;entero con el timeout de la respuesta&amp;gt;]);&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Solo el primer parámetro es necesario (la ubicación del Web Service o del documento WSDL del Web Service), todos los demás son opcionales. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Al ejecutar el Web Service, existen varios parámetros que podemos enviar al método: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;call( &amp;lt;método que queremos ejecutar en el servidor&amp;gt;, &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;un array asociativo con los parámetros que debemos enviar (si existen)&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena con el espacio de nombres (namespace)&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena con el valor de la acción SOAP&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;booleana indicando si esta presente los valores de SOAPVAL en los headers&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;booleana la cual ya no se utiliza&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena con el style a usar cuando se realiza la serialización de los parametros&amp;gt;], &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;[&amp;lt;cadena que puede ser &quot;encoded&quot; o &quot;literal&quot; utilizada para serialización de los parametros&amp;gt;]);&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Cómo vemos existen muchos más parametros de los que habiamos utilizado, pero como exigen un conocimiento más profundo sobre los Web Services los cuales escapan a los alcances de este artículo no los trateremos aquí. &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/7715147285158434884/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-vii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/7715147285158434884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/7715147285158434884'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-vii.html' title='Web Services en PHP - Parte VII'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-7808238495779930007</id><published>2009-11-20T15:30:00.000-08:00</published><updated>2009-11-20T15:35:08.636-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte VI</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Como lo usar NuSOAP?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para responder a esta pregunta no hay nada mejor que un ejemplo de utilización de NuSOAP, el cual nos ayudará también a terminar de ver los conceptos mencionados anteriormente (SOAP, WSDL, etc.). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Decidí ir a la página de &lt;a href=&quot;http://xmethods.com/&quot; target=&quot;_blank&quot;&gt;XMethods&lt;/a&gt; y buscar algún servicio que pueda ser aplicable por personas de todo el mundo, y que no esté limitado a los Estados Unidos. Buscando entre gran cantidad de Web Services de Cotizaciones, o datos específicos de los Estados Unidos, encontré uno que podía ser implementado en cualquier país, y era ni más ni menos que los datos del clima para todo el mundo. Este Web Service tiene 9 métodos que podemos utilizar (todos ellos se encuentran definidos en el archivo WSDL que se encuentra en &lt;a href=&quot;http://live.capescience.com/wsdl/GlobalWeather.wsdl&quot; target=&quot;_blank&quot;&gt;http://live.capescience.com/wsdl/GlobalWeather.wsdl&lt;/a&gt; Los métodos son: getStation(), isValidCode(), listCountries(), searchByCode(), searchByCountry(), searchByLocation(), searchByName(), searchByRegion(), getWeatherReport(). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
Para el ejemplo solo utilizare el método searchByCountry() y getWeatherReport(). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En el ejemplo existen dos archivos: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;seleccionarLocalidad.php: el cual nos permitirá seleccionar una localidad dado un país (el país esta dado por el valor de la variable $sPais). Este archivo PHP utiliza el método del Web Service searchByCountry() &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;mostrarPronostico.php: el cual mostrara el pronóstico para la localidad seleccionada. Este archivo PHP utiliza el método del Web Service getWeatherReport(). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Si queremos ver un listado de los servicios publicados podemos ir a esta página: CapeScience &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En esta página nos permiten probar los métodos de los Web Services en línea, sin necesidad de un cliente SOAP, esto nos es de utilidad principalmente para ver como funciona cada uno de los métodos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como mencione anteriormente, toda la información del Web Service se encuentra definida dentro del documento WSDL, para este Web service se encuentra definida en CapeScience. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Este documento en particular tiene 425 líneas, por lo que la lectura del mismo es bastante tediosa. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;No voy a explicar todo el archivo WSDL, sino que simplemente me detendré en las líneas que son de importancia para nuestra aplicación (las que hacen referencia a los metodos searchByCountry() y getWeatherReport() ). Ahora veamos donde se encuentran las definiciones de los métodos dentro del archivo: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Mensajes de searchByCountry: entre las lineas 277 a 282 podemos apreciar que se encuentra lo siguiente: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;277. %lt;message name=&quot;searchByCountryResponse&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;278. &amp;lt;part name=&quot;return&quot; type=&quot;xsd1:ArrayOfStation&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;279. &amp;lt;/message&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;280. &amp;lt;message name=&quot;searchByCountry&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;281. &amp;lt;part name=&quot;country&quot; type=&quot;xsd:string&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;282. &amp;lt;/message&amp;gt;&lt;/span&gt;&amp;nbsp; &lt;/message&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SearchByCountry: comencemos por la línea 280 y dejaremos para después las líneas 277 a 279. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;280. &amp;lt;message name=&quot;searchByCountry&quot;&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En esta línea se indica que existe un método llamado searchByCountry, que es el método que estábamos buscando. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;281. &amp;lt;part name=&quot;country&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;part name=&quot;country&quot; type=&quot;xsd:string&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí se define que existe un parámetro para dicho método que se llama “country” (país) y es del tipo string. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;282. &amp;lt;/message&amp;gt;&lt;/span&gt; &lt;/message&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Fin del método seachByCountry &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ejemplo de un mensaje real con el parámetro country seteado en “argentina”: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;nu:searchByCountry&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;lt;country xsi:type=&quot;xsd:string&quot;&amp;gt;argentina&amp;lt;/country&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/nu:searchByCountry&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SearchByCountryResponse: Ahora analicemos el método searchByCountryResponse, como su nombre indica, es la respuesta al metodo searchByCountry. Es decir cuando invocamos a searchByCountry, el servidor nos responderá con un mensaje con el formato de searchByCountryResponse. Las respuestas, generalmente, tienen anexado al final Response al nombre del método (esto se epecifica en el portType). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;277. &amp;lt;message name=&quot;searchByCountryResponse&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
Esta línea nos indica que es una respuesta al método searchByCountry. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;278. &amp;lt;part name=&quot;return&quot; type=&quot;xsd1:ArrayOfStation&quot;/&amp;gt;&lt;/span&gt;&lt;part name=&quot;return&quot; type=&quot;xsd1:ArrayOfStation&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El método nos devuelve una variable “return” la cual es del tipo ArrayOfSation. Como vimos anteriormente, los documentos WSDL pueden definir sus propios tipos de datos, ArrayOfStation es un tipo de datos definido en este WSDL. Ver más adelante la definición del tipo de datos ArrayOfStation. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;279. &amp;lt;/message&amp;gt;&lt;/span&gt; &lt;/message&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Fin del método searchByCountryResponse. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como vimos anteriormente se hace referencia a un ArrayOfStation, para ver de que se trata esto debemos buscar este tipo de datos dentro del archivo WSDL. En las líneas comprendidas ente 148 y 157, podemos ver que se define este tipo de datos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;148. &amp;lt;xsd:complexType name=&quot;ArrayOfStation&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;149. &amp;lt;xsd:complexContent&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;150. &amp;lt;xsd:restriction base=&quot;SOAP-ENC:Array&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;151. &amp;lt;xsd:sequence&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;152. &amp;lt;xsd:element maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot; name=&quot;item&quot; type=&quot;xsd1:Station&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;153. &amp;lt;/xsd:sequence&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;154. &amp;lt;xsd:attribute ref=&quot;SOAP-ENC:arrayType&quot; wsdl:arrayType=&quot;xsd1:Station[]&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;155. &amp;lt;/xsd:restriction&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;156. &amp;lt;/xsd:complexContent&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;157. &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;148. &amp;lt;xsd:complexType name=&quot;ArrayOfStation&quot;&amp;gt;&lt;/span&gt; &lt;complextype name=&quot;ArrayOfStation&quot;&gt;&lt;/complextype&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En esta línea podemos ver que se define un tipo de datos complejo (complexType) con el nombre de “ArrayOfStation”, el tipo de datos que buscábamos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;149. &amp;lt;xsd:complexContent&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;150. &amp;lt;xsd:restriction base=&quot;SOAP-ENC:Array&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;151. &amp;lt;xsd:sequence&amp;gt;&lt;/span&gt; &lt;sequence&gt;&lt;/sequence&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Indicamos que es un elemento complejo (array). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;152. &amp;lt;xsd:element maxOccurs=&quot;unbounded&quot; minOccurs=&quot;0&quot; name=&quot;item&quot; type=&quot;xsd1:Station&quot;/&amp;gt;&lt;/span&gt; &lt;element maxoccurs=&quot;unbounded&quot; minoccurs=&quot;0&quot; name=&quot;item&quot; type=&quot;xsd1:Station&quot;&gt;&lt;/element&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esta línea es la que más nos interesa, ya que se indica precisamente como esta compuesto el array. Nos dice que tiene un mínimo de ocurrencias de 0 (MinOccurs=” 0” ), es decir, que puede no tener elementos. Un máximo de ocurrencias no limitado (maxOccurs=”unbounded”), es decir que podemos tener todos los elementos que queramos. Y al finalizar nos indica el tipo de datos del array, que es “Station”. Por desgracia ahora tenemos que ver que tipo de datos es Station. Como podemos ver un dato se define a partir de otro, hasta llegar a los tipos de datos básicos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;153. &amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
Se cierran los tags anteriormente abiertos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;154. &amp;lt;xsd:attribute ref=&quot;SOAP-ENC:arrayType&quot; wsdl:arrayType=&quot;xsd1:Station[]&quot;/&amp;gt;&lt;/span&gt;&lt;attribute ref=&quot;SOAP-ENC:arrayType&quot; wsdl:arraytype=&quot;xsd1:Station[]&quot;&gt;&lt;/attribute&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Terminamos de definir el array. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;155. &amp;lt;/xsd:restriction&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;156. &amp;lt;/xsd:complexContent&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;157. &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Se cierran los demás tags que fueron abiertos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Nos quedaba pendiente definir el tipo de datos “Station”, nuevamente, al buscar en el código encontramos entre las líneas 134 a 147 la definición de este tipo de datos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;134. &amp;lt;xsd:complexType name=&quot;Station&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;135. &amp;lt;xsd:sequence&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;136. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;icao&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;137. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;wmo&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;138. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;iata&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;139. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;elevation&quot; type=&quot;xsd:double&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;140. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;latitude&quot; type=&quot;xsd:double&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;141. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;longitude&quot; type=&quot;xsd:double&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;142. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;name&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;143. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;region&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;144. &amp;lt; xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;country&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;145. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;string&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;146. &amp;lt;/xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;147. &amp;lt;/xsd:complexType&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;134. &amp;lt;xsd:complexType name=&quot;Station&quot;&amp;gt;&lt;/span&gt; &lt;br /&gt;
Se define que comienza el tipo de datos complejo Station. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;135. &amp;lt;xsd:sequence&amp;gt;&lt;/span&gt;&lt;br /&gt;
Indicamos que comenzamos con la definición del tipo secuencia (es decir que todos los elementos que se definen dentro están incluidos en el tipo de datos Station). Existen otro tipo que no es secuencia (sequence), y se llama choice (elección), en el cual se selecciona entre uno de los elementos dentro definidos (aquellos comprendidos entre &lt;choice&gt;y &lt;/choice&gt;). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;136. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;icao&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;137. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;wmo&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;138. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;iata&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
Se definen 3 elementos los cuales son del tipo string, dichos elementos son: icao, wmo, e iata. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;139. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;elevation&quot; type=&quot;xsd:double&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;140. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;latitude&quot; type=&quot;xsd:double&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;141. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;longitude&quot; type=&quot;xsd:double&quot;/&amp;gt;&lt;/span&gt;&lt;element maxoccurs=&quot;1&quot; minoccurs=&quot;1&quot; name=&quot;longitude&quot; type=&quot;xsd:double&quot;&gt;&lt;/element&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Se definen otros 3 elementos, en este caso son del tipo double. Estos son: elevation, latitude, y longitude. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;142. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;name&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;143. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;region&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;144. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;country&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;145. &amp;lt;xsd:element maxOccurs=&quot;1&quot; minOccurs=&quot;1&quot; name=&quot;string&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;
Se definen los últimos 4 elementos del tipo string. Los elementos aquí definidos son: name, region, country, y string. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;146. &amp;lt;/xsd:sequence&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;147. &amp;lt;/xsd:complexType&amp;gt;&lt;/span&gt;&lt;br /&gt;
Cierre de los tags abiertos anteriormente. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Veamos un ejemplo de respuesta: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;lt;return xsi:type=&quot;cc1:ArrayOfStation&quot; SOAP-ENC:arrayType=&quot;cc1:Station[86]&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp; &amp;lt;item xsi:type=&quot;cc1:Station&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;icao xsi:type=&quot;xsd:string&quot;&amp;gt;SARS&amp;lt;/icao&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wmo xsi:type=&quot;xsd:string&quot;&amp;gt;87149&amp;lt;/wmo&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;iata xsi:nil=&quot;true&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;elevation xsi:type=&quot;xsd:double&quot;&amp;gt;91.0&amp;lt;/elevation&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;latitude xsi:type=&quot;xsd:double&quot;&amp;gt;-26.817&amp;lt;/latitude&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;longitude xsi:type=&quot;xsd:double&quot;&amp;gt;-60.45&amp;lt;/longitude&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name xsi:type=&quot;xsd:string&quot;&amp;gt;Presidencia Roque Saenz Pena Aerodrome&amp;lt;/name&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;region xsi:nil=&quot;true&quot;/&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;country xsi:type=&quot;xsd:string&quot;&amp;gt;Argentina &amp;lt;/country&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;string xsi:type=&quot;xsd:string&quot;&amp;gt;SARS - Presidencia Roque Saenz Pena Aerodrome, Argentina &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -26.817&amp;amp;apos;S -60.45&amp;amp;apos;W 91m&amp;lt;/string&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/item&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp; &amp;lt;item xsi:type=&quot;cc1:Station&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&amp;lt;/return&amp;gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para aclarar el tipo de estructura de ArrayOfStation usaremos analogías con otros lenguajes de programación: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;// Delphi // &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Station = record &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;icao : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;wmo : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;iata : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;elevation : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;latitude : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;longitude : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;name : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;region : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;country : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;string_ : String; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;end; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ArrayOfSation : array of Station; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;// C# // &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;struct Station &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;{ &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String icao; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String wmo; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String iata; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String elevation; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String latitude; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String longitude; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String name; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String region; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String country; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;String string_; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Station[] ArrayOfStation;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como vemos no es fácil seguir todo lo que esta definido dentro de un documento WSDL, por suerte muchas veces no nos tenemos que preocupar por todo esto ya que los mismos sitios donde se encuentran alojados los Web Services nos proveen de la información necesaria sin necesidad de tener que recurrir a ver los archivos WSDL. También existen aplicaciones como son Altova XMLSPY que nos proveen de la información de manera gráfica &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/7808238495779930007/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-vi.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/7808238495779930007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/7808238495779930007'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-vi.html' title='Web Services en PHP - Parte VI'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-3647433252956518512</id><published>2009-11-20T12:30:00.000-08:00</published><updated>2009-11-20T12:30:03.029-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte V</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Que es NuSOAP?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;NuSOAP es un kit de herramientas (ToolKit) para desarrollar Web Services bajo el lenguaje PHP. Está compuesto por una serie de clases que nos harán mucho más fácil el desarrollo de Web Services. Provee soporte para el desarrollo de clientes (aquellos que consumen los Web Services) y de servidores (aquellos que los proveen). NuSOAP está basado en SOAP 1.1, WSDL 1.1 y HTTP 1.0/1.1 &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿NuSOAP es el único soporte para Web Services en PHP?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;No, no es el único, existen otros, pero es uno de los que están en una fase de desarrollo mucho más avanzada. Sin ir más lejos, PHP a partir de su versión 5 comienza a dar soporte para SOAP, pero aún está en fase experimental. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Por qué NuSOAP y no otro?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1.Está en una fase madura de desarrollo. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2.No necesita módulos adicionales. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3.Es muy fácil su instalación y uso &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Cómo instalo NuSOAP?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;La instalación es bastante sencilla, sólo basta ir a la pagina en sourceforge de NuSOAP &lt;a href=&quot;http://sourceforge.net/projects/nusoap/&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/projects/nusoap/&lt;/a&gt; y bajar el archivo comprimido (es un .zip). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Lo descomprimimos en un directorio de nuestro servidor web (como puede ser /lib que es el directorio por default), y listo, ya podemos hacer uso de NuSOAP. &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/3647433252956518512/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-v.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3647433252956518512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3647433252956518512'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-v.html' title='Web Services en PHP - Parte V'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-8666154713254215063</id><published>2009-11-20T12:26:00.000-08:00</published><updated>2009-11-20T12:26:19.452-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte IV</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Historia de los Web Services&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los Servicios Web surgieron ante una necesidad de estandarizar la comunicación entre distintas plataformas (PC, Mainframe, Mac, etc.) y lenguajes de programación (PHP, C#, Java, etc.). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Anteriormente se habían realizado intentos de crear estándares pero fracasaron o no tuvieron el suficiente éxito, algunos de ellos son DCOM y CORBA, por ser dependientes de la implementación del vendedor DCOM - Microsoft, y CORBA - ORB (a pesar que CORBA de múltiples vendedores pueden operar entre si, hay ciertas limitaciones para aplicaciones de niveles más altos en los cuales se necesite seguridad o administración de transacciones). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Otro gran problema es que se hacía uso de RPC (Remote Procedure Call) para realizar la comunicación entre diferentes nodos. Esto, además de presentar ciertos problemas de seguridad, tiene la desventaja de que su implementación en un ambiente como es Internet, es casi imposible (muchos firewalls bloquean este tipo de mensajes, lo que hace prácticamente imposible a dos computadoras conectadas por Internet comunicarse). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los Web Services surgieron para finalmente poder lograr la tan esperada comunicación entre diferentes plataformas. En la actualidad muchos sistemas legacy están pasando a ser web services. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es por esto que en 1999 se comenzó a plantear un nuevo estándar, el cual terminaría utilizando XML, SOAP, WSDL, y UDDI. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Los Web services pueden ser solo utilizados con HTTP?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A pesar de mucho limitar el uso de los Web services al protocolo HTTP, los Web services no fueron pensados para un protocolo en particular, es decir, nada nos impide utilizar SOAP sobre algún otro protocolo de Internet (SMTP, FTP, etc.). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Se utiliza principalmente HTTP por ser un protocolo ampliamente difundido y que se encuentra menos restringido por firewalls (generalmente se bloquean puertos como el FTP, pero el HTTP es muy probable que no este bloqueado). &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/8666154713254215063/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-iv.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/8666154713254215063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/8666154713254215063'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-iv.html' title='Web Services en PHP - Parte IV'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-3279652644595997988</id><published>2009-11-20T07:49:00.000-08:00</published><updated>2009-11-20T07:49:10.889-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte III</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;WSDL - Web Services Description Language&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es un protocolo basado en XML que describe los accesos al Web Service. Podriamos decir que es el manual de operación del web service, porque nos indica cuales son las interfaces que provee el Servicio web y los tipos de datos necesarios para la utilización del mismo.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Veamos un ejemplo de un documento WSDL: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;lt;definitions&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;lt;types&amp;gt; ... &amp;lt;/types&amp;gt;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;lt;message&amp;gt; ... &amp;lt;/message&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;lt;portType&amp;gt; ... &amp;lt;/portType&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;lt;binding&amp;gt; ... &amp;lt;/binding&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/definitions&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Explicación del código anterior: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;&amp;gt;&lt;/span&gt; Este es otro documento XML, es por esto que debe comenzar con el tag&lt;span style=&quot;color: red;&quot;&gt; &amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;xml .. ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;definitions&amp;gt;&lt;/span&gt; Comienzo del documento, este tag agrupa a todos los demás. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;types&amp;gt;&lt;/span&gt; Se definen los tipos de datos utilizados en el Web Service. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/types&amp;gt;&lt;/span&gt; Fin de la definición de tipos. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;message&amp;gt;&lt;/span&gt; Se definen los métodos y parámetros para realizar la operación. Cada message puede consistir en una o más partes (parámetros). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/message&amp;gt;&lt;/span&gt; Fin de la definición de los parámetros. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;portType&amp;gt;&lt;/span&gt; Esta sección es la más importante, ya que se definen las operaciones que pueden ser realizadas, y los mensajes que involucran (por ejemplo el mensaje de petición y el de respuesta). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/portType&amp;gt;&lt;/span&gt; Fin de la definición de las operaciones y mensajes. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;binding&amp;gt;&lt;/span&gt; Se definen el formato del mensaje y detalles del protocolo para cada portType. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/binding&amp;gt;&lt;/span&gt; Fin de la definición del formato del mensaje y detalles del protocolo para cada PortType. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/definitions&amp;gt;&lt;/span&gt; Fin del documento WSDL &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;UDDI - Universal Discovery Description and Integration&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es un modelo de directorios para Web Services. Es una especificación para mantener directorios estandarizados de información acerca de los Web Services, sus capacidades, ubicación, y requerimientos en un formato reconocido universalmente. UDDI utiliza WSDL para describir las interfaces de los Web Services. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es un lugar en el cual podemos buscar cuales son los Servicios web disponibles, una especie de directorio en el cual podemos encontrar los Web Services publicados y publicar los Web Services que desarrollemos. &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/3279652644595997988/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-iii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3279652644595997988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3279652644595997988'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-iii.html' title='Web Services en PHP - Parte III'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-2001769876347386907</id><published>2009-11-17T05:39:00.001-08:00</published><updated>2009-11-24T05:49:47.906-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Heroes"/><title type='text'>Heroes 5 Temporada: Redemption Capitulo 10 Brother´s keeper</title><content type='html'>&lt;object height=&quot;330&quot; width=&quot;440&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.megavideo.com/v/Q25U4X8Y085afd7c3f77445cf916a131465c8a9c&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.megavideo.com/v/Q25U4X8Y085afd7c3f77445cf916a131465c8a9c&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;440&quot; height=&quot;330&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/2001769876347386907/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/heroes-5-temporada-redemption-capitulo_17.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/2001769876347386907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/2001769876347386907'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/heroes-5-temporada-redemption-capitulo_17.html' title='Heroes 5 Temporada: Redemption Capitulo 10 Brother´s keeper'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-6411891290481235565</id><published>2009-11-16T14:35:00.000-08:00</published><updated>2009-11-16T14:38:27.532-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte II</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;SOAP: Simple Object Access Protocol&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es un protocolo que permite la comunicación entre aplicaciones a través de mensajes por medio de Internet. Es independiente de la plataforma, y del lenguaje. Esta basado en XML y es la base principal de los Web Services. Los mensajes SOAP son documento XML propiamente dicho, pero esto lo veremos más adelante cuando veamos un ejemplo de un mensaje SOAP. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Veamos como es la estructura básica del protocolo y la correspondiente explicación: &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2001/12/soap-envelope&quot; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Soap:encodingStyle=&quot;http://www.w3.org/2001/12/soap-encoding&quot;&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;lt;soap:Header&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; ... &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;lt;/soap:Header&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;lt;soap:Body&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Fault&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:Fault&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;lt;/soap:Body&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/soap:Envelope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;strong&gt;Explicación del código anterior:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como podemos ver en esta linea SOAP es un documento XML, y como tal, debe comenzar con el tag &amp;lt;?xml….?&amp;gt; y la versión correspondiente. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;soap:Envelope&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí se indica que comienza el envelope (sobre) del mensaje &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;xmlns:soap = &quot;http://www.w3.org/2001/12/soap-envelope&quot;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Un mensaje SOAP debe contener siempre un elemento envelope asociado con el namespace (espacio de nombres) http://www.w3.org/2001/12/soap-envelope &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Soap:encodingStyle=&quot;http://www.w3.org/2001/12/soap-encoding&quot;&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;En esta línea lo que se hace es indicar donde se encuentran definidos los tipos de datos utilizados en el documento. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;soap:Header&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esta línea indica el comienzo del Header (encabezado). En esta sección se incluye información específica del mensaje, como puede ser la autenticación. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/soap:Header&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como todo documento XML los tags que son abiertos deben ser cerrados, esta línea indica la finalización del Header (encabezado). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;soap:Body&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Aquí comienza el cuerpo del mensaje, en esta sección se incorpora toda la información necesaria para el nodo final. Por ejemplo, los parámetros para la ejecución, o la respuesta a una petición. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;soap:Fault&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Cualquier tipo de fallo que se produzca será notificado en esta sección. La cual esta contenida dentro del cuerpo del mensaje. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/soap:Fault&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Cierre de la sección Fault. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/soap:Body&amp;gt;&lt;/span&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Indica el final del cuerpo del mensaje. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/soap:Envelope&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Fin del mensaje SOAP. &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/6411891290481235565/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-ii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/6411891290481235565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/6411891290481235565'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-ii.html' title='Web Services en PHP - Parte II'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-1498667248161895321</id><published>2009-11-16T06:29:00.000-08:00</published><updated>2009-11-16T06:29:36.782-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Web Services en PHP - Parte I</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Explicamos qué son los servicios web y cuales son los elementos por los que están compuestos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El presente artículo esta dirigido a las personas que ya poseen conocimientos sobre Internet y programación y quieren comenzar a conocer el mundo de los web services (servicios web). &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Cómo esta estructurado el artículo?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Comenzaremos dando una introducción a lo que son los Web Services (Servicios Web), luego definiremos los elementos que lo componen, y al finalizar veremos un ejemplo de cómo utilizar un web service por medio de NuSOAP, para el cual utilizaremos dos archivos PHP. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Introducción:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Antes de comenzar explicando NuSoap, creo que es conveniente realizar una introducción a lo que son los Servicios Web, y para esto debemos comenzar con la definición de Web Service. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Web Service:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es un sistema software diseñado para soportar la interoperabilidad máquina - máquina a través de una red. Este tiene una interfaz descripta en un formato que puede ser procesado por una máquina (específicamente WSDL, que veremos más adelante). Otros sistemas interactúan con el Web service utilizando mensajes SOAP los cuales se encuentran establecidos previamente. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Entonces podríamos decir que un Web Service es una comunicación por medio de mensajes SOAP (son mensajes especiales que más adelante veremos detenidamente) entre diferentes equipos a través de una red. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ahora pasaremos a definir los elementos que componen a los Web Services, para luego ver como ellos estan interrelacionados. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;¿Qué es XML, SOAP, WSDL, UDDI?&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Para conocer cómo se realiza el intercambio de mensajes en los Web Services debemos primero saber cuales son los elementos fundamentales que lo componen. Estos son el XML, SOAP, WSDL, y UDDI. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;XML - eXtensible Markup Language:&lt;/strong&gt; &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Es un subconjunto simplificado del SGML el cual fue diseñado principalmente para documentos Web. Deja a los diseñadores crear sus propias “etiquetas” o &quot;tags&quot; (Ej: &amp;lt;libro&amp;gt;), habilitando la definición, transmisión, validación, y la interpretación de datos entre aplicaciones y entre organizaciones. Un punto que considero que es importante aclarar es que el HTML y el XML tienen funciones diferentes. El HTML tiene por objeto mostrar información, mientras que el XML se ocupa de la información propiamente dicha (el contenido). Este concepto es importante tenerlo en cuenta, ya que muchas personas al escuchar sobre XML piensan que es el sucesor de HTML. &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ejemplo de un documento XML sobre información de autos: &lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;vehiculos&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;coche&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;marca&amp;gt;Toyota&amp;lt;/marca&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;modelo&amp;gt;Corolla&amp;lt;/modelo&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;fechaCompra&amp;gt;2002&amp;lt;/fechaCompra&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/coche&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;coche&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;marca&amp;gt;Honda&amp;lt;/marca&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;modelo&amp;gt;Civic&amp;lt;/modelo&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;fechaCompra&amp;gt;2003&amp;lt;/fechaCompra&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/coche&amp;gt;&lt;br /&gt;
&amp;lt;/vehiculos&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Seguramente este tipo de archivos no sea una novedad para la mayoría de los que lean este artículo, ya que muchos documentos en Internet están en formato XML. Igualmente explicaremos brevemente las secciones del mismo: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Todo documento XML debe comenzar indicando que es un documento XML, la versión del mismo y su codificación. Es por eso que se utiliza el tag &amp;lt;?xml .... ?&amp;gt; . Todos los elementos a partir de aquí son definidos por el usuario. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vehiculos&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Luego se indica un tag raiz (&amp;lt;vehiculos&amp;gt;) el cual contendrá a los demás elementos. Es como en HTML el tag &amp;lt;HTML&amp;gt; .. &amp;lt;/HTML&amp;gt;, que dentro de el se encuentran los demás tags. Se lo conoce generalmente como root del documento. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;coche&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Luego definimos un tag &amp;lt;coche&amp;gt; el cual contendrá un coche en particular (en este caso solo incorpore 3 características de un coche: marca, modelo, y fecha de compra). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;marca&amp;gt;Toyota&amp;lt;/marca&amp;gt; &lt;br /&gt;
&amp;lt;modelo&amp;gt;Corolla&amp;lt;/modelo&amp;gt; &lt;br /&gt;
&amp;lt;fechaCompra&amp;gt;2002&amp;lt;/fechaCompra&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Se definen 3 tags (marca, modelo, y fechaCompra), los cuales contienen los datos para un coche en particular. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vehiculos&amp;gt; &lt;br /&gt;
&amp;lt;coche&amp;gt; &lt;br /&gt;
&amp;lt;marca&amp;gt;..&amp;lt;/marca&amp;gt; &lt;br /&gt;
&amp;lt;modelo&amp;gt;..&amp;lt;/modelo&amp;gt; &lt;br /&gt;
&amp;lt;fechaCompra&amp;gt;..&amp;lt;/fechaCompra&amp;gt; &lt;br /&gt;
&amp;lt;/coche&amp;gt; &lt;br /&gt;
&amp;lt;/vehiculos&amp;gt; &lt;br /&gt;
&lt;br /&gt;
En el documento podemos apreciar que todos los tags que son abiertos &amp;lt;marca&amp;gt; deben ser cerrados &amp;lt;/marca&amp;gt;. Esto es una exigencia del XML. &lt;br /&gt;
&lt;br /&gt;
Se pueden anidar tags &amp;lt;coche&amp;gt;&amp;lt;marca&amp;gt;&amp;lt;/marca&amp;gt;…..&amp;lt;/coche&amp;gt;. Marca esta dentro del tag coche. El XML provee muchas otras posibilidades como puede ser que las etiquetas tengan atributos (&amp;lt;coche color=&quot;rojo&quot;&amp;gt;..&amp;lt;/coche&amp;gt;), pero no nos detendremos en ellas ya que la idea es simplemente ofrecer los conceptos básicos para conocer de que se trata el mundo de los Web Services. &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/1498667248161895321/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-i.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1498667248161895321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/1498667248161895321'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/web-services-en-php-parte-i.html' title='Web Services en PHP - Parte I'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-6716497378660524467</id><published>2009-11-14T07:47:00.000-08:00</published><updated>2009-11-14T07:47:10.026-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Base de Datos"/><title type='text'>Principios de Diseño de Base de Datos - Parte V</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Una tabla temporal existe mientras dure la conexión a MySQL. Cuando se interrumpe la conexión MySQL remueve automáticamente la tabla y libera el espacio que ésta usaba. Nosotros podemos por supuesto eliminar esta tabla mientras estamos conectados a MySQL. Si una tabla nombrada tabla_temp ya existe en nuestra base de datos al momento de crear una tabla temporal con el mismo nombre, la tabla temporal oculta a la tabla no temporal.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;MySQL también permite especificar que una tabla temporal sea creada en memoria si dicha tabla se declara del tipo HEAP:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;CREATE TEMPORARY TABLE tabla_temp&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;(&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;campo1 tipoDato,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;campo2 tipoDeDato,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;...&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;) TYPE = HEAP;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ya que las tablas del tipo HEAP son almacenadas en memoria, las consultas sobre estas tablas son ejecutadas mucho más rápido que en las tablas en disco no temporales. Sin embargo las tablas HEAP son ligeramente diferentes de una tabla normal y tienen algunas limitaciones propias.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Como en las sugerencias previas, lo único que nos queda es probar si con las tablas temporales nuestras consultas se ejecutan más rápidamente que usando la tabla que contiene una gran cantidad de datos. Si los datos están bien indexados puede que las tablas temporales no nos sean de mucha utilidad.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Usar una versión reciente de MySQL&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;La recomendación es simple y concreta, siempre que esté en nuestras manos, debemos usar la versión más reciente de MySQL que se encuentre disponible. Además de que las nuevas versiones frecuentemente incluyen muchas mejoras, cada vez son más estables y más rápidas. De esta manera, a la vez que sacamos provecho de las nuevas características incorporadas en MySQL, veremos significativos incrementos en la eficiencia de nuestro servidor de bases de datos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Consideraciones finales&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El último paso del diseño de la base de datos es adoptar determinadas convenciones de nombres. Aunque MySQL es muy flexible en cuanto a la forma de asignar nombre a las bases de datos, tablas y columnas, he aquí algunas reglas que es conveniente observar:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Utilizar caracteres alfanuméricos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Limitar los nombres a menos de 64 caracteres (es una restricción de MySQL).&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Utilizar el guión bajo (_) para separar palabras.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Utilizar palabras en minúsculas (esto es más una preferencia personal que una regla).&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Los nombres de las tablas deberían ir en plural y los nombres de las columnas en singular (es igual una preferencia personal).&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Utilizar las letras ID en las columnas de clave primaria y foránea.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* En una tabla, colocar primero la clave primaria seguida de las claves foráneas.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Los nombres de los campos deben ser descriptivos de su contenido.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Los nombres de los campos deben ser unívocos entre tablas, excepción hecha de las claves.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los puntos anteriores corresponden muchos de ellos a preferencias personales, más que a reglas que debamos de cumplir, y en consecuencia muchos de ellos pueden ser pasados por alto, sin embargo, lo más importante es que la nomenclatura utilizada en nuestras bases de datos sea coherente y consistente con el fin de minimizar la posibilidad de errores al momento de crear una aplicación de bases de datos.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/6716497378660524467/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_3951.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/6716497378660524467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/6716497378660524467'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_3951.html' title='Principios de Diseño de Base de Datos - Parte V'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-4513847180251801260</id><published>2009-11-14T07:42:00.000-08:00</published><updated>2009-11-14T07:42:07.303-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Base de Datos"/><title type='text'>Principios de Diseño de Base de Datos - Parte IV</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A continuación se dan algunos consejos que nos ayudarán a elegir un tipo de dato adecuado para nuestras tablas:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Identificar si una columna debe ser de tipo texto, numérico o de fecha.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esto suele ser un paso demasiado sencillo. Valores eminentemente numéricos como códigos postales o cantidades monetarias deben tratarse como campos de texto si decidimos incluir sus signos de puntuación, pero obtendremos mejores resultados si los almacenamos como números y solucionamos la cuestión del formato de alguna otra forma.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Elegir el subtipo más apropiado para cada columna.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los campos de longitud fija (como CHAR) son generalmente más rápidos que los de longitud variable (como VARCHAR), aunque ocupan más espacio en disco.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El tamaño de cada campo debe restringirse al mínimo en función de cuál pudiera ser la entrada más grande. Por ejemplo, si el valor en una columna de tipo entero es menor de mil, lo mejor es configurar esta columna como un SMALLINT de tres dígitos sin signo (lo que permite exactamente 999 valores distintos).&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Configurar la longitud máxima para las columnas de texto y numéricas, así como otros atributos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Puede que nosotros tengamos preferencias distintas, pero el factor más importante es siempre ajustar al máximo la información de cada campo en lugar de usar siempre tipos TEXT e INT genéricos (e ineficientes).&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Utilizar índices apropiadamente&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Los índices son un sistema especial que utilizan las bases de datos para mejorar su rendimiento global. Al definir índices en las columnas de una tabla, se le indica a MySQL que preste atención especial a dichas columnas.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;MySQL permite definir hasta 32 índices por cada tabla y cada índice puede incorporar hasta 16 columnas. Aunque un índice de varias columnas puede no resultar de utilidad obvia a primera vista, lo cierto es que resulta muy útil a la hora de realizar búsquedas frecuentes sobre un mismo conjunto de columnas.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Dado que los índices hacen que las consultas se ejecuten más rápido, podemos estar incitados a indexar todas las columnas de nuestras tablas. Sin embargo, lo que tenemos que saber es que el usar índices tiene un precio. Cada vez que hacemos un INSERT, UPDATE, REPLACE, o DELETE sobre una tabla, MySQL tiene que actualizar cualquier índice en la tabla para reflejar los cambios en los datos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;¿Así que, cómo decidimos usar índices o no?. La respuesta es &quot;depende&quot;. De manera simple, depende que tipo de consultas ejecutamos y que tan frecuentemente lo hacemos, aunque realmente depende de muchas otras cosas.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;La razón para tener un índice en una columna es para permitirle a MySQL que ejecute las búsquedas tan rápido como sea posible (y evitar los escaneos completos de tablas). Podemos pensar que un índice contiene una entrada por cada valor único en la columna. En el índice, MySQL debe contar cualquier valor duplicado. Estos valores duplicados decrementan la eficiencia y la utilidad del índice.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Así que antes de indexar una columna, debemos considerar que porcentaje de entradas en la tabla son duplicadas. Si el porcentaje es demasiado alto, seguramente no veremos alguna mejora con el uso de un índice.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Otra cosa a considerar es qué tan frecuentemente los índices serán usados. MySQL puede usar un índice para una columna en particular si dicha columna aparece en la cláusula WHERE en una consulta. Si muy rara vez usamos una columna en una cláusula WHERE, seguramente no tiene mucha sentido indexar dicha columna. De esta manera, probablemente sea más eficiente sufrir el escaneo completo de la tabla las raras ocasiones en que se use esta columna en una consulta, que estar actualizando el índice cada vez que cambien los datos de la tabla.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ante la duda, no tenemos otra alternativa que probar. Siempre podemos ejecutar algunas pruebas sobre los datos de nuestras tablas con y sin índices para ver como obtenemos los resultados más rápidamente. Lo único a considerar es que las pruebas sean lo más realistas posibles.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Usar consultas REPLACE&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Existen ocasiones en las que deseamos insertar un registro a menos de que éste ya se encuentre en la tabla. Si el registro ya existe, lo que quisiéramos hacer es una actualización de los datos. En lugar de escribir el código que cumpla con esta lógica, y tener que ejecutar varias consultas, lo mejor es usar la sentencia REPLACE de MySQL.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Usar tablas temporales&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Cuando estamos trabajando con tablas muy grandes, suele suceder que ocasionalmente necesitemos ejecutar algunas consultas sobre un pequeño subconjunto de una gran cantidad de datos. En vez de ejecutar estas consultas sobre la tabla completa y hacer que MySQL encuentre cada vez los pocos registros que necesitamos, puede ser mucho más rápido seleccionar dichos registros en una tabla temporal y entonces ejecutar nuestras consultas sobre esta tabla.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Crear una tabla temporal es tan sencillo como agregar la palabra TEMPORARY a una sentencia típica CREATE TABLE:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;CREATE TEMPORARY TABLE tabla_temp&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;(&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;campo1 tipoDato,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;campo2 tipoDeDato,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;..&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;);&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/4513847180251801260/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_8904.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/4513847180251801260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/4513847180251801260'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_8904.html' title='Principios de Diseño de Base de Datos - Parte IV'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-378370879617305990</id><published>2009-11-14T07:29:00.000-08:00</published><updated>2009-11-14T07:29:21.509-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Base de Datos"/><title type='text'>Principios de Diseño de Base de Datos - Parte III</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Mucha gente nueva en los sistemas de bases de datos relacionales no sabe en verdad lo que significa &quot;relacional&quot; en RDBMS (Relational Database Management System). En términos simples, grupos parecidos de información son almacenados en distintas tablas que luego pueden ser &quot;juntadas&quot; (relacionadas) basándose en los datos que tengan en común. Desafortunadamente esto suena bastante académico y vago, sin embargo, en nuestra base de datos de CDs podemos ejemplificar una situación concreta en la que veremos cómo normalizar los datos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El darnos cuenta de que cada lista de CDs tiene un conjunto fijo de atributos (título, artista, año, género) y un conjunto variable de atributos (el número de pistas) nos da una idea de cómo dividir los datos en múltiples tablas que luego podamos relacionar entre sí. Podemos crear una tabla que contenga una lista de todos los álbumes y sus atributos fijos y otra que contenga una lista de todas las pista de esos álbumes. De esta forma, en vez de pensar en forma horizontal (como con la hoja de cálculo), pensamos en forma vertical y dejamos una estructura de tablas como la que se muestra a continuación.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;CREATE TABLE album (&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;id_album INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;titulo VARCHAR(80) NOT NULL );&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;CREATE TABLE pista (&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;id_album INTEGER NOT NULL,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;numero INTEGER NOT NULL,&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;titulo VARCHAR(80) NOT NULL );&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El identificador de álbum (id_album) es lo que relaciona las distintas pistas de un álbum dado. El campo id_album en la tabla pista coincide con el campo id_album en la tabla album, de tal manera que para obtener una lista de todas las pistas de un álbum dado, podríamos realizar una consulta como esta:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SELECT pista.numero, pista.nombre FROM album, pista&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;WHERE album.titulo = &quot;El titulo del album&quot;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;AND album.id_album = pista.id_album&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esta estructura es a la vez flexible y eficiente. La flexibilidad está en el hecho que podemos agregar datos al sistema posteriormente sin tener que rescribir lo que ya tenemos. Por ejemplo, si quisiéramos agregar la información de los artistas de cada álbum, lo único que tenemos que hacer es crear una tabla artista que esté relacionada a la tabla album de la misma manera que la tabla pista. Por lo tanto, no tendremos que modificar la estructura de nuestras tablas actuales, simplemente agregar la que hace falta.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;La eficiencia se refiere al hecho de que no tenemos duplicación de datos, y tampoco tenemos grandes cantidades de &quot;celdas vacías&quot;. De esta manera MySQL no tiene que almacenar más datos de los necesarios, ni gastar recursos al revisar las áreas vacías en nuestras tablas.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;El objetivo principal del diseño de bases de datos es generar tablas que modelan los registros en los que guardaremos nuestra información. Es importante que esta información se almacene sin redundancia para que se pueda tener una recuperación rápida y eficiente de los datos. A través de la normalización tratamos de evitar ciertos defectos que nos conduzcan a un mal diseño y que lleven a un procesamiento menos eficaz de los datos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Podríamos decir que estos son los principales objetivos de la normalización:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Controlar la redundancia de la información.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Evitar pérdidas de información.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Capacidad para representar toda la información.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Mantener la consistencia de los datos.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Si somos novatos en el ambiente de las bases de datos relacionales pudiéramos pensar que con la normalización nuestros datos tienen una apariencia extraña, sin embargo, esto le permite a MySQL ser muy eficiente al momento de almacenar y recuperar los datos de las tablas, además de que nos da la flexibilidad de crecer y escalar nuestras aplicaciones sin la necesidad de reestructurar una base de datos a cada momento.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Seleccionar el tipo de dato apropiado&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Una vez identificadas todas las tablas y columnas que necesita la base de datos, debemos determinar el tipo de dato de cada campo. Existen tres categorías principales que pueden aplicarse prácticamente a cualquier aplicación de bases de datos:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Texto&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Números&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;* Fecha y hora&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Cada uno de éstos presenta sus propias variantes, por lo que la elección del tipo de dato correcto no sólo influye en el tipo de información que se puede almacenar en cada campo, sino que afecta al rendimiento global de la base de datos.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/378370879617305990/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_14.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/378370879617305990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/378370879617305990'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_14.html' title='Principios de Diseño de Base de Datos - Parte III'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-318260700307541498.post-3190099597968231806</id><published>2009-11-13T14:35:00.000-08:00</published><updated>2009-11-13T14:35:08.179-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Base de Datos"/><title type='text'>Principios de Diseño de Base de Datos - Parte II</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Obtener todas las columnas de una tabla es simplemente lo más conveniente que podemos hacer cuando no estamos seguros de qué campos necesitamos. Sin embargo, a medida que las tablas crecen y cambian, esto puede convertirse en un problema de rendimiento. A la larga es mucho mejor tardarnos un tiempo extra después de nuestro desarrollo inicial y decidir exactamente qué es lo que necesitamos en nuestras búsquedas. En concreto, es mucho mejor especificar las columnas de forma explícita:&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SELECT nombre, precio, descripcion FROM productos;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esto se relaciona con un punto que tiene que ver más con el mantenimiento del código que con el rendimiento. La mayoría de los lenguajes de programación (Perl, Python, PHP, Java, etc) nos permiten acceder a los resultados de una consulta por los nombres de los campos y por su posición numérica. Para el ejemplo anterior, podemos acceder al campo 0, o al campo nombre y obtener los mismos resultados.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A la larga es mejor usar los nombres de columnas que sus posiciones numéricas. ¿Por qué? Porque las posiciones relativas de columnas en una tabla o en un resultado de una consulta pueden variar. Por ejemplo, pueden variar en una tabla como resultado de un ALTER TABLE, o bien, cambiarán en una consulta como resultado de que alguien rescriba la búsqueda y se olvide de actualizar la lógica de la aplicación apropiadamente.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Claro está, ¡aún debemos ser cuidadosos cuando cambiemos los nombres de las columnas! Pero si usamos nombres en vez de posiciones numéricas, podemos usar la capacidad de búsqueda y reemplazo de nuestro editor para encontrar el código que hemos de cambiar en caso de que cambie el nombre de una columna.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Normalizar las estructuras de tablas&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Si nunca antes hemos oído hablar de la &quot;normalización de datos&quot;, no debemos temer. Mientras que la normalización puede parecer un tema complejo, nos podemos beneficiar ampliamente al entender los conceptos más elementales de la normalización.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Una de las formas más fáciles de entender esto es pensar en nuestras tablas como hojas de cálculo. Por ejemplo, si quisiéramos seguir la pista de nuestra colección de CDs en una hoja de cálculo, podríamos diseñar algo parecido a lo que se muestra en la siguiente tabla.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;+------------+-------------+--------------+ .. +--------------+&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;| album&amp;nbsp;| track1&amp;nbsp;| track2 | track10 &lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;+------------+-------------+--------------+ .. +--------------+&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;| Antrologia | Tarzan Boy | Life is life | .. | Square rooms |&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;|| (Baltimora)&amp;nbsp; | (Opus) | .. | (Al Corley) |&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;+------------+-------------+--------------+ .. +--------------+&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Esto parece razonable. Sin embargo el problema es que el número de pistas que tiene un CD es bastante variable. Esto significa que con este método tendríamos que tener una hoja de cálculo realmente grande para albergar todos los datos, que en los peores casos podrían ser de hasta 20 pistas. Esto en definitiva no es nada bueno.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Uno de los objetivos de una estructura de tabla normalizada es minimizar el número de &quot;celdas vacías&quot;. En el caso de la tabla de CDs que estamos tratando, tendríamos muchas de estas celdas si permitiéramos CDs de 20 pistas o más. En el caso de que las listas de campos pueden expandirse &quot;hacia la derecha&quot;, como en este ejemplo de los CDs, nos da una pista de que necesitamos dividir los datos en dos o más tablas a las que luego podamos acceder de forma conjunta para obtener los datos que necesitemos.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://georgeunt.blogspot.com/feeds/3190099597968231806/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_13.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3190099597968231806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/318260700307541498/posts/default/3190099597968231806'/><link rel='alternate' type='text/html' href='http://georgeunt.blogspot.com/2009/11/principios-de-diseno-de-base-de-datos_13.html' title='Principios de Diseño de Base de Datos - Parte II'/><author><name>George</name><uri>http://www.blogger.com/profile/13606136122365935270</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVROVtLSGa4riJ6QdqMAM7f1Y1ZP8COmoVTxJxN6dREPUJSUmkAID5i9d8y25KcRlskPjw95IbC8YcSrznEC7bYYlT-BYJ8ww_3M12gApGcwlPtuTZ5-ZByquZb77n794/s220/virgo.jpg'/></author><thr:total>0</thr:total></entry></feed>