Solved

classic asp / web services

Posted on 2012-03-26
1
473 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

10 Experts available now in Live!

Get 1:1 Help Now