Dans un projet .net, je dois faire appel a une fonction (web service) sur un serveur, je recois comme reponse
'SOAP-ENV:ServerProcedure 'SubmitOrder' not present' et pourtant l'admin du site (en php) affirme que cette fonction existe, j'ai join mon code source (asp.net),
et Merci pour votre aide d'avance.
Dim SoapEnv As String = ""
SoapEnv = "<?xml version=""1.0"" encoding=""utf-8""?>"
SoapEnv += "<soap:Envelope xmlns:xsi = ""http://www.w3.org/2001/XMLSchema-instance"" "
SoapEnv += "xmlns:xsd= ""http://www.w3.org/2001/XMLSchema"" "
SoapEnv += "xmlns:soap= ""http://schemas.xmlsoap.org/soap/envelope/"">"
SoapEnv += "<soap:Body>"
SoapEnv += "<SubmitOrder>"
SoapEnv += "<RequestId>10</RequestId>"
SoapEnv += "<RequestDate>2007/01/24 02:01:01</RequestDate>"
SoapEnv += "<ProductId>1</ ProductId >"
SoapEnv += "</SubmitOrder>"
SoapEnv += "</soap:Body>"
SoapEnv += "</soap:Envelope>"
Dim objXMLHttp As New MSXML2.ServerXMLHTTP
objXMLHttp.open("POST", "http://xxx.siteditant.com/soap/kgate.php", False)
'http://xxx.sitedistant.com/soap/kgate.wsdl
objXMLHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8" )
objXMLHttp.send(SoapEnv.ToString())
objXMLHttp.waitForResponse(500)
Dim outXML As String = objXMLHttp.responseText.ToString
Label1.Text = outXML.ToString() ' Text Envoyé
Label3.Text = SoapEnv.ToString() ' Reponse Reçu
---------------
Happy Coding