Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Web reference back to XML?

Web reference back to XML?

Scheduled Pinned Locked Moved C#
xmlwcfhelpquestionhtml
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EnkelIk
    wrote on last edited by
    #1

    Hi. In my project I have a web reference to a wsdl-file on a remote server, and I call a method returning an object (UserObj)-or rather a struct actually; it has a number of fields but no methods. What I would want to do is to transform the data returned to HTML using the Xml.Xsl.XslTransform Transform() method and a XSL file I have defined my self. Now my problem is this: how can I transform my UserObj back to XML? It can't be necessary to 'manually' pick out every field and insert it into an XML structure, can it? I mean the communication with the remote server is done with soap and the data returned to my process is in XML when it gets there, right? Or is there a way I can stop the initial translation from XML to the UserObj form from happening? I'm tearing my hair away over this so any help will be gratefully appreciated! Regards /EnkelIk

    J 1 Reply Last reply
    0
    • E EnkelIk

      Hi. In my project I have a web reference to a wsdl-file on a remote server, and I call a method returning an object (UserObj)-or rather a struct actually; it has a number of fields but no methods. What I would want to do is to transform the data returned to HTML using the Xml.Xsl.XslTransform Transform() method and a XSL file I have defined my self. Now my problem is this: how can I transform my UserObj back to XML? It can't be necessary to 'manually' pick out every field and insert it into an XML structure, can it? I mean the communication with the remote server is done with soap and the data returned to my process is in XML when it gets there, right? Or is there a way I can stop the initial translation from XML to the UserObj form from happening? I'm tearing my hair away over this so any help will be gratefully appreciated! Regards /EnkelIk

      J Offline
      J Offline
      J Liss
      wrote on last edited by
      #2

      Move the UserObj to a dataset, then with the dataset do a xmlwrite

      E 1 Reply Last reply
      0
      • J J Liss

        Move the UserObj to a dataset, then with the dataset do a xmlwrite

        E Offline
        E Offline
        EnkelIk
        wrote on last edited by
        #3

        Thanks, that works, but is it possible to do it without knowing anything about the field names in the UserObj? I.e. can I isolate my code from any changes in the wsdl-file regarding the field names of UserObj? I have tried to extract the fields as an enumerator, but since the object does not inherit from Systems.Collections it hasn't worked out for me. Thanks /EnkelIk

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups