Solved

classic asp / web services

Posted on 2012-03-26
1
475 Views
Last Modified: 2012-03-30
The following codes are in classic asp
How can I call the function?
I tryied SendEncryption("xxx") or OnlineWS.SendEncryption(plainText) but it returns nothing. Let us assume the function is working right.

<%
Class OnlineWS

Public function SendEncryption(plainText)
            Dim objRequest, objXMLDoc
            Dim strRet, strRequest
        On Error Resume Next
        strRequest = EncryptionRequestString(plainText)
            Set objRequest = CreateObject("MSXML2.ServerXMLHTTP")
            objRequest.open "POST", m_serviceUrl , false
            objRequest.setRequestHeader "Content-Type", m_content_type
            objRequest.setRequestHeader "Content-Length",CStr(Len(strRequest))
            objRequest.setOption 2, 13056   '13065 = SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS to ignore certificate error
            objRequest.send strRequest
            strRet = ErrHandlerXMLHTTPRequest(objRequest, strRequest)
        set objRequest = nothing
        SendEncryption =  strRet
End function      

End Class

%>
0
Comment
Question by:Webboy2008
1 Comment
 
LVL 10

Accepted Solution

by:
plummet earned 500 total points
ID: 37770190
Hi,

dim clsEncrypt

set clsEncrypt = new OnlineWS

clsEncrypt.SendEncryption("xxx")

Open in new window


If your class file is to be included you'll need to add a line like this (at the top of the asp file):

<!--#include ="path/to/classfiles/clsEncrypt.asp" -->

Open in new window


I hope that helps

John
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now