Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Properties Not Exposed?
Message
From
14/11/2001 05:02:03
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
13/11/2001 19:45:23
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
00581251
Message ID:
00581375
Views:
24
>I just created my first Web service and published it thru IIS. Then, on another machine through the internet, I registered it and tried to use it. Even though the methods of the web service are accessible, none of the properties of the web service are accessible. I did not make the properties PROTECTED or HIDDEN. The class definition looks like this:
>
>DEFINE CLASS WSTest AS Session OLEPUBLIC
> WSName="WSTest"
>
> FUNCTION SayHello AS String
> RETURN "Hello, from "+This.WSName
> ENDFUNC
>
> FUNCTION SayHelloX (tcName AS String) AS String
> RETURN "Hello, "+tcName+", from "+This.WSName
> ENDFUNC
>ENDDEFINE
>
>When accessing this webserver on a different machine, I can run the following (I didn't include the "automatic code" that is entered by the intellisense)
>
>LOCAL oWS AS WSTest
>
>* Code is automatically entered by my intellisense...
>
>? oWS.SayHello() && ==> displays "Hello, from WSTest"
>? oWS.SayHelloX("Alan") &&==> displays "Hello, Alan, from WSTest"
>? oWS.WSName && ==> Results in an error, unknown name.
>
>Do I need to explicitly expose the properties?
>
>Thanks
>Alan

Alan with soap you don't have properties if you whant to acces the property value then you must create a method that does that e.g.

DEFINE CLASS WSTest AS Session OLEPUBLIC
WSName="WSTest"

FUNCTION SayHello AS String
RETURN "Hello, from "+This.WSName
ENDFUNC

FUNCTION SayHelloX (tcName AS String) AS String
RETURN "Hello, "+tcName+", from "+This.WSName
ENDFUNC

FUNCTION GetWSName() AS String
RETURN This.WSName
ENDFUNC
ENDDEFINE
Alexandre Palma
Senior Application Architect
Previous
Reply
Map
View

Click here to load this message in the networking platform