Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Having trouble with a simple service...

 
 
Old 10-26-2006   #1 (permalink)
bittercoder


 
 

Having trouble with a simple service...

I have a simple service, which looks like this:

----

[ServiceContract(Namespace="http://www.test.com/",
SessionMode=SessionMode.Required)]
public interface IIdentificationService
{
[OperationContract]
Guid StartTestRun(Guid testSuiteId);

[OperationContract]
TestRunStatus GetRunStatus(Guid testRunId);
}

----

The TestRunStatus is a simple class, implementing DataContract:

----

[DataContract]
public class TestRunStatus
{
private Guid _testRunId;
private int _tasksCompleted;
private int _tasksRemaining;
private TimeSpan _elapsed;
private bool _isRunning;

[DataMember]
public Guid TestRunId
{
get { return _testRunId; }
set { _testRunId = value; }
}

[DataMember]
public int TasksCompleted
{
get { return _tasksCompleted; }
set { _tasksCompleted = value; }
}

[DataMember]
public int TasksRemaining
{
get { return _tasksRemaining; }
set { _tasksRemaining = value; }
}

[DataMember]
public TimeSpan Elapsed
{
get { return _elapsed; }
set { _elapsed = value; }
}

[DataMember]
public bool IsRunning
{
get { return _isRunning; }
set { _isRunning = value; }
}
}

----

The problem I'm having is that my client proxy for this service is
behaving oddly...

When invoking the IIdentificationService.GetRunStatus(...) method it's
returning an unpopulated instance of the TestRunStatus class... though
when debugging the TestRunStatus is definitely being populated with
valid data before being returned by the service... I'm sure it's
something simple, but I haven't been able to figure out why it's not
working... what's the best approach to problem solving something like
this?


My System SpecsSystem Spec
Old 10-26-2006   #2 (permalink)
Arkady Frenkel


 
 

Re: Having trouble with a simple service...

Do you really have IIdentificationService.GetRunStatus(...) in proxy or you
just use interface but really that inner proxy of you Interface ?
OTOH you can debug incoming/outgoing data with
<diagnostics> and <system.diagnostics> elements ( don't forget to change
binding to something without encryption like basicHttpBinding to read data.

Arkady

"bittercoder" <bittercoder@gmail.com> wrote in message
news:1161859882.278500.12260@e3g2000cwe.googlegroups.com...
>I have a simple service, which looks like this:
>
> ----
>
> [ServiceContract(Namespace="http://www.test.com/",
> SessionMode=SessionMode.Required)]
> public interface IIdentificationService
> {
> [OperationContract]
> Guid StartTestRun(Guid testSuiteId);
>
> [OperationContract]
> TestRunStatus GetRunStatus(Guid testRunId);
> }
>
> ----
>
> The TestRunStatus is a simple class, implementing DataContract:
>
> ----
>
> [DataContract]
> public class TestRunStatus
> {
> private Guid _testRunId;
> private int _tasksCompleted;
> private int _tasksRemaining;
> private TimeSpan _elapsed;
> private bool _isRunning;
>
> [DataMember]
> public Guid TestRunId
> {
> get { return _testRunId; }
> set { _testRunId = value; }
> }
>
> [DataMember]
> public int TasksCompleted
> {
> get { return _tasksCompleted; }
> set { _tasksCompleted = value; }
> }
>
> [DataMember]
> public int TasksRemaining
> {
> get { return _tasksRemaining; }
> set { _tasksRemaining = value; }
> }
>
> [DataMember]
> public TimeSpan Elapsed
> {
> get { return _elapsed; }
> set { _elapsed = value; }
> }
>
> [DataMember]
> public bool IsRunning
> {
> get { return _isRunning; }
> set { _isRunning = value; }
> }
> }
>
> ----
>
> The problem I'm having is that my client proxy for this service is
> behaving oddly...
>
> When invoking the IIdentificationService.GetRunStatus(...) method it's
> returning an unpopulated instance of the TestRunStatus class... though
> when debugging the TestRunStatus is definitely being populated with
> valid data before being returned by the service... I'm sure it's
> something simple, but I haven't been able to figure out why it's not
> working... what's the best approach to problem solving something like
> this?
>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Sounds Simple but very important; Trouble saving a webpage with images Offline. Vista file management
Solved 'The User Profile Service service failed the logon' and forgotten password????? General Discussion
Is Windows Mail supporting Hotmail as a free service or is it a paid service Vista mail
The system event notification service service failed logon ... token does not exist General Discussion
Having trouble activating after a simple reformat Vista installation & setup


Vista Forums 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 Ltd

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