Solved

classic asp/asp.net web services

Posted on 2012-03-27
2
359 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 34

Expert Comment

by:Paul MacDonald
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Loop not working 29 47
Remove greater than sign 3 49
Receiving a string from a WebService Push 21 37
Executing SSIS with a Stored Procedure Permissions 12 26
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

22 Experts available now in Live!

Get 1:1 Help Now