Dim nowt As DateTime = DateTime.Now '現在の時間取得 Dim dtnow As String = nowt.ToString("yyyy-MM-ddTHH:mm:ssZ") Dim key As String Dim base64 As String Dim shasp As SHA1CryptoServiceProvider
'WSSE認証の作成 shasp = New System.Security.Cryptography.SHA1CryptoServiceProvider() 'SHA処理用 Dim md5sp = New MD5CryptoServiceProvider() key = "tekitounisitemiruyon" Dim md5pass As String = BitConverter.ToString(md5sp.ComputeHash(System.Text.Encoding.ASCII.GetBytes(password))).ToLower().Replace("-", "") base64 = System.Convert.ToBase64String(shasp.ComputeHash(System.Text.Encoding.UTF8.GetBytes(md5pass & key & dtnow)))
Dim response As System.Net.HttpWebResponse = Nothing Dim doc As New System.Xml.XmlDocument() 'レスポンスの取得 Try response = CType(webreq.GetResponse(), System.Net.HttpWebResponse) Dim strm As System.IO.Stream = response.GetResponseStream()
'XmlDocumant に読み込む doc.Load(strm) Catch ex As Exception Return "エラー:" & ex.Message Exit Function