ASP.NET VB SOAP Help - Newbie needs help parsing SOAP
I've been searching for help on how to accomplish this with limited success so I hope that someone here can guide me or point me in the right direction.
I apologize in advance if I misuse terms since I'm new to this.
Coding in Text-Pad with VB (Can't get Visual Studio Express to download, but probably won't help in time allotted since I don't know the IDE)
Third party company will be sending me an HTTP POST with SOAP content.
1) Anyone know of a really, really basic tutorial/walk-through on retrieving the XML/SOAP from the POST Body and parsing it? MSDN has not been friendly to me today.
2) Is this possible to accomplish without 'code-behind'?
3) Am I even moving in the right direction with the following code?
Thus, I get lost at the Object portion which is why I am a newbie in need of a tutorial that my Friday afternoon, caffeine deprived brain can comprehend.
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Xml.Serialization" %>
Dim pgRequest As System.Net.HttpWebRequest
Dim pgResponse As System.Net.HttpWebResponse
Dim pgURL = Request.Url
'Log File Setup
Dim FILENAME as String = "mylog_" & DateTime.Now.ToString("yyyyMMdd") & ".log"
Dim objFileStream as FileStream
Dim asyncResult As IAsyncResult
Dim writeBuffer As Byte()
Dim logText As String = (DateTime.Now.ToString("yyyyMMdd HHmmss")) & " URL=" & pgURL.ToString
objFileStream = New FileStream(FILENAME,FileMode.Append,FileAccess.Write,Fileshare.ReadWrite,4096,True)
Using objStreamWriter As StreamWriter = New StreamWriter(objFileStream)
writeBuffer = Encoding.ASCII.GetBytes(logText)
asyncResult = objFileStream.BeginWrite(writeBuffer,0,writeBuffer.Length,Nothing,Nothing)
Dim input As Stream = HttpContext.Current.Request.InputStream
Dim reader As StreamReader = New StreamReader(input)
Dim instance As XmlSerializer
Dim returnVal As Object = New Object()
returnVal = instance.Deserialize(input)
Bless anyone who can take pity on me today!