WEb Services Error

A

ankitdave

Hi Guyz..

I am working on the creating a web service and I have a code like


Public function test (byval query as string) as string

query.loadxml (queryxml)





-------------

I am getting error like


System.IO.FileNotFoundException: Could not find file
'C:\Shared_folder\Test\query'.
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role,
Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack
compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at ResearchPane.QueryProcessor.Query(String queryXml) in
C:\Shared_folder\TEST\App_Code\Query.asmx.vb:line 78



I also tried the load method in place of the loadxml .. can anyone
suggest some solution..

Thanks,
Dave
 
T

The One

I would like 2 give the error again . as the previous one is when i
write requestxml.load(query)...

This one is the error when i write requestxml.loadxml(query)

System.Xml.XmlException: Data at the root level is invalid. Line 1,
position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.Throw(String res)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at ResearchPane.QueryProcessor.Query(String queryXml) in
C:\Shared_folder\GS5000RefLib\App_Code\Query.asmx.vb:line 78



Thanks
dave
 
G

Guest

The XmlDocument Load method has several overloads including to a file path
and to a Url, or from a stream.
The LoadXml method expects a string containing the string equivalent of a
complete Xml Document.

Peter
 
T

The One

Hi..,


Can you suggest me the more specific way to implement that. I am a bit
new to the XML .

Basically I am inserting a textbox value from the application into the
XML document.

I tried using both

requestxml.loadxml(query) aswell as
requestxml.load(query)..

but coming errors..


Can anyone suggest me the exact phrase which i need to change..?

thanks ,
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top