2

I am using using VB.NET in Visual Studio 2007. I am trying to integrate the FexEd rating service into one of my company's websites using the FedEx WSDL. My connection/integration with the WSDL seems to be working properly as far as I can tell (first time working with WSDLs) since it isn't complaining about undefined methods and such.

The exception to this is that when I try to create a new instance of RateService I get an error

"Type 'Rate Service' is not defined."

I am using the exact same declaration that is in the sample code that FexEx provides Dim service As RateService = New RateService() and have the same import statements.

Can anybody think of a reason why I am having problems with just this one class? Or is there anybody who has used the Fedex service that can give me pointers? Feel free to ask me questions if you need more info since I most likely left out something important.

Thanks in advance.

Here is the beginning of the RateService Constructor asked for by urbanlemur

Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization

' 
' This source code was auto-generated by wsdl, Version=2.0.50727.1432.
' 


''' <remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")> _
<System.Diagnostics.DebuggerStepThroughAttribute> _
<System.ComponentModel.DesignerCategoryAttribute("code")> _
<System.Web.Services.WebServiceBindingAttribute(Name := "RateServiceSoapBinding", [Namespace] := "http://fedex.com/ws/rate/v13")> _
Public Partial Class RateService
    Inherits System.Web.Services.Protocols.SoapHttpClientProtocol

    Private getRatesOperationCompleted As System.Threading.SendOrPostCallback

    ''' <remarks/>
    Public Sub New()
jbryhan
  • 21
  • 2
  • It may be helpful if you share the relevant snippet of code so people can see what exactly is not working out. – aLearner Dec 19 '12 at 18:10

1 Answers1

1

Just to verify did you create the proxy class? (Sounds like you did but never hurts to ask)

Create web service proxy in Visual Studio from a WSDL file

Do you have the connection defined in your web config?

<applicationSettings>
    <RateWebServiceClient.Properties.Settings>
      <setting name="RateWebServiceClient_RateServiceWebReference_RateService" serializeAs="String">
        <value>##fedex webservice address ##</value>
      </setting>
    </RateWebServiceClient.Properties.Settings>
  </applicationSettings>
Community
  • 1
  • 1
urbanlemur
  • 102
  • 1
  • 4
  • I didn't have the proxy class. I created it and have it in my project, but I am still getting the same error. I had previously tried including the connection in my web config, but I get an error saying "Unrecognized configuration section applicationSettings/RateWebService.Properties.Settings" – jbryhan Dec 19 '12 at 20:44
  • Do you have a snippet of code for the RateService Constructor created by wsdl.exe? Are you including the namespace of the RateServiceClass proxy? – urbanlemur Dec 20 '12 at 13:22
  • I included the RateService Constructor snippet above in the original question. The answer to your second question is probably 'No' just because I have no idea how to do that. I am very new to VB.NET development. – jbryhan Dec 26 '12 at 22:15