开发者

Classic ASP VBScript object to array

I don't normally deal with VBScript and classic ASP but I have to make some changes to one of our old sites.

I use a SOAP Web Service to get an array of string values, but when I try to consume it from within the classic ASP code it tells me it's an object

The service works, it returns an array of strings, the code is sound, I just need to know how to change it from an object to string I think.

The web service WSDL:

<xs:element name="getProductFunctionsResponse">
    <xs:complexType>
        <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>
</xs:element>

Error

Object not a collection

Classic ASP code:

result2 = soap.get开发者_如何学CProductFunctions("AEDO")
i = 0
For Each present In result2
    If mid(user_auth_key,i,1) = 1 Then
        response.write("success")
    End If
    response.write(present)
    response.write("<br />")
    i = i+1
Next


Have you tried using the word SET, since this is returning an object?

SET result2 = soap.getProductFunctions("AEDO")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