Question

I have read a lot of questions and answers concerning this, but my problem seems to be of different case. I have a WCF service that transports a small amount of xml data, please see: http://msi-ecs.com.ph:8090/uom/UOMws.svc/xml/codes. I also have an app intending for Windows Mobile 5.0 that is supposed to read the xml data from the service.

I had two approaches on doing this. The error fell on the first line when I tried:

    Dim xmlReader As XmlReader = xmlReader.Create("http://msi-ecs.com.ph:8090/uom/UOMws.svc/xml/codes")
    Dim xDoc As XDocument = XDocument.Load(xmlReader)

And on the second line when I tried this:

    Dim request As HttpWebRequest = WebRequest.Create("http://msi-ecs.com.ph:8090/uom/UOMws.svc/xml/codes")
    Using response As HttpWebResponse = request.GetResponse()
        Using responseStream As Stream = response.GetResponseStream()
            Using reader As StreamReader = New StreamReader(responseStream, System.Text.Encoding.UTF8)
                xml = reader.ReadToEnd()
            End Using
        End Using
    End Using

Both lands on the same error so I'm really confused which part of the flow commits the error.

Please help me, I've been on this problem for quite some time now. Thank you so much.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top