Consumir un Servicio Web desde una aplicación Windows 8

  • RSS
  • Add To My MSN
  • Add To Windows Live
  • Add To My Yahoo
  • Add To Google
Posted by andreslon Thursday, November 29, 2012 10:23:00 PM Categories: Desarrollo de Software

Hola a todos,

Continuando con mi post anterior acerca de "Crear y publicar un servicio WCF en Azure" ,el cual puedes leer en este link  http://avanet.org/crear-y-publicar-un-servicio-wcf-en-azure.aspx aprenderemos consumir dicho servicio desde una aplicación Windows 8.

Crearemos una pequeña aplicación para consumir los dos metodos que habiamos creado en el servicio web de sumar y restar.

1. Abriremos nuestro visual studio 2012 y crearemos un Nuevo Proyecto de Tienda Windows (Windows Store) de tipo Aplicación vacia(XAML) , la cuál nombraremos Windows8WCF,por último aceptamos.

windows8wcf

2. Cuando nuestro proyecto haya sido creado, crearemos algunos Textbox y buttons con sus respectivos textblock para nombrarlos, no olvides nombrar a cada uno de los elementos con su propiedad x:Name="". realizando un aplicacion simple similar a esta:

windows8wcf

3. Ya creado nuestra pequeña interfaz de aplicación procederemos a referenciar el servicio web listo para ser consumido desde Azure, dirigiendonos en el explorador de soluciones a nuestro proyecto y presionar click derecho, seleccionando "Agregar referencia de servicio..."

windows8wcf

4. Se abrirá una ventana para "agregar referencia de servicio" en este punto pegaremos la ruta generada por nuestro servicio web WCF en este caso realizado en el post anterior, recomiendo leerlo. Y lo nombramos de la forma como sera instanciado desde nuestra aplicación "ServiceWCF" por último aceptamos.

windows8wcf

5. Ya es hora de visualizar el poder de lo que realiza nuestro servicio web WCF, abriremos el evento click que realizan nuestros botones de sumar y restar respectivamente para invocar su metodo en el servicio web, la forma de invocación es realizada mediante el nuevo modelo de programación Asincrona  introducido por C # 5, Visual Basic 11 en. NET 4.5. para mas información recomiendo leer http://msdn.microsoft.com/es-es/library/vstudio/hh191443.aspx .Y continuando con lo mejor, codificar aplicaremos el modelo asyn y await a nuestro evento click, en donde instanciamos la referencia de servicio, y enviamos los datos que deben operar en el servicio web y nos retornaran la operación solicitada, por último almacenarla en el textbox resultado.

windows8wcf

 

6. Si hemos seguido lo pasos correctamente quiere decir que estamos listos para ejecutar nuestra aplicación puede ser localmente o en el emulador, y puedes proceder a probar, aca algunas pruebas de sumar y restar

windows8wcf

 

Esto es todo ,pronto continuare con otros post para seguir aprovechando estas nuevas tecnologias ;)

Y les recuerdo para dudas y preguntas no olvides contactarme: 

Twitter: @andreslon

Correo: andreslon-22@hotmail.com

Facebook: http://www.facebook.com/geeklon

 

 

Comments

Saturday, January 10, 2015 3:19:47 AM
yigiymce
View User Profile for yigiymce

re: Consumir un Servicio Web desde una aplicación Windows 8

Apple (NASDAQ:AAPL) iPhone followers replica watches got two conflicting pieces of data regarding its $499 price point rolex replica. In one survey done by an online shopping firm Compete as reported by chanel replica On the other side of the pricing replica handbags gap, though, was an article in Friday's Boston Globe that insists lv replica that increasingly, cell phone buyers are insisting gucci replica on style over circuitry. That report features a lovely portfolio of cell phones that are currently hot fashions My view is that Apple is marketing the chanel replica iPhone, not as a phone for "the rest of us", but as a replica handbags mass-market luxury item. Designer products such as those noted in the

Tuesday, June 30, 2015 10:12:43 PM
kiyoumins
View User Profile for kiyoumins

re: Consumir un Servicio Web desde una aplicación Windows 8

