Hi There.
I've developed a webservice that makes a structured return.
The webservice code is as follows:
The return - when testing in browser - is:
So far everything looks great, right? But when the webservice is called from my code with:
I get this error:
There is an error in XML document (1, 220).
The webservice is placed here: http://www.printwebshop.com/FreeDiskSpace/FreeDiskSpace.asmx
Any help is appriciated!
Bg's
Christoffer
I've developed a webservice that makes a structured return.
The webservice code is as follows:
VB.NET:
Public Class DiskInfo
Public Size As Int64
Public FreeSpace As Int64
End Class 'DiskInfo
<WebMethod()> _
Public Function GetDiskInfo() As DiskInfo
Dim volumeHandling As New GetFreeDiskSpace("C:")
Dim DiskInfo As New DiskInfo()
DiskInfo.Size = volumeHandling.Size
DiskInfo.FreeSpace = volumeHandling.FreeSpace
Return DiskInfo
End Function 'DiskInfo
The return - when testing in browser - is:
VB.NET:
<?xml version="1.0" encoding="utf-8" ?>
[URL="http://www.printwebshop.com/FreeDiskSpace/FreeDiskSpace.asmx/GetDiskInfo#"]-[/URL] <DiskInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<Size>37005500416</Size>
<FreeSpace>3090935808</FreeSpace>
</DiskInfo>
So far everything looks great, right? But when the webservice is called from my code with:
VB.NET:
Dim DiskInfo As New com.printwebshop.www.Service
DiskInfo.Proxy = ProxyCredential()
MessageBox.Show(DiskInfo.GetDiskInfo.FreeSpace.ToString)
I get this error:
There is an error in XML document (1, 220).
The webservice is placed here: http://www.printwebshop.com/FreeDiskSpace/FreeDiskSpace.asmx
Any help is appriciated!
Bg's
Christoffer