Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Two way function does not return data with custom data types

 
 
Thread Tools Display Modes
Old 06-23-2007   #1 (permalink)
Jason Rodman
Guest


 

Two way function does not return data with custom data types

I have been trying to get started with WCF and have hit a wall. I have a
self-hosted WCF service that uses dupex netTcpBinding to allow two-way data
flow. So far it works great with sending basic data types as a return value
when I call a method from a client, but when I return a custom class or
structure, its data members always come back as nothing. Any ideas? Here is a
sample of my implementation:

<ServiceContract(SessionMode:=SessionMode.Required,
CallbackContract:=GetType(IServerCallback))> _
Interface IServer

<OperationContract(IsOneWay:=False, IsInitiating:=True,
IsTerminating:=False)> _
Function Login() As LoginResult

End Interface

<DataContract()> _
Public Class LoginResult

<DataMember()> _
Public Value As String

End Class

<ServiceBehavior(ConfigurationName:="GameStreet.GSTalkServer", _
InstanceContextMode:=InstanceContextMode.PerSession, _
ConcurrencyMode:=ConcurrencyMode.Multiple)> _
Public Class MyService
Implements IServer

Public Function Login() As LoginResult Implements IServer.Login
Dim oRes As New LoginResult
oRes.Value = "Any value..."
Return oRes
End Function

End Class


 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Registry and data types Marco Shaw [MVP] PowerShell 3 01-02-2008 08:55 AM
Missing data output for custom formatted columns Altraf PowerShell 7 10-23-2007 03:05 AM
Custom data binding Matthijs ter Woord Avalon 0 02-16-2007 10:32 AM
Custom Data Binding with ItemsControl ControlTemplate Problem HolaMan Avalon 2 06-07-2006 03:53 AM
Custom data source provider viliescu Avalon 0 01-11-2006 04:21 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50