472,371 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

Accessing string arrays using classic ASP (vbscript)

Hello everyone,

Please help me before I throw my computer out of the window:

I'm working on a web application in classic ASP (vbscript), which is making
calls to some webservices. The calls are made using SOAP - i installed the
SOAP3 toolkit on my windows 2k server to enable this. The webservice calls
are returning String Arrays which I can't seem to do anything useful with.

The call shown below returns a string array with two elements (stored in
returnedData):
....

dim returnedData
returnedData=SoapClient3.createCase(param1, param2, param3)
set SoapClient3=nothing

response.write "<br>"&vartype(returnedData) '8200
response.write "<br>"&typename(returnedData) 'String()
response.write "<br>"&ubound(returnedData) '1
....

The call to the webservice works just fine, and my data is successfully sent
to the other system, however I don't seem to be able to do anything with the
returned string array stored in 'returnedData', bar identify the vartype
(8200) and typename (String()), and number of elements (2 as expected).

As soon as I try something like;

response.write returnedData(1) '(line 58)

I get the error:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

All other attempts to do something useful with the array fail too, e.g.

myString=Join(returnedData)

results in:

Error Type:
Microsoft VBScript runtime (0x800A01CA)
Variable uses an Automation type not supported in VBScript
/bwc/ordercomplete.asp, line 59

I really need to be able to access these array values - and cannot see any
means of doing it. I'd be very grateful for any help,

Regards,
Jon.
Jul 22 '05 #1
6 12624
Have you tried explicitly casting the array element to a string?

Response.Write CStr(returnedData(1))

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
Hello everyone,

Please help me before I throw my computer out of the window:

I'm working on a web application in classic ASP (vbscript), which is making calls to some webservices. The calls are made using SOAP - i installed the SOAP3 toolkit on my windows 2k server to enable this. The webservice calls are returning String Arrays which I can't seem to do anything useful with.

The call shown below returns a string array with two elements (stored in
returnedData):
...

dim returnedData
returnedData=SoapClient3.createCase(param1, param2, param3)
set SoapClient3=nothing

response.write "<br>"&vartype(returnedData) '8200
response.write "<br>"&typename(returnedData) 'String()
response.write "<br>"&ubound(returnedData) '1
...

The call to the webservice works just fine, and my data is successfully sent to the other system, however I don't seem to be able to do anything with the returned string array stored in 'returnedData', bar identify the vartype
(8200) and typename (String()), and number of elements (2 as expected).

As soon as I try something like;

response.write returnedData(1) '(line 58)

I get the error:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

All other attempts to do something useful with the array fail too, e.g.

myString=Join(returnedData)

results in:

Error Type:
Microsoft VBScript runtime (0x800A01CA)
Variable uses an Automation type not supported in VBScript
/bwc/ordercomplete.asp, line 59

I really need to be able to access these array values - and cannot see any
means of doing it. I'd be very grateful for any help,

Regards,
Jon.

Jul 22 '05 #2
Thanks for your input Mark.

Response.Write CStr(returnedData(1)) 'line 58

results in....

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

Any more ideas anyone?

"Mark Schupp" wrote:
Have you tried explicitly casting the array element to a string?

Response.Write CStr(returnedData(1))

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
Hello everyone,

Please help me before I throw my computer out of the window:

I'm working on a web application in classic ASP (vbscript), which is

making
calls to some webservices. The calls are made using SOAP - i installed

the
SOAP3 toolkit on my windows 2k server to enable this. The webservice

calls
are returning String Arrays which I can't seem to do anything useful with.

The call shown below returns a string array with two elements (stored in
returnedData):
...

dim returnedData
returnedData=SoapClient3.createCase(param1, param2, param3)
set SoapClient3=nothing

response.write "<br>"&vartype(returnedData) '8200
response.write "<br>"&typename(returnedData) 'String()
response.write "<br>"&ubound(returnedData) '1
...

The call to the webservice works just fine, and my data is successfully

sent
to the other system, however I don't seem to be able to do anything with

the
returned string array stored in 'returnedData', bar identify the vartype
(8200) and typename (String()), and number of elements (2 as expected).

As soon as I try something like;

response.write returnedData(1) '(line 58)

I get the error:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

All other attempts to do something useful with the array fail too, e.g.

myString=Join(returnedData)

results in:

Error Type:
Microsoft VBScript runtime (0x800A01CA)
Variable uses an Automation type not supported in VBScript
/bwc/ordercomplete.asp, line 59

