473,548 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error accessing property of an object

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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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

Jun 13 '07 #1
8 4185
why would you not simply go to the third party who created this?!?

"Kevin Blount" <ke**********@g mail.comwrote in message
news:11******** **************@ i13g2000prf.goo glegroups.com.. .
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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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
Jun 13 '07 #2
On Jun 13, 11:09 am, "J. Anos" <j...@anos.comw rote:
why would you not simply go to the third party who created this?!?

"Kevin Blount" <kevin.blo...@g mail.comwrote in message

news:11******** **************@ i13g2000prf.goo glegroups.com.. .
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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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- Hide quoted text -

- Show quoted text -
The third party does not support my coding, and I suspect that my
coding is at fault here. Unless I can verify that my code is fine, the
door is open for the third party to say "it's your code, not our API".

Jun 13 '07 #3
perhaps the API is case sensitive ?
"Kevin Blount" <ke**********@g mail.comwrote in message news:11******** **************@ i13g2000prf.goo glegroups.com.. .
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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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

Jun 13 '07 #4
On Jun 13, 12:19 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
perhaps the API is case sensitive ?

"Kevin Blount" <kevin.blo...@g mail.comwrote in messagenews:11* *************** ******@i13g2000 prf.googlegroup s.com...
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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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
Thanks for the suggestions, but all the cases used above are per the
documentation (assuming the documentation is right :p)

I'm guess by that comment, you don't see anything noticeably wrong
with my code?

Jun 13 '07 #5
The error message is pretty specific.

Not sure what else is possible, since we know nothing of the API . You have either instantiated the wrong object or the
method/property doesn't exist for that object.

"Kevin Blount" <ke**********@g mail.comwrote in message news:11******** *************@i 38g2000prf.goog legroups.com...
On Jun 13, 12:19 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
>perhaps the API is case sensitive ?

"Kevin Blount" <kevin.blo...@g mail.comwrote in messagenews:11* *************** ******@i13g2000 prf.googlegroup s.com...
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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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

Thanks for the suggestions, but all the cases used above are per the
documentation (assuming the documentation is right :p)

I'm guess by that comment, you don't see anything noticeably wrong
with my code?

Jun 13 '07 #6
On Jun 13, 2:03 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
The error message is pretty specific.

Not sure what else is possible, since we know nothing of the API . You have either instantiated the wrong object or the
method/property doesn't exist for that object.

"Kevin Blount" <kevin.blo...@g mail.comwrote in messagenews:11* *************** *****@i38g2000p rf.googlegroups .com...
On Jun 13, 12:19 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
perhaps the API is case sensitive ?
"Kevin Blount" <kevin.blo...@g mail.comwrote in messagenews:11* *************** ******@i13g2000 prf.googlegroup s.com...
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_creat ed
5:
6: set siteApi = createobject("M SSoap.SoapClien t30")
7: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
8:
9: set userApi = createobject("M SSoap.SoapClien t30")
10: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
11:
12: session = siteApi.login(" username","p@ss w0rd")
13:
14: set userObj = userApi.getUser (session,"webad mins")
15:
16: user_date_creat ed = userObj.date_cr eated
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
Thanks for the suggestions, but all the cases used above are per the
documentation (assuming the documentation is right :p)
I'm guess by that comment, you don't see anything noticeably wrong
with my code?- Hide quoted text -

- Show quoted text -
OK, that sounds like 2 reasonable assumptions. Do you know of any ASP
code that I can use to 'look inside' the object?

Since I last replied I've done some digging, and found that
userObj.length returns a value of 11. This almost matches the number
of documented properties of the expected returned object, which is 10.
Using another of the APIs provided by the third party, I checked the
length property and it returned 24, which again is close the 23
documented properties of that returned object.

My guess is that the object I'm creating does contain the info I
need... I'm just not using the right property names or syntax (or
something!!) to retrieve it. If I could loop through the object
somehow and list all the properties, that would help immensely.

Any ideas?

Jun 13 '07 #7
[Kevin Blount] wrote-:
If I could loop through the object
somehow and list all the properties, that would help immensely.
In JScript:

