Solved

classic asp / web services

Posted on 2012-03-26
1
485 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error running webpage local computer 7 36
How to fix 'event logs could not be searched' error asp.net? 3 26
Shared Service Environment 2 54
Data Analysis 7 59
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 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