I really need to be able to access these array values - and cannot see any
means of doing it. I'd be very grateful for any help,

Regards,
Jon.


Jul 22 '05 #3
Unfortunately I have never done anything with SOAP. I just had a quick look
at the help file and it looks like you can modify the "type mapper". That
may be the approach you need to take.

It also appears that there are ways to get the data back as a list of XML
nodes.

First I would try to get the raw XML back and see what it looks like.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
Thanks for your input Mark.

Response.Write CStr(returnedData(1)) 'line 58

results in....

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

Any more ideas anyone?

"Mark Schupp" wrote:
Have you tried explicitly casting the array element to a string?

Response.Write CStr(returnedData(1))

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
> Hello everyone,
>
> Please help me before I throw my computer out of the window:
>
> I'm working on a web application in classic ASP (vbscript), which is

making
> calls to some webservices. The calls are made using SOAP - i installed

the
> SOAP3 toolkit on my windows 2k server to enable this. The webservice

calls
> are returning String Arrays which I can't seem to do anything useful
> with.
>
> The call shown below returns a string array with two elements (stored
> in
> returnedData):
> ...
>
> dim returnedData
> returnedData=SoapClient3.createCase(param1, param2, param3)
> set SoapClient3=nothing
>
> response.write "<br>"&vartype(returnedData) '8200
> response.write "<br>"&typename(returnedData) 'String()
> response.write "<br>"&ubound(returnedData) '1
> ...
>
> The call to the webservice works just fine, and my data is successfully

sent
> to the other system, however I don't seem to be able to do anything
> with

the
> returned string array stored in 'returnedData', bar identify the
> vartype
> (8200) and typename (String()), and number of elements (2 as expected).
>
> As soon as I try something like;
>
> response.write returnedData(1) '(line 58)
>
> I get the error:
>
> Error Type:
> Microsoft VBScript runtime (0x800A000D)
> Type mismatch
> /bwc/ordercomplete.asp, line 58
>
> All other attempts to do something useful with the array fail too, e.g.
>
> myString=Join(returnedData)
>
> results in:
>
> Error Type:
> Microsoft VBScript runtime (0x800A01CA)
> Variable uses an Automation type not supported in VBScript
> /bwc/ordercomplete.asp, line 59
>
> I really need to be able to access these array values - and cannot see
> any
> means of doing it. I'd be very grateful for any help,
>
> Regards,
> Jon.



Jul 22 '05 #4
Hi Mark,

Thanks again for the reply. I'll look into the type mapper options... In
terms of 'getting the raw xml back' - would something like this do the trick?
dim oDOM
Set oDOM = Server.CreateObject("MSXML2.DOMDocument.4.0")
oDOM.loadXML(SoapClient3.createCase(param1, param2, param3))
response.write(oDOM.XML)

Cheers,
Jon.

"Mark Schupp" wrote:
Unfortunately I have never done anything with SOAP. I just had a quick look
at the help file and it looks like you can modify the "type mapper". That
may be the approach you need to take.

It also appears that there are ways to get the data back as a list of XML
nodes.

First I would try to get the raw XML back and see what it looks like.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
Thanks for your input Mark.

Response.Write CStr(returnedData(1)) 'line 58

results in....

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

Any more ideas anyone?

"Mark Schupp" wrote:
Have you tried explicitly casting the array element to a string?

Response.Write CStr(returnedData(1))

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
> Hello everyone,
>
> Please help me before I throw my computer out of the window:
>
> I'm working on a web application in classic ASP (vbscript), which is
making
> calls to some webservices. The calls are made using SOAP - i installed
the
> SOAP3 toolkit on my windows 2k server to enable this. The webservice
calls
> are returning String Arrays which I can't seem to do anything useful
> with.
>
> The call shown below returns a string array with two elements (stored
> in
> returnedData):
> ...
>
> dim returnedData
> returnedData=SoapClient3.createCase(param1, param2, param3)
> set SoapClient3=nothing
>
> response.write "<br>"&vartype(returnedData) '8200
> response.write "<br>"&typename(returnedData) 'String()
> response.write "<br>"&ubound(returnedData) '1
> ...
>
> The call to the webservice works just fine, and my data is successfully
sent
> to the other system, however I don't seem to be able to do anything
> with
the
> returned string array stored in 'returnedData', bar identify the
> vartype
> (8200) and typename (String()), and number of elements (2 as expected).
>
> As soon as I try something like;
>
> response.write returnedData(1) '(line 58)
>
> I get the error:
>
> Error Type:
> Microsoft VBScript runtime (0x800A000D)
> Type mismatch
> /bwc/ordercomplete.asp, line 58
>
> All other attempts to do something useful with the array fail too, e.g.
>
> myString=Join(returnedData)
>
> results in:
>
> Error Type:
> Microsoft VBScript runtime (0x800A01CA)
> Variable uses an Automation type not supported in VBScript
> /bwc/ordercomplete.asp, line 59
>
> I really need to be able to access these array values - and cannot see
> any
> means of doing it. I'd be very grateful for any help,
>
> Regards,
> Jon.


