>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