Solved

classic asp/asp.net web services

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

634 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