Invio/ricezione xml(da asp a asp.net)

giovedì 16 maggio 2013 - 11.43

robertz Profilo | Newbie

Ciao a tutti...ho la necessità urgentissima di integrare un ws di un cliente nella mia applicazione.
Il ws deve restituirmi un xml contenente le informazioni di profilazione del sito.
Dovrei convertire il codice sottostante che viene da una pagina asp in .net:

<%@ Language=VBScript%>
<%
Response.Expires=-1
Dim objXMLHTTP : SET objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0")
Dim objOutputXMLDoc : Set objOutputXMLDoc = Server.CreateObject("MSXML.DOMDocument")

m_HttpURL = "http://mywebservice.asmx/mymetod1"


'CE_UTENTE = Request.querystring("ut")
UTENTE = Request.ServerVariables("myuser")

CE_UTENTE = Right(UTENTE, Len(UTENTE) - InStr(UTENTE, "\"))

'response.Write CE_UTENTE

objXMLHTTP.open "post", m_HttpURL , False ,"mydomain" ,"mypassword"

'objXMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
form = "ce_cname=" & MYUTENTE & "&ce_categoria=MYCATEGORY&ce_progid=MYPROGID&nu_istituto=MYISTITUTE"
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXMLHTTP.setRequestHeader "Content-Length", Len(form)


objXMLHTTP.send form

response.Write objXMLHTTP.responseText
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5