webservice xsd / xml validator?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi all...

I have a web method that doesvaildation but does not return just the xml
from the invoke method, it retruns both the schema and the xml in the difgram
.. The webmethod I'm using looks like this and wondered if anyone knows just
how to display the xml from the invoke call. Any help would be greatly
appreciated. Thanks.

Imports System
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Xml
Imports System.Xml.Schema
Imports System.Xml.XPath
Imports System.IO
Imports System.Data.DataSet

'TO DO: move namespace to standard
<WebService(Namespace:="http://tempuri.org/";)> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class HostTest
Inherits System.Web.Services.WebService

#Region "webservice consts"

Private reader As XmlReader
Private navigator As XPathNavigator
Private settings As XmlReaderSettings
Private document As XmlDocument
Private xmlDoc As XPathDocument
Private strLine As String
Private objStreamReader As StreamReader
Private components As System.ComponentModel.IContainer
Private doc As XmlDocument = New XmlDocument()
Dim DS As Data.DataSet
Dim DT As DataTable

#End Region

#Region "WebMethod - XML to string"

<WebMethod()> _
Public Function GetRequest(ByVal fldRequest As String, ByVal fldRqstTyp
As String) As Data.DataSet

''convert data to xml
doc.Load("C:\website\My.XML")
Dim ds As DataSet = New DataSet()
Dim buf As Byte() =
System.Text.ASCIIEncoding.ASCII.GetBytes(doc.OuterXml)
Dim ms As System.IO.MemoryStream = New System.IO.MemoryStream(buf)
ds.ReadXml(ms, XmlReadMode.InferSchema)
ms.Close()
ds.WriteXmlSchema("C:\website\MY_XML.xsd")
Return ds

End Function

#End Region

End Class
.



Relevant Pages

  • Re: Function A is not a member of Class 1
    ... Imports Bcbst.IM.FRO.BusinessObjects.UserControl ... Private areaID As Integer = Null.NullInteger ... Public Class CheckVoucherRequest ... Private _EntityPaidID As String = String.Empty ...
    (microsoft.public.dotnet.framework)
  • OutlookAddin Solution
    ... Imports Office = Microsoft.Office.Core ... Private WithEvents _Explorers As Outlook.Explorers ... Private Sub ThisApplication_Startup(ByVal sender As Object, ... Dim subjectEmail As String = "EDC" ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Help with FileSystemWatcherService
    ... >Imports System.ServiceProcess ... > Private objFSWatch As FileSystemWatcher ... > Private strPath As String ... > Protected Overrides Sub OnStartAs String) ...
    (microsoft.public.dotnet.languages.vb)
  • RE: RSA Encryption: Saving keys as files, and size of encrypted data
    ... private static void GenerateKeys(string pubFile, ... // Write the public and private key in files. ... The asymmetric encryption is not suitable for the encryption of large ... key as an xml string. ...
    (microsoft.public.dotnet.security)
  • Re: Send Email in CF
    ... well using sockets and SMTP. ... Imports System.Net.Sockets ... Private _subject As String ...
    (microsoft.public.dotnet.framework.compactframework)