Loading ...
Sorry, an error occurred while loading the content.

What's wrong with this code?

Expand Messages
  • Andre Berkowitz
    Here is the code for my webservice: Imports System Imports System.Web.Services Imports System.Xml
    Message 1 of 1 , Jun 29, 2001
    • 0 Attachment
      Here is the code for my webservice:
      <%@ WebService Language="VB" Class="MyService" %>

      Imports System
      Imports System.Web.Services
      Imports System.Xml

      <WebService(Namespace:="MyService")> Public Class MyService :Inherits
      WebService

          <WebMethod()> _
          Public Function _
           GetNews() As System.Xml.XmlNode
              Dim myXML As New XmlDocument()
              Dim reader As New XmlTextReader(Server.MapPath(".\") &
      "mynewsfile.xml")

              reader.MoveToContent()
              Dim myNode As XmlNode = myXML.ReadNode(reader)

              GetNews = myNode
          End Function

      End Class

      and this is my SOAP::Lite client:

        use SOAP::Lite;
        print SOAP::Lite
          -> uri('MyService')
          -> proxy('http://localhost/myservice.asmx')
          -> GetNews()
          -> result;

      and the client file doesn't do anything.
      What am I doing wrong?

    Your message has been successfully submitted and would be delivered to recipients shortly.