473,511 Members | 16,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The type or namespace name 'RateWebServiceClient' could not be found

rrocket
116 New Member
The entire error is "CS0246: The type or namespace name 'RateWebServiceClient' could not be found (are you missing a using directive or an assembly reference?)"

I am trying to access a web reference and cannot figure out why I am giving the above error. When I type the "using RateWebServiceClient...." the intellisense shows the "RateServiceWebReference" so it has to know that it is there, but keeps throwing me an error.

Here is the code:
Expand|Select|Wrap|Line Numbers
  1. using System.Data;
  2. using System.Configuration;
  3. using System.Collections;
  4. using System.Web;
  5. using System.Web.Security;
  6. using System.Web.UI;
  7. using System.Web.UI.WebControls;
  8. using System.Web.UI.WebControls.WebParts;
  9. using System.Web.UI.HtmlControls;
  10. using RateWebServiceClient.RateServiceWebReference;
  11. using System.Web.Services.Protocols;
  12.  
  13. //namespace RateWebServiceClient
  14. //{
  15.     public partial class FedExSPS_FedEx_Package_Letter : System.Web.UI.Page
  16.     {
  17.         protected void Page_Load(object sender, EventArgs e)
  18.         {
  19.             RateRequest request = CreateRateRequest();
  20.             RateService rateService = new RateService();
  21.  
  22.             ShowRateReply(reply);
  23.         }
  24.  
  25.         private static void ShowRateReply(RateReply reply)
  26.         {
  27.             lblFedExResponse.Text = "RateReply details:<br/>";
  28.  
  29.             //Console.WriteLine("RateReply details:");
  30.             foreach (RateReplyDetail rateDetail in reply.RateReplyDetails)
  31.             {
  32.                 lblFedExResponse.Text += "ServiceType : " + rateDetail.ServiceType + "<br/>";
  33.                 lblFedExResponse.Text += "**********************************************************<br/>";
  34.                                 foreach (RatedShipmentDetail shipmentDetail in rateDetail.RatedShipmentDetails)
  35.                 {
  36.                     lblFedExResponse.Text += "RateType : " + shipmentDetail.ShipmentRateDetail.RateType + "<br/>";
  37.                                     }
  38.             }
  39.         }
  40.     }
  41.  
Nov 6 '08 #1
7 6350
nateraaaa
663 Recognized Expert Contributor
You have the following lines commented out in your code example
//namespace RateWebServiceClient
//{

If this is not a typo remove the comments and build your project again.

Nathan
Nov 6 '08 #2
rrocket
116 New Member
Thanks for the resonse...

With or without it commented out it pretty much gives me the same error with a different error number.

Here is the exact error I get when the namespace stuff is uncommented.
CS0234: The type or namespace name 'RateServiceWebReference' does not exist in the namespace 'RateWebServiceClient' (are you missing an assembly reference?)

If it helps I am trying to implement some class files and WSDL from FedEx to run rates on a webpage.
Nov 6 '08 #3
tlhintoq
3,525 Recognized Expert Specialist
That's not the same error at all.

With the namespace declaration commented out you get an error saying there is no such namespace as 'RateWebServiceClient'. Which is true. If you comment out the namespace declaration, then the namespace doesn't exist.

With the namespace UNcommented, and thus it does exist, the compiler continues to the next error which is
'RateServiceWebReference' does not exist in the namespace 'RateWebServiceClient'

You have a using statement above the creation of your namespace that says...
using RateWebServiceClient.RateServiceWebReference;

But no where in your namespace of RateWebServiceClient do I see a definition for "RateServiceWebReference"

There is only one class of "FedExSPS_FedEx_Package_Letter"
with two methods.

So the error that there is no "RateSeviceWebReference" inside "RateWebServiceClient" is correct.
Nov 7 '08 #4
rrocket
116 New Member
I followed what you posted for the most part, but am not sure what I need to do to fix it... Any ideas would be much appreciated.

I am the code I am trying to reference in the using is in a .cs file in App_Code. The file is directly from FedEx and huge so I attached it in case you need to check it out.
Attached Files
File Type: zip RateServiceDefinitions.zip (37.3 KB, 166 views)
Nov 10 '08 #5
tlhintoq
3,525 Recognized Expert Specialist
I followed what you posted for the most part, but am not sure what I need to do to fix it... Any ideas would be much appreciated.

I am the code I am trying to reference in the using is in a .cs file in App_Code. The file is directly from FedEx and huge so I attached it in case you need to check it out.
From what I can see the References.cs file really does have a namespace that you seem to be referencing:
RateWebServiceClient.RateServiceWebReference

But since you are getting an error that says this Namespace doesn't exist I can only think that you haven't properly added this file to your project, or to your project's references. When you browse the Class View pallet for your project you should be able to navigate all the way down to all the methods in this References.cs file. Are you seeing all of them, or just the ones you've created as part of the RateWebServiceClient namespace?

If you're not seeing the RateServiceWebReference or its method, then this file hasn't been added properly, or added to the references for the project properly.
Nov 12 '08 #6
rrocket
116 New Member
I am not sure what the deal was, but after putting it on the live site it started to work fine. Thanks for the info.

Now that the rating portion is now working I am have nothing much issues getting the Shipment Creation portion to work. I am getting a similar error (CS0246: The type or namespace name 'ShipServiceWebReference' could not be found (are you missing a using directive or an assembly reference?)), but I have it done the same way the rating portion is done with the reference.cs files in the App_WebReferences folder.

If anyone has experience with the FedEx API/WSDL I would greatly appreciate a few hints.
Nov 14 '08 #7
Matthewmass
1 New Member
Rocket I am woking with the FexexClient too... (OH MY GOD IS IT FUN BLAHHHHH) I am getting an error Error 23 The type or namespace name 'ProcessShipmentRequest' could not be found (are you missing a using directive or an assembly reference?) . How did you get past this error?
Sep 8 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
9211
by: Matthew Louden | last post by:
using System.Data; using System.Data.SqlClient; //etc... SqlConnection conn = new SqlConnection(connString); SQLDataSetCommand myCmd = new SQLDataSetCommand("select * from Test;", conn);...
8
3631
by: Chris Smith | last post by:
Experience posters, I am an experienced vb/vb.net developer but having a bit of trouble converting a bit of code to C#. I have 3 projects in one solution. Trying to create a plug-in type...
1
2514
by: Randall Parker | last post by:
Using VS 2003 and Cassini web server. I'm new to ASP.Net and so this may be a dumb question. I'm getting an error where the type 'FarmLand.WebForm1' is not found. The Codebehind C# source file...
7
4733
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
1
18135
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
2
20811
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
6
27007
by: antonyliu2002 | last post by:
Hi, guys, I am using Visual Web Developer Express 2005 for my web application. I wrote a simple class called MyTestClass.cs and put it in the App_Code folder. I compiled it to library from...
2
29968
by: Andrus | last post by:
I'm trying to compile myGeneration PropertyCollectionAll.cs file with VCS Express 2005 bot got error Error 1 The type or namespace name 'Collection' could not be found (are you missing a using...
5
5185
by: mknoll217 | last post by:
I am a newbie at XML. I have been given an xml document that I need to write the schema for, for a class assignment. The xml given to me is <?xml version="1.0"?> <Vendors> <Vendor> ...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.