473,473 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

webservice xsd / xml validator?

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.BasicPr ofile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()> _
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.Outer Xml)
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
Nov 12 '05 #1
0 1134

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

195
by: Torbjørn Pettersen | last post by:
As you might have noticed I'm trying to clean up my web site's HTML code. The way I do it is simply more or less redoing to complete site, testing it on a web server I have set up on my local...
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
6
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
1
by: Nalaka | last post by:
Hi, I am testing with Visual studio 2005, web projects. Situation: I have one solution with two web projects, created as file system projects. (I am tesing using the built in server, not IIS)...
3
by: JerryK | last post by:
Hi, I have an ASP.net page, written in VB.net. In that code I want to access a validator web services that is secured via SSL. I have installed the certificate, via a .pfx file, on the system....
40
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
37
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.