Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6
This is the forum to discuss the Wrox book Professional Microsoft Robotics Developer Studio by Kyle Johns, Trevor Taylor; ISBN: 9780470141076
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 18th, 2008, 06:40 PM
Registered User
 
Join Date: Jul 2008
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kyubot
Default Problem adding a service forwarder port in Chapter

Hi, I'm first here.
I'm currently trying to fallow chapter 3 step by step
and now I'm having trouble with the service forwarder port
in ServiceA.
I put this code at the top of the ServiceA class

// Create a port to access Service B,
// but we don't know where to send messages yet
serviceb.ServiceBOperations _servicebPort = null;

after adding other codes, I tried to build it but only can get
fallowing error message.

C:\Microsoft Robotics Studio (1.5)\projects\ServiceA\ServiceA.cs(39,12): error CS0234: The type or namespace name 'ServiceBOperations' does not exist in the namespace 'Robotics.ServiceB' (are you missing an assembly reference?)

I still don't know what I missing in the code.
I checked everything in the book with my code but found no missing parts.
Could you explain about the reason of the error and how to solve it?


  #2 (permalink)  
Old July 19th, 2008, 05:47 AM
Authorized User
 
Join Date: Jun 2008
Location: Johannesburg, GA, South Africa.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It would seem that you haven't added the proxy for ServiceB in your references. Forgive me if I am mistaken.

I think what you need to do is:
1. Right click references and select "Add reference"
2. go to the "Browse" tab and navigate to the folder where the "ServiceB" project resides
3. Click on the folder and then navigate to the Proxy folder, then the OBJ folder, then the Debug folder (please note you have to have compiled the ServiceB project first) then select ServiceB.Y####.M##.proxy.dll
4. If that does not allow compilation, you need to add a using reference: 'using Robotics.ServiceB.proxy;' (that is, if the namespace in ServiceB is 'Robotics')

It is not likely that you are actually struggling with the ServiceForwarder, since that particular object belongs in the DsspServiceBase class, which every DSS inherits from.

I hope that answers your question.

-Quintin
  #3 (permalink)  
Old July 19th, 2008, 10:50 AM
Registered User
 
Join Date: Jul 2008
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kyubot
Default

Hello Quintin,
I already included the ServiceB proxy dll as reference to ServiceA.
As you mentioned I added the using declaration as:

Code:
using Robotics.ServiceB.Proxy;
but still doesn't work.
I only can suspect for now is that the reference cannot access to ServiceBOperations for some reason which I don't know.
There is no problem with compiling and running ServiceB, so I don't know what makes the problem.

Let me check again what I've been fallowing.
I added fallowing code
Code:
serviceb.ServiceBOperations _servicebPort = null;
in just right below :
      public class SercieAService : DsspServiceBase
under Robotics.ServiceA namespace

Thanks for help,

  #4 (permalink)  
Old July 20th, 2008, 11:49 PM
Authorized User
 
Join Date: Jun 2008
Location: Johannesburg, GA, South Africa.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hmmm... I think it is a referencing issue - but without seeing code it is difficult.

In your using declaration, are you using ServiceB's proxy?
using Robotics.ServiceB.[u]proxy</u>;

Then you would get the operations by typing: Robotics.ServiceB.Proxy.ServiceBOperations;

Otherwise, host your code somewhere and I'll see if I can see what's going on. Have you tried compiling the author's code for this example? I checked it out and it works for me.

-Quintin (The University of Johannesburg)
Currently looking for affordable Russian (or equivalent) mail order bride. Must have masters level or higher in simulated robotics
  #5 (permalink)  
Old July 21st, 2008, 09:49 AM
Registered User
 
Join Date: Jul 2008
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kyubot
Default

Quote:
quote:Originally posted by qjay
 Hmmm... I think it is a referencing issue - but without seeing code it is difficult.

In your using declaration, are you using ServiceB's proxy?
using Robotics.ServiceB.[u]proxy</u>;

Then you would get the operations by typing: Robotics.ServiceB.Proxy.ServiceBOperations;

Otherwise, host your code somewhere and I'll see if I can see what's going on. Have you tried compiling the author's code for this example? I checked it out and it works for me.

-Quintin (The University of Johannesburg)
Currently looking for affordable Russian (or equivalent) mail order bride. Must have masters level or higher in simulated robotics
Man. you exactly pointed out the problem.
I finally realized that I didn't put the using declaration correctly.
I should have put .Proxy at the end.
Now it's compiling ok.
Thanks,

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a web service mielniczuk BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 16th, 2008 01:14 AM
Problem while reading data from COMM Port salman .NET Framework 2.0 0 November 21st, 2007 07:33 AM
adding web service at runtime owoade .NET Web Services 2 August 28th, 2007 02:15 AM
Adding Service Reference taposh_dr BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 1 July 11th, 2007 01:48 PM
Adding a reference to a web service loganscott2000 .NET Web Services 1 April 13th, 2005 09:51 PM



All times are GMT -4. The time now is 06:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.