Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7976965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:03:25+00:00 2026-06-04T09:03:25+00:00

I have published xml document through web service like this <WebMethod()> _ Public Function

  • 0

I have published xml document through web service like this

<WebMethod()> _
Public Function HelloWorld() As XmlDocument
    Dim xmlDoc As New XmlDocument
    xmlDoc.Load(AppDomain.CurrentDomain.BaseDirectory & "\Product.xml")
    Return xmlDoc
End Function

How do i read this Xml document into xmldocument object from other web service?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:03:27+00:00Added an answer on June 4, 2026 at 9:03 am

    I wouldn’t use the XmlDocument as the return type at all. I would suggest simply returning the XML as a string, for instance:

    <WebMethod()> _
    Public Function HelloWorld() As String
        Return File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory & "\Product.xml")
    End Function
    

    Then, in your client application, you can load the XML string into the XmlDocument object:

    Dim xmlDoc As XmlDocument = New XmlDocument()
    xmlDoc.LoadXml(serviceRef.HelloWorld())
    

    But, if you need to keep the method returning an XmlDocument, keep in mind that it is a complex type, so on the client side, it will be represented as a proxy type, not the actual XmlDocument type. So, you would need to create a new XmlDocument and load it from the xml text from the proxy:

    Dim xmlDoc As XmlDocument = New XmlDocument()
    xmlDoc.LoadXml(serviceRef.HelloWorld().InnerXml)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web service that I have published locally. I wrote an HTML
I have published an app with this AndroidManifest.xml: <supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=false />
We have an MTOM-enabled web service that is published with Grails and the Metro
I have published my web project to local iis but framework can't find the
Let’s start with this statement: We have published couple of free applications on the
This is my first windows application. I have published my project and here are
I have just uploaded my published application files to my web server but I
I have this document where i want to get to the value in x_server_response/retrieve_resources_by_category_response/source_full_info/record/
I have tried to read XML document and i have found a method of
I have published a test app with such manifest <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.