Webboy2008
asked on
classic asp/asp.net web services
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_WsOnlineEncryptionAndDec ryption.St ringText & "</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.Serve rXMLHTTP")
objRequest.open "POST", m_serviceUrl , false
objRequest.setRequestHeade r "Content-Type", m_content_type
objRequest.setRequestHeade r "Content-Length",CStr(Len( strRequest ))
objRequest.setOption 2, 13056
objRequest.send strRequest
strRet = ErrHandlerXMLHTTPRequest(o bjRequest, strRequest)
set objRequest = nothing
SendEncryption = strRet
End function
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_WsOnlineEncryptionAndDec
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.Serve
objRequest.open "POST", m_serviceUrl , false
objRequest.setRequestHeade
objRequest.setRequestHeade
objRequest.setOption 2, 13056
objRequest.send strRequest
strRet = ErrHandlerXMLHTTPRequest(o
set objRequest = nothing
SendEncryption = strRet
End function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
strRet = ErrHandlerXMLHTTPRequest(o
set objRequest = nothing
SendEncryption = strRet
Return SendEncryption
End function