K
Kevin Blount
I'm tyring to access an object created by using a method from a third
party API. The documentation tells me what object should be return,
and the properties of that object, but when I try and access one of
those properties I've shown an error message saying that the Object
doesn't support this property or method. Here's the code I'm using
(edited to protect the third party NDA)
[script]
1: <%
2: dim siteApi, userApi
3: dim userObj
4: dim session, user_date_created
5:
6: set siteApi = createobject("MSSoap.SoapClient30")
7: siteApi.mssoapinit("http://thirdparty.domain/site/api?wsdl")
8:
9: set userApi = createobject("MSSoap.SoapClient30")
10: userApi.mssoapinit("http://thirdparty.domain/user/api?wsdl")
11:
12: session = siteApi.login("username","p@ssw0rd")
13:
14: set userObj = userApi.getUser(session,"webadmins")
15:
16: user_date_created = userObj.date_created
17: %>
[/script]
In the above code, the session variable is populated with the correct
info (a HEX string), suggesting that my siteApi object is being
created and used correctly. However, I get the following error when I
run it without line 16 commented out:
[error]
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'date_created'
/soapTest/index.asp, line 16
[/error]
The documentation for the user API does show that 'date_created' is a
property of the UserStruct object, returned by the 'getUser' method,
so I'm readlly confused why this won't work.
Is there anything fundamentally wrong with my script? If not, is there
any ASP I can use to see what properties are available with the
userObj?
Thanks for any help you can offer
Kevin
party API. The documentation tells me what object should be return,
and the properties of that object, but when I try and access one of
those properties I've shown an error message saying that the Object
doesn't support this property or method. Here's the code I'm using
(edited to protect the third party NDA)
[script]
1: <%
2: dim siteApi, userApi
3: dim userObj
4: dim session, user_date_created
5:
6: set siteApi = createobject("MSSoap.SoapClient30")
7: siteApi.mssoapinit("http://thirdparty.domain/site/api?wsdl")
8:
9: set userApi = createobject("MSSoap.SoapClient30")
10: userApi.mssoapinit("http://thirdparty.domain/user/api?wsdl")
11:
12: session = siteApi.login("username","p@ssw0rd")
13:
14: set userObj = userApi.getUser(session,"webadmins")
15:
16: user_date_created = userObj.date_created
17: %>
[/script]
In the above code, the session variable is populated with the correct
info (a HEX string), suggesting that my siteApi object is being
created and used correctly. However, I get the following error when I
run it without line 16 commented out:
[error]
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'date_created'
/soapTest/index.asp, line 16
[/error]
The documentation for the user API does show that 'date_created' is a
property of the UserStruct object, returned by the 'getUser' method,
so I'm readlly confused why this won't work.
Is there anything fundamentally wrong with my script? If not, is there
any ASP I can use to see what properties are available with the
userObj?
Thanks for any help you can offer
Kevin