473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

XMLDocument Object to web service

I have a client that is requiring my web service to accept XMLDocument object as input parameter. I had created it initially to accept byte string and it worked fine. However, when changing to a XMLDocument object I am getting conversion errors when testing. It is telling me client program cannot convert xmldocument to xmlelement. It works fine from and to forms app, but the web service is casting it somehow. I have searched for hours on this topic and see a lot of the same problem but no solution in vb, I have seen some in C#

Here's the web service code: I am just trying to accept the xmldocument parameter and save it to a file, then I can load and process.
Expand|Select|Wrap|Line Numbers
  1.     <WebMethod()> _
  2. Public Function InsertPatientInfo(ByVal Password As String, ByVal f As XmlDocument) As Integer
  3.  
  4. Try
  5.                 Dim strTemp As String = System.Web.Hosting.HostingEnvironment.MapPath("~/Schedules/") & "FileX.XML"
  6.                 Dim ms As New MemoryStream(f.OuterXml)
  7.                 Dim fs As New FileStream(strTemp, FileMode.Create)
  8.                 ms.WriteTo(fs)
  9.                 ms.Close()
  10.                 fs.Close()
  11.                 fs.Dispose()
  12.  
  13.                 f.Save(strTemp)
  14.                 strMessage = ProcessXML(strTemp)
  15.  
  16.              ' Blah blah blah
  17.  
Any help here would be greatly appreciated...

Thanks,
Paul
Jan 28 '09 #1
0 1322

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: John Bailo | last post by:
I wrote a webservice to output a report file. The fields of the report are formatted based on information in an in-memory XmlDocument. As each row of a SqlDataReader are looped through, a...
5
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an...
0
by: JD | last post by:
I'm currently writing a class to manage per-user configuration files, using the same format as the app.config file. This will be used in a Winforms app to manage user options, window positions,...
7
by: SQLScott | last post by:
I have a Web Service in which I am trying to pass an XMLDocument as a parameter to one of the methods. I would like to use the XMLTextReader to read the XML but I am getting the following error: ...
0
by: Pierre | last post by:
Hi, I'm trying to select specific nodes from a XmlDocument filled with a serialized object and to insert these nodes into another XmlDocument. The object is well serialized (see below). From a...
4
by: MattBell | last post by:
I've tried to search for an answer to this without much success, and I think it's probably a common thing to do: I have a web service I want to accept an XmlDocument as an argument which conforms...
1
by: Joe Monnin | last post by:
I have a web service that takes an XmlDocument as a parameter, performs some processing on it, and saves it to a database. The web service signature looks similar to this: public void...
3
by: Carona | last post by:
Hi all, I have a web service with a method that returns a xml document, however, on the client side the result of the call to this method returns a XmlNode. If i look in the Reference.vb or the...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... We've got a lot of places in our code where we read relatively small xml user preference blocks. Currently that's creating a new XmlDocument in every spot. I was thinking we might see...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.