Re: Need Help, Trying to learn WCF
- From: "Jeff" <jeffby@xxxxxxxxxxxxx>
- Date: Wed, 18 Nov 2009 02:20:43 GMT
Hi Mr. Arnold,
You are correct, in the class that i created and working fine the only
public method is the
Public ReadOnly Property AmountDue() As Decimal
Get
Return AmountDueDecimal
End Get
End Property
this is the only method I wanted exposed in the class all the rest is
private to the class, which worked great.
I did get this working last night about midnight finally, I appearently had
the code correct, which was very close to what family tree mike also
responded with.
All I did was put all of the code from the class into the RoomRateService.vb
and then rename what was the Sub New() in the class to a Public Function in
the RoomRateServices.vb
which accepted all 5 arguments, then in the IRoomRateService.vb I aslo
reference the new Function.
Now come to find out all that was correct but I did not know it yesterday
(or day before when I first started). I thought that it was wrong because I
could not access any of these in the service from the form even though it
could sort of "see" them. Come to find out that when i created the
WFCService1 I did not catch that it saved that to another folder outside of
the folder where i was saving the application once this was brought to my
attention, i deleted that service and all reference to that service, I then
created a new Service and made sure that it got saved in the same folders as
my application and used created a new service reference to this new
WCFService2 using all of the same code it then worked! Now I can not
explain why that is per say i would think that it should have still worked
but it did not so I am at a loss to explain all i know is that is what i did
and it is now working.
So Thank you very much for your help!
Jeff
"Mr. Arnold" <Arnold@xxxxxxxxxx> wrote in message
news:O7MhHR5ZKHA.196@xxxxxxxxxxxxxxxxxxxxxxx
Jeff wrote:
ok, So In my original post where i have my code listed, isn't that how I
am doing it? I have it listed as how it worked when sending to a class
then how I am attempting to send to the Serivce.
Where is the word "Public" in any of your code on a class, method,
function etc, etc. Anything that is NOT marked as 'Public' is 'Private'.
http://www.startvbdotnet.com/oop/constructor.aspx
public: a field, method, or class that is accessible to every class.
protected: a field, method, or class that is accessible to the class
itself, subclasses, and all classes in the same package or directory.
friendly: a field, method, or class that is accessible to the class itself
and to all classes in the same package or directory. Note that friendly is
not a separate keyword. A field or method is declared friendly by virtue
of the absence of any other access modifiers.
private: a field or method that is accessible only to the class in which
it is defined. Note that a class can not be declared private as a whole.
http://www.angelfire.com/tx4/cus/shapes/vbnet.html
.
- References:
- Need Help, Trying to learn WCF
- From: Jeff
- Re: Need Help, Trying to learn WCF
- From: Mr. Arnold
- Re: Need Help, Trying to learn WCF
- From: Jeff
- Re: Need Help, Trying to learn WCF
- From: Mr. Arnold
- Re: Need Help, Trying to learn WCF
- From: Jeff
- Re: Need Help, Trying to learn WCF
- From: Mr. Arnold
- Need Help, Trying to learn WCF
- Prev by Date: RE: Strange web service problem
- Next by Date: Re: Need Help, Trying to learn WCF
- Previous by thread: Re: Need Help, Trying to learn WCF
- Next by thread: RE: Need Help, Trying to learn WCF
- Index(es):
Relevant Pages
|