vbnet Call Web Service
Dim ss As New ServiceReference.OrderSoapClient() Dim sb() As ServiceReference.Order sb = ss.GetOrders() If Not sb Is Nothing Then Dim SavePath As String = My.Settings.SavePath Dim OrderFile As String = "123.xml" Dim xmlserial As New Xml.Serialization.XmlSerializer(sb.GetType) SavePath = SavePath & IIf(Right(SavePath, 1) = "\", "", "\") Dim fileStream As New System.IO.StreamWriter(SavePath & OrderFile) xmlserial.Serialize(fileStream, sb) fileStream.Close() fileStream.Dispose() End If
Writes the XML from a Web Service call to file.
Updated: Sunday 10th October 2010, 10:51am
There are 0 comments
Comments are currently closed.