Jul 22 '05 #5
check the soap toolkit help file. There was something about it returning a
nodelist instead of a specific variant type if there was no type mapper
defined in the configuration files.

--
Mark Schupp

"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Hi Mark,

Thanks again for the reply. I'll look into the type mapper options... In
terms of 'getting the raw xml back' - would something like this do the trick?

dim oDOM
Set oDOM = Server.CreateObject("MSXML2.DOMDocument.4.0")
oDOM.loadXML(SoapClient3.createCase(param1, param2, param3))
response.write(oDOM.XML)

Cheers,
Jon.

"Mark Schupp" wrote:
Unfortunately I have never done anything with SOAP. I just had a quick look at the help file and it looks like you can modify the "type mapper". That may be the approach you need to take.

It also appears that there are ways to get the data back as a list of XML nodes.

First I would try to get the raw XML back and see what it looks like.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
Thanks for your input Mark.

Response.Write CStr(returnedData(1)) 'line 58

results in....

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/bwc/ordercomplete.asp, line 58

Any more ideas anyone?

"Mark Schupp" wrote:

> Have you tried explicitly casting the array element to a string?
>
> Response.Write CStr(returnedData(1))
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "ASPfool" <AS*****@discussions.microsoft.com> wrote in message
> news:28**********************************@microsof t.com...
> > Hello everyone,
> >
> > Please help me before I throw my computer out of the window:
> >
> > I'm working on a web application in classic ASP (vbscript), which is> making
> > calls to some webservices. The calls are made using SOAP - i installed> the
> > SOAP3 toolkit on my windows 2k server to enable this. The webservice> calls
> > are returning String Arrays which I can't seem to do anything useful> > with.
> >
> > The call shown below returns a string array with two elements (stored> > in
> > returnedData):
> > ...
> >
> > dim returnedData
> > returnedData=SoapClient3.createCase(param1, param2, param3)
> > set SoapClient3=nothing
> >
> > response.write "<br>"&vartype(returnedData) '8200
> > response.write "<br>"&typename(returnedData) 'String()
> > response.write "<br>"&ubound(returnedData) '1
> > ...
> >
> > The call to the webservice works just fine, and my data is successfully> sent
> > to the other system, however I don't seem to be able to do anything
> > with
> the
> > returned string array stored in 'returnedData', bar identify the
> > vartype
> > (8200) and typename (String()), and number of elements (2 as expected).> >
> > As soon as I try something like;
> >
> > response.write returnedData(1) '(line 58)
> >
> > I get the error:
> >
> > Error Type:
> > Microsoft VBScript runtime (0x800A000D)
> > Type mismatch
> > /bwc/ordercomplete.asp, line 58
> >
> > All other attempts to do something useful with the array fail too, e.g.> >
> > myString=Join(returnedData)
> >
> > results in:
> >
> > Error Type:
> > Microsoft VBScript runtime (0x800A01CA)
> > Variable uses an Automation type not supported in VBScript
> > /bwc/ordercomplete.asp, line 59
> >
> > I really need to be able to access these array values - and cannot see> > any
> > means of doing it. I'd be very grateful for any help,
> >
> > Regards,
> > Jon.
>
>
>


Jul 22 '05 #6
Thanks Mark. In the end I felt that it was too difficult to sort this within
classic asp, so with some wonderful fudging, I've sent the data to an
intermediary asp.net file, made by web service call, and forwarded the
returned values to my classic asp app. In future, I think i'll write
everything in .net.... I guess its time to abandon the classic asp ship!

Thanks again for all your input,
regards,
Jon.

"Mark Schupp" wrote:
check the soap toolkit help file. There was something about it returning a
nodelist instead of a specific variant type if there was no type mapper
defined in the configuration files.

--
Mark Schupp

"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Hi Mark,

Thanks again for the reply. I'll look into the type mapper options... In
terms of 'getting the raw xml back' - would something like this do the

trick?