1: siteApi = new ActiveXObject(" MSSoap.SoapClie nt30")
2: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
3:
4: userApi = new ActiveXObject(" MSSoap.SoapClie nt30")
5: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
6:
7: session = siteApi.login(" username","p@ss w0rd")
8:
9: userObj = userApi.getUser (session,"webad mins")
10:
11: list='Property/Method Name: Property/Method Value'
12: for(prop in userObj)
13: list+=prop + ": "+userObj[prop]+"\n"
14: WScript.Echo(li st)
Good Luck, Ayush.
--
Scripting Home : http://snipurl.com/Scripting_Home
Jun 13 '07 #8
On Jun 13, 4:45 pm, Ayush <"ayushmaan. j[aatt]gmail.com"wrote :
[Kevin Blount] wrote-:
If I could loop through the object
somehow and list all the properties, that would help immensely.

In JScript:

1: siteApi = new ActiveXObject(" MSSoap.SoapClie nt30")
2: siteApi.mssoapi nit("http://thirdparty.doma in/site/api?wsdl")
3:
4: userApi = new ActiveXObject(" MSSoap.SoapClie nt30")
5: userApi.mssoapi nit("http://thirdparty.doma in/user/api?wsdl")
6:
7: session = siteApi.login(" username","p@ss w0rd")
8:
9: userObj = userApi.getUser (session,"webad mins")
10:
11: list='Property/Method Name: Property/Method Value'
12: for(prop in userObj)
13: list+=prop + ": "+userObj[prop]+"\n"
14: WScript.Echo(li st)

Good Luck, Ayush.
--
Scripting Home :http://snipurl.com/Scripting_Home
Hi Ayush,

Thanks for the response. I was able to figure out where I was going
wrong yesterday, and it was as I suspected part of my code. I had to
remember that the returned object was XML, and then I went out
searching and found a way to check the contents, or in better terms,
the nodes inside the object.

The script I found turns out to match your suggestion, execpt for
being in VBscript not JScript:

for each node In userApi
Response.Write( "[" & node.nodeName & "]{" & node.Text & "}")
next
>From that I was able to find the node IDs, and then user_date_creat ed
variable could be populated using:

user_date_creat ed = userObj(8).Text (where 8 is the internal ID of the
date I need, based on 0 thru 7 being other info)
Jun 14 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
16227
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet...
1
1592
by: Jason Bell | last post by:
Every example of properties I've seen have used simple types such as integers and strings. Here's the scenario I'm trying to work out (3D graphics programming): I have a class called Matrix16f, containing 16 floats that define the matrix, which in turn defines an object's position and orientation in 3D space. As well I want it to have a...
8
2023
by: Charles | last post by:
Can anyone help me with this error. "Could not access 'CDO.Message' object." This is from the: "SmtpMail.Send(mailMsg)" command.
2
8429
by: jdanoz | last post by:
Hello, i have a vb.net project with a reference to an ActiveX object (ocx). If i try to use the ocx from vb6 project (adding the reference) it works ok (using CreateObject). In vb.net, the CreateObject works ok, the object gets initialized...
0
23449
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
6
1512
by: David Hearn | last post by:
I have a property in a user control that I am setting: Private strPageName as String Public Property PageName() as String Get Return strPageName End Get Set(byVal Value as String) strPageName = Value End Set
11
3709
by: Jerry | last post by:
I'm using this code: Dim strName For Each strName in Session.Contents Response.Write strName & " - " & Session.Contents(strName) & "<BR>" Next If I only do a response.write strName, it shows all the session names but when I include the session.contents it gives me the following error:
1
6999
by: nandakumar.raghu | last post by:
Hi, I have written a javascript function that acceses properties from an activex object. - <OBJECT id="alertObj" classid="clsid:AEE77194-B98F-4E0E-A27F-4AD6B23F0038"></OBJECT> function onLoadfunc()
1
4651
by: Mesan | last post by:
Has anyone else noticed that even though you handle an exception that happens within the background worker that the UnhandledException event still fires? For example, here's my ThreadException hookup and code : Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); void...
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.