Solved

classic asp/asp.net web services

Posted on 2012-03-27
2
356 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
2 Comments
 
LVL 33

Expert Comment

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

15 Experts available now in Live!

Get 1:1 Help Now