dim oDOM
Set oDOM = Server.CreateObject("MSXML2.DOMDocument.4.0")
oDOM.loadXML(SoapClient3.createCase(param1, param2, param3))
response.write(oDOM.XML)

Cheers,
Jon.

"Mark Schupp" wrote:
Unfortunately I have never done anything with SOAP. I just had a quick look at the help file and it looks like you can modify the "type mapper". That may be the approach you need to take.

It also appears that there are ways to get the data back as a list of XML nodes.

First I would try to get the raw XML back and see what it looks like.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"ASPfool" <AS*****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
> Thanks for your input Mark.
>
> Response.Write CStr(returnedData(1)) 'line 58
>
> results in....
>
> Error Type:
> Microsoft VBScript runtime (0x800A000D)
> Type mismatch
> /bwc/ordercomplete.asp, line 58
>
> Any more ideas anyone?
>
> "Mark Schupp" wrote:
>
>> Have you tried explicitly casting the array element to a string?
>>
>> Response.Write CStr(returnedData(1))
>>
>> --
>> Mark Schupp
>> Head of Development
>> Integrity eLearning
>> www.ielearning.com
>>
>>
>> "ASPfool" <AS*****@discussions.microsoft.com> wrote in message
>> news:28**********************************@microsof t.com...
>> > Hello everyone,
>> >
>> > Please help me before I throw my computer out of the window:
>> >
>> > I'm working on a web application in classic ASP (vbscript), which is >> making
>> > calls to some webservices. The calls are made using SOAP - i installed >> the
>> > SOAP3 toolkit on my windows 2k server to enable this. The webservice >> calls
>> > are returning String Arrays which I can't seem to do anything useful >> > with.
>> >
>> > The call shown below returns a string array with two elements (stored >> > in
>> > returnedData):
>> > ...
>> >
>> > dim returnedData
>> > returnedData=SoapClient3.createCase(param1, param2, param3)
>> > set SoapClient3=nothing
>> >
>> > response.write "<br>"&vartype(returnedData) '8200
>> > response.write "<br>"&typename(returnedData) 'String()
>> > response.write "<br>"&ubound(returnedData) '1
>> > ...
>> >
>> > The call to the webservice works just fine, and my data is successfully >> sent
>> > to the other system, however I don't seem to be able to do anything
>> > with
>> the
>> > returned string array stored in 'returnedData', bar identify the
>> > vartype
>> > (8200) and typename (String()), and number of elements (2 as expected). >> >
>> > As soon as I try something like;
>> >
>> > response.write returnedData(1) '(line 58)
>> >
>> > I get the error:
>> >
>> > Error Type:
>> > Microsoft VBScript runtime (0x800A000D)
>> > Type mismatch
>> > /bwc/ordercomplete.asp, line 58
>> >
>> > All other attempts to do something useful with the array fail too, e.g. >> >
>> > myString=Join(returnedData)
>> >
>> > results in:
>> >
>> > Error Type:
>> > Microsoft VBScript runtime (0x800A01CA)
>> > Variable uses an Automation type not supported in VBScript
>> > /bwc/ordercomplete.asp, line 59
>> >
>> > I really need to be able to access these array values - and cannot see >> > any
>> > means of doing it. I'd be very grateful for any help,
>> >
>> > Regards,
>> > Jon.
>>
>>
>>


Jul 22 '05 #7

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

Similar topics

36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
1
by: Dummy | last post by:
Hi, From the following web site http://docs.sun.com/source/816-6410-10/request.htm I have found how to access the elements of an HTML form from server-side Javascript. Using the "request"...
3
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set...
1
by: Bob | last post by:
Unlike VBScript, the arrays in Javascript are objects that have methods and properties. The following example defines an array in Javascript. How can I achieve the same in VBScript? Can someone...
5
by: Kent.Gallinger | last post by:
I have a web application that contains asp.net and classic asp pages. I have a vb.net function that I would like to use in one of the classic asp pages. How can I do this? Can I do this? ...
5
by: joshbeall | last post by:
Hi All, I'm wondering if there is any way to access .NET assemblies from classic ASP/VBScript? We have a legacy app that was written using classic ASP and VBScript, and there's a new facility...
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
12
by: divya | last post by:
1. If The size of the array is unknown during programming time then how is such array declared?? Suppose there is an Array named arrClashname(size unknown at start), Now when the clash occurs...
3
by: sjsean | last post by:
All thanks in advance for reading my post. I am new to using js and more accustomed to vbscript. I had written code which created a shopping cart into an array using vbscript and then...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

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.