Solved

classic asp / web services

Posted on 2012-03-26
1
486 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

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 demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

626 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