Object References in web service and web app

Last post 05-12-2008 7:58 PM by vishalbade. 1 replies.

Sort Posts:

  • Object References in web service and web app

    05-12-2008, 2:16 PM
    • Contributor
      4,575 point Contributor
    • mpaterson
    • Member since 11-27-2006, 3:24 AM
    • Ipswich, MA
    • Posts 1,298

    I have a web service which is exposed to a web app.
    The service accepts an object of type Billing.Check as a parameter.
    The web app creates an instance of type Billing.Check.

    The problem is I get the following error:

    cannot convert from 'ClassLibrary1.Class1' to 'WebApplication1.myWebRef.Class1' 

    I'm confused as both the service and application are referencing the same assembly for the type Billing.Check.

    Any ideas?

    If everything happens for a reason what is the reason for this error?
  • Re: Object References in web service and web app

    05-12-2008, 7:58 PM
    Answer
    • Participant
      1,126 point Participant
    • vishalbade
    • Member since 02-12-2008, 1:28 PM
    • Posts 187

    Normally, the service would have the definitions for Billing.Check, when you create a proxy for the service in your client web app, you would need to use that proxy lets say localhost, to create an instance of the Object Check. Example localhost.Check myCheckObj = new localhost.Check();

    IF you could provide more code and where exactly you are seeing the error, it will help to track the problem.

     

    Vishal
Page 1 of 1 (2 items)