Consumindo serviços WCF
Olá pessoal, dando continuidade às postagens sobre WCF, agora vou comentar sobre como consumir serviços utilizando WCF. O primeiro passo é adicionar um novo projeto na solução, aqui vou adicionar um projeto do tipo WPF Application e a solução deve ficar assim: Em seguida é necessário criar uma interface para o cliente do serviço, para isto basta utilizar o XAML abaixo. 1: < Window x:Class =”ClienteWCF.Window1″ 2: xmlns =”http://schemas.microsoft.com/winfx/2006/xaml/presentation” 3: xmlns:x =”http://schemas.microsoft.com/winfx/2006/xaml” 4: Title =”ClienteWCF” Height =”300″ Width =”300″ > 5: < Grid > 6: < Grid.ColumnDefinitions > 7: < ColumnDefinition /> 8: < ColumnDefinition /> 9: </ Grid.ColumnDefinitions > 10: < Grid.RowDefinitions > 11: < RowDefinition Height =”40*” /> 12: < RowDefinition Height =”40*” /> 13: < RowDefinition Height =”40*” /> 14: < RowDefinition Height =”200*” /> 15: </ Grid.RowDefinitions > 16: < TextBlock Text =”Valor1:” Grid

Excerpt from:
Consumindo serviços WCF


