Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

classic asp/asp.net web services

Posted on 2012-03-27
2
Medium Priority
?
365 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 2000 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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 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