Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

classic asp / web services

Posted on 2012-03-26
1
Medium Priority
?
495 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

963 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