Solved

classic asp/asp.net web services

Posted on 2012-03-27
2
362 Views
Last Modified: 2012-03-30
I create a classic asp bridge to call the webservices. The webservices url is working properly. I have the following code, and how can i call to get the result from "SendEncryption"?



Private function EncryptionRequestString()
            Dim p
            p = "<?xml version=""1.0"" encoding=""utf-8""?>"
                p = p & "<s:Envelope xmlns:s=""http://www.w3.org/2003/05/soap-envelope"" xmlns:a=""http://www.w3.org/2005/08/addressing"">"
            p = p & "  <s:Header>"
            p = p & "   <a:Action s:mustUnderstand=""1"">" & m_soapActionEncryption & "</a:Action>"
            p = p & "   <a:To s:mustUnderstand=""1"">" & m_serviceUrl & "</a:To>"        
            p = p & "  </s:Header>"
                p = p & "  <s:Body>"
            p = p & "    <RequestEncryption xmlns=""" & m_xmlns & """>"
            p = p & "       <plainText>" & m_WsOnlineEncryptionAndDecryption.StringText & "</plainText>"        
            p = p & "       <accessCode>" & m_accessCode & "</accessCode>"
            p = p & "    </RequestEncryption>"
                p = p & "  </s:Body>"
                p = p & "</s:Envelope>"
                EncryptionRequestString = p      
End Function

Public function SendEncryption()
            Dim objRequest, objXMLDoc
            Dim strRet, strRequest
        On Error Resume Next
        strRequest = EncryptionRequestString()
            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  
            objRequest.send strRequest
            strRet = ErrHandlerXMLHTTPRequest(objRequest, strRequest)
        set objRequest = nothing
        SendEncryption =  strRet
End function
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
2 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37776829
...
          strRet = ErrHandlerXMLHTTPRequest(objRequest, strRequest)
        set objRequest = nothing
        SendEncryption =  strRet
        Return SendEncryption
End function
0
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 500 total points
ID: 37776877
do you mean

Call SendEncryption()

or


call SendEncryption

or

Response.Write "<BR>Result is: " & _
SendEncryption()
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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/…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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