Michel, mac make up accustomed to do what tiffany and co,tiffany jewelry,tiffany and co jewelry,tiffany and co outlet,tiffany's,tiffanys,tiffany co he was vans shoes told, opened his fingers slowly, not quite stuart weitzman convinced but boots on sale,shoes outlet,shoes on sale,cheap shoes,discount shoes,shoe stores,shoes sale,shoe sale,designer shoes,cheap boots,clearance shoes,cheap shoes for women,women's boots on sale or clearance thinking ray ban sunglasses there air jordan might be nike roshe run something mizuno in it. ed hardy clothing Scevola, perceiving his advantage, scolded michael kors outlet online on:

 

“You toms shoes,toms outlet,toms shoes outlet,tom shoes,toms wedges,cheap toms,toms.com are salomon shoes dangerous. timberland You ought lululemon uk to have NFL Jerseys,Nike NFL Jerseys,NBA Jerseys,Soccer Jersey,NHL Jerseys,Baseball Jerseys,Custom Jersey,Youth Jerseys,Women Jerseys,NCAA Jerseys,cheap jerseys,cheap nfl jerseys,basketball jerseys,jerseys,hockey jerseys your feet and hands cheap jordans tied every full nike blazer moon. levi's jeans What did you say about a mac cosmetics uk head just now? chanel bags,chanel handbags,chanel sunglasses,chanel outlet,chanel purses,chanel handbags official site What head?”

 

“I nike outlet said that I ray ban sunglasses didn't basketball shoes have kobe shoes a broken head.”

 

“Was chaussures louboutin that designer handbags all?” said Scevola. omega watches,omega watch,replica watches,rolex watches,replica omega watches,rolex,watches for men,watches for women,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex He was asking himself what on earth could have happened down there during the afternoon to cause a broken head. Clearly, adidas originals it must have reebok shoes been either nike free 5.0 a fight or an accident, abercrombie but in polo ralph lauren any Ray Ban Sunglasses,Ray Ban Outlet,Ray Ban Sale,Cheap Ray Bans,Cheap Ray Ban Sunglasses,ray ban sunglasses outlet,ray ban,rayban,ray bans,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,rayban sunglasses,cheap ray ban case true religion,true religion outlet,true religion jeans he considered that it was for him a favourable circumstance, for obviously a chanel handbags,chanel bags,chanel sunglasses,chanel outlet,chanel purses,chanel handbags official site man with a oakley sunglasses,cheap oakley,cheap oakley sunglasses,oakley sunglasses cheap,oakley outlet,oakley sunglasses outlet,oakley vault,oakleys,oakley.com,sunglasses outlet,cheap sunglasses,oakley prescription glasses,fake oakleys,oakley glasses,oakley store,fake oakley,oakley sale,cheap oakleys,discount oakley sunglasses bandaged head is polo ralph lauren,ralph lauren outlet,ralph lauren outlet online,polo ralph lauren outlet,polo ralph lauren outlet online,ralph lauren,polo ralph,polo shirts,ralphlauren.com,polo outlet,ralph lauren polo at mont blanc a disadvantage. He was inclined Balenciaga to think it air max 95,nike air max 95,air max 90,nike air max 90,air max 2015,nike air max,air max,nike air max 2015,airmax must have been some silly accident, and he regretted profoundly that the lieutenant had true religion uk not killed himself rolex watches,rolex,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex outright. He turned sourly coach outlet,coach outlet store,coach outlet store online,coach outlet stores,coach factory outlet,coach factory,coach factory online,coach factory outlet online,coach outlet online to Michel.

 

“Now nike roshe you may go reebok shoes,reebok outlet,reebok,reebok skyscape into the shed. harrods And don't try any of gucci handbags your tricks with me michael kors outlet online,michael kors,kors outlet,michael kors outlet,michael kors handbags,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors any more, nike shoes,Cheap Jordans,Cheap Jordan Shoes,Cheap Air Max,Cheap Free Run Shoes,nike outlet,nike factory,nike store,nike factory outlet,nike outlet store,cheap nike shoes,nike sneakers because next time you cheap jerseys,nfl jerseys,cheap nfl jerseys,jerseys from china,cheap jerseys from china pick up harrods london a stone I will shoot you like a true religion outlet dog.”

 

He began to move tory burch outlet towards michael kors outlet,michael kors handbags,michael kors uk,michael kors,michael kors,michael kors bags the gucci outlet,gucci handbags,gucci belts,gucci shoes,gucci,gucci belt,gucci sunglasses,gucci bags,cheap gucci yard gate which nike outlet,Cheap Jordans,Cheap Jordan Shoes,Cheap Air Max,Cheap Free Run Shoes,nike shoes,nike factory,nike store,nike factory outlet,nike outlet store,cheap nike shoes,nike sneakers stood always rolex replica open, throwing over his shoulder an chanel handbags order to Michel: louboutin uk “Go into mont blanc pens the salle. Somebody has left a light in there. They all seem cheap eyeglasses to marc jacobs have gone crazy to-day. Take nike air force the michael kors outlet lamp burberry outlet into the kitchen and eyeglass frames,eyeglasses online,glasses frames,glasses online,eyeglasses frames,eyeglasses stores,cheap eyeglasses,cheap glasses,sunglasses for women,39 dollar glasses,cheap eyeglasses online,discount eyeglasses,cheap sunglasses,sunglasses outlet,sunglasses wholesale,wholesale sunglasses put nike air max it mizuno running shoes out and see that the door into the yard is shut. I am wedding dresses,prom dresses,bridesmaid dresses,evening dresses,beach wedding dresses,cheap wedding dresses,homecoming dresses,prom dresses,wedding dresses going to timberland uk,timberland,timberland boots,timberlands,timberland shoes,timberland boots for women,timberland outlet,timberland boots for men bed.” He passed through the nike mercurial gateway, jordan shoes but he gucci handbags did sac michael kors not penetrate into the timberland boots yard toms outlet very far. He christian louboutin,louboutin,red bottom shoes,louboutin shoes,red bottoms,louboutin outlet,christian louboutin shoes,christian louboutin outlet,red bottom shoes for women,louboutins stopped to michael kors outlet,michael kors,kors outlet,michael kors handbags,michael kors outlet online,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors watch Michel obeying the order. Scevola, advancing his head cautiously north face outlet beyond the pillar of the gate, abercrombie and fitch waited till he had seen Michel jimmy choo,jimmy choo shoes,jimmy choo outlet,jimmy choo handbags open roshe run the door of converse sale the nike free 5.0, nike free trainer 5.0,nike free run 5.0,free running 2,nike free run,nike free,free running,nike running shoes,nike free trainer,free runs,free run 5.0 salle omega watches and then bounded out burberry outlet,burberry,burberry outlet online,burberry factory outlet,burberry sale,burberry handbags again north face outlet,the north face,north face,the north face outlet,north face jackets,north face jackets clearance,northface across beats by dre the level jimmy choo space vans shoes,vans outlet,vans store,star wars vans shoes,cheap vans,vans shoes outlet,white vans,black vans,red vans,vans star wars,vans sneakers,vans shoes outlet store,vans sale,cheap vans shoes and ferragamo,ferragamo shoes,salvatore ferragamo,ferragamo belts,ferragamo belt,ferragamo outlet down toms outlet,toms shoes,toms shoes outlet,tom shoes,toms wedges,cheap toms,toms.com the ravine yoga pants,lululemon,lululemon outlet,lululemon athletica,lululemon addict,lulu lemon,lulu.com,lululemon.com path. It was adidas shoes a matter of less than a minute. His cheap jerseys fork was still nike free on his flip flop shoulder. His only desire ugg boots was not to be mizuno,mizuno wave,mizuno running,mizuno running shoes,mizuno baseball,mizuno volleyball,mizuno wave rider,mizuno volleyball shoes,mizuno softball,mizuno shoes,mizuno wave inspire,mizuno wave prophecy interfered with, and for air max 95 the rest Ray Ban Sunglasses,Ray Ban Outlet,Ray Ban Sale,Cheap Ray Bans,Cheap Ray Ban Sunglasses,ray ban sunglasses outlet,ray ban,rayban,ray bans,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,rayban sunglasses,cheap ray ban he did not care what they bcbg max all nike shoes did, what they would think tommy hilfiger and tommy hilfiger,hilfiger outlet,tommy hilfiger outlet,tommy hilfiger outlet stores,tommy hilfiger outlet stores online,tommy hilfiger bedding how they chanel bag would behave. The fixed idea oakley sunglasses,cheap oakley,cheap oakley sunglasses,oakley sunglasses cheap,oakley outlet,oakley sunglasses outlet,oakley vault,oakleys,oakley.com,sunglasses outlet,cheap sunglasses,oakley prescription glasses,fake oakleys,oakley glasses,oakley store,fake oakley,oakley sale,cheap oakleys,discount oakley sunglasses had taken complete replica watches possession ralph lauren outlet,ralph lauren outlet online,polo ralph lauren outlet,polo ralph lauren outlet online,polo ralph lauren,ralph lauren,polo ralph,polo shirts,ralphlauren.com,polo outlet,ralph lauren polo of jerseys from china,cheap jerseys from china,nfl jerseys,cheap jerseys,cheap nfl jerseys,jerseys,baseball jerseys,nba jerseys,hockey jerseys,basketball jerseys him. nike air max 2015,air max 90,nike air max 90,air max 95,air max 2015,air max 1,nike air max,air max,airmax He had five finger shoes no cheap basketball shoes plan, but ed hardy he had a principle levi's jeans,levis jeans,levis outlet,levis outlet store on tiffany and co which to act; and that was jerseys from china to get cheap jordans,cheap jordan shoes,cheap jordan,cheap jordans for sale,jordans for cheap,jordan shoes,jordans,air jordan,jordan retro,jordan 11,jordan xx9,jordan 6,new jordans,air jordans,retro jordans,jordan retro 11,jordan 5,air jordan 11,jordans for sale,jordan 4,jordan 1,jordan future,jordan 3,jordan 12,michael jordan shoes,air jordan shoes,air jordan retro at kobe 9 low the lieutenant tods shoes unawares, and fit flops if marc jacobs handbags,marc jacobs,marc by marc jacobs,marc jacobs outlet the fellow died coach outlet store without knowing what hand had struck him, boots on sale so nike free run,nike free,nike free 5.0, nike free trainer 5.0,nike free run 5.0,free running 2,free running,nike running shoes,nike free trainer,free runs,free run 5.0 much the oakley sunglass better. Scevola was tory burch going yoga pants to act cartier love bracelet in the gucci shoes cause of virtue ugg boots,uggs outlet,ugg,uggs,ugg boots clearance,uggs on sale,uggs boots,ugg australia,ugg slippers and justice. It burberry outlet online was nike air force,air force,nike air force 1,nike air force one,air force one nike,air force 1,air force one not to be a kevin durant shoes matter ray ban sunglasses of timberland boots,timberland shoes,timberland outlet personal contest new balance football boots at all. Meantime, Michel, louboutin,louboutin pas cher,christian louboutin,louboutin chaussures,louboutin soldes,chaussure louboutin,chaussures louboutin,chaussure louboutin pas cher,louboutin france having gone bebe dresses,bebe clothing,bebe outlet,bebe outlet online,bebe stores into ferragamo the burberry,burberry outlet,burberry outlet online,burberry factory outlet,burberry sale,burberry handbags salle, had jordan retro discovered Peyrol hollister clothing store fast asleep on a table. Though his reverence for Peyrol was unbounded, his simplicity was lebron james shoes such that beats solo he shook his jordan retro,jordan shoes,air jordan,air jordans,retro jordans,air jordan retro,jordans,jordan 11,jordan xx9,jordan 6,new jordans,cheap jordans,jordan retro 11,jordan 5,air jordan 11,jordans for sale,jordan 4,jordan 1,jordan future,jordan 3,jordan 12,michael jordan shoes,air jordan shoes master by insanity workout the lululemon shoulder as he chanel bags would tory burch,tory burch outlet,tory burch handbags,tory burch shoes,tory burch sale,toryburch,tory burch sandals,toryburch.com,tory burch flip flops have done air max 90 any common mortal. The nike blazer,blazer nike,nike blazer pas cher,Chaussures Nike Blazer,Nike Blazer Femme rover passed from a cheap nfl jerseys state of guess outlet inertia into new balance shoes a insanity workout,insanity,insanity workout calendar,insanity calendar,insanity workout schedule sitting posture so quickly that air jordans Michel stepped back a jordan shoes,air jordan,cheap jordans,air jordans,jordan retro,air jordan shoes,jordans,jordan 11,jordan xx9,jordan 6,new jordans,retro jordans,jordan retro 11,jordan 5,air jordan 11,jordans for sale,jordan 4,jordan 1,jordan future,jordan 3,jordan 12,michael jordan shoes,air jordan retro pace tory burch outlet,tory burch,tory burch handbags,tory burch shoes,tory burch sale,toryburch,tory burch sandals,toryburch.com,tory burch flip flops and lululemon outlet,lululemon,yoga pants,lulu lemon,lulu.com,lululemon.com waited uggs outlet to be addressed. lebron james shoes But as michael kors outlet Peyrol only new balance outlet stared at him, bcbg max,bcbg max azria,bcbg dresses,bcbg shoes,bcbg outlet,bcbg Michel took mac cosmetics uk the toms shoes initiative dolce gabbana in Ray Ban Sunglasses,Ray Ban Outlet,Ray Ban Sale,Cheap Ray Bans,Cheap Ray Ban Sunglasses,ray ban sunglasses outlet,ray ban,rayban,ray bans,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,rayban sunglasses,cheap ray ban a adidas store concise phrase:

 

“He's at Balenciaga,balenciaga sneakers,balenciaga handbag it!”

 

Peyrol uggs outlet,ugg boots,ugg,uggs,ugg boots clearance,uggs on sale,uggs boots,ugg australia,ugg slippers did beats by dre,dr dre,beats headphones,dre beats,beats by dr,beats by dr dre,beats audio,dr dre beats,dre headphones,beats by dre headphones,beats by dr. dre,cheap beats not seem christian louboutin completely awake: “What replica watches,rolex watches,rolex,watches for men,watches for women,omega watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex is tommy hilfiger outlet it you hermes mean?” he asked.

 

“He is burberry uk making motions wedding dresses to escape.”

 

Peyrol kate spade uk was wide burberry awake now. He even swung his michael kors,sac michael kors,michael kors sac,michael kors pas cher,sac michael kors pas cher,michael kors france feet off oakley sunglasses the table.

 

“Is he? gucci outlet Haven't air max you locked lebron james shoes the tommy hilfiger outlet,tommy hilfiger,hilfiger outlet,tommy hilfiger outlet stores,tommy hilfiger outlet stores online,tommy hilfiger bedding cabin door?”

 

Michel, very frightened, explained designer handbags,handbags outlet,purses and handbags,wholesale handbags,designer bags,bags outlet,handbags wholesale,cheap purses,discount handbags,cheap handbags,handbags sale,wholesale purses,handbags and purses,designer purses that he bebe dresses had never been told to puma outlet do that.

 

“No?” michael kors remarked Peyrol dansko outlet placidly. fendi belts “I must have air max 90,nike air max 90,air max 95,air max 2015,air max 1,nike air max,air max,nike air max 2015,airmax forgotten.” But Michel oakley sunglasses remained agitated and air jordan,jordan shoes,cheap jordans,air jordans,jordan retro,air jordan shoes,jordans,jordan 11,jordan xx9,jordan 6,new jordans,retro jordans,jordan retro 11,jordan 5,air jordan 11,jordans for sale,jordan 4,jordan 1,jordan future,jordan 3,jordan 12,michael jordan shoes,air jordan retro murmured: “He is escaping.”

 

“That's all right,” said Peyrol. “What are you fussing gucci handbags,gucci outlet,gucci belts,gucci shoes,gucci,gucci belt,gucci sunglasses,gucci bags,cheap gucci about? How far hollister clothing can birkin bag,hermes belt,hermes handbags,hermes birkin,hermes bags,birkin bags he escape, michael kors,michael kors canada,michael kors outlet,michael kors outlet online do you think?”

ralph lauren outlet