yassar060
08-16-2016, 03:11 AM
Hi,I am trying to insert some values to db2 from excel vba macro using soap webservices.this is working fine in websphere server without any issues.but when we migrated that same code to weblogic ,it is not working.getting a blank response.i am using ms office 2013.Please find below for vba code and wsdl details.Please help me to find out why its behaving like that.
Function SendSOAPRequest(strSoapData, action)
On Error Resume Next
Dim response
'Const SoapServer = "dg010538:8127"
'Const SoapServer = "localhost:7001"
Const SoapServer = "sliudv64:8197"
Const SoapNamespace = "auditservice.aucc.app"
Const SoapPath = "/aucc/services/AuditService"
Dim soapAction
Dim xmlhttp
Dim xmlSoap
Dim errorString
Dim dataSheet
soapAction = action
errorString = ""
If Sheets.Item("Config").Range("B11") <> "" Then
dataSheet = 1
Else
dataSheet = Sheets.Item("Config").Range("B11")
End If
Set xmlhttp = CreateObject("Msxml2.ServerXMLHTTP.3.0")
xmlhttp.setOption(2) = 13056
' Build custom HTTP header:
xmlhttp.Open "POST", SoapServer & SoapPath, False
xmlhttp.Open "POST", "https://" & SoapServer & SoapPath, False
xmlhttp.setRequestHeader "Man", "POST " & SoapPath & " HTTP/1.1"
xmlhttp.setRequestHeader "Host", SoapServer
xmlhttp.setRequestHeader "SOAPAction", SoapNamespace & soapAction
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'xmlhttp.setOption(2) = xmlhttp.getOption(2) - SXH_SERVER_CERT_IGNORE_UNKNOWN_CA - 4096
'certName = .getOption(3)
'xmlhttp.setRequestHeader "If-Modified-Since", Now
' Send it using the header generated above: <br />
xmlhttp.Send (strSoapData)
MsgBox xmlhttp.Status
If xmlhttp.responseXML.Text = "<result>cancelledAudit</result>" Then
MsgBox ("This audit has been closed. Please contact your administrator")
End
End If
If xmlhttp.responseXML.Text = "<result>success</result>" Then
MsgBox ("Submit To DB Successfull1!")
Exit Function
End If
End Function
Function SendSOAPRequest(strSoapData, action)
On Error Resume Next
Dim response
'Const SoapServer = "dg010538:8127"
'Const SoapServer = "localhost:7001"
Const SoapServer = "sliudv64:8197"
Const SoapNamespace = "auditservice.aucc.app"
Const SoapPath = "/aucc/services/AuditService"
Dim soapAction
Dim xmlhttp
Dim xmlSoap
Dim errorString
Dim dataSheet
soapAction = action
errorString = ""
If Sheets.Item("Config").Range("B11") <> "" Then
dataSheet = 1
Else
dataSheet = Sheets.Item("Config").Range("B11")
End If
Set xmlhttp = CreateObject("Msxml2.ServerXMLHTTP.3.0")
xmlhttp.setOption(2) = 13056
' Build custom HTTP header:
xmlhttp.Open "POST", SoapServer & SoapPath, False
xmlhttp.Open "POST", "https://" & SoapServer & SoapPath, False
xmlhttp.setRequestHeader "Man", "POST " & SoapPath & " HTTP/1.1"
xmlhttp.setRequestHeader "Host", SoapServer
xmlhttp.setRequestHeader "SOAPAction", SoapNamespace & soapAction
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'xmlhttp.setOption(2) = xmlhttp.getOption(2) - SXH_SERVER_CERT_IGNORE_UNKNOWN_CA - 4096
'certName = .getOption(3)
'xmlhttp.setRequestHeader "If-Modified-Since", Now
' Send it using the header generated above: <br />
xmlhttp.Send (strSoapData)
MsgBox xmlhttp.Status
If xmlhttp.responseXML.Text = "<result>cancelledAudit</result>" Then
MsgBox ("This audit has been closed. Please contact your administrator")
End
End If
If xmlhttp.responseXML.Text = "<result>success</result>" Then
MsgBox ("Submit To DB Successfull1!")
Exit Function
End If
End Function