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. Web Development
  3. ASP.NET
  4. web services boolean attribute

web services boolean attribute

Scheduled Pinned Locked Moved ASP.NET
wcfhelpquestion
4 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.
  • T Offline
    T Offline
    tiziacaia
    wrote on last edited by
    #1

    I write a web service with a boolean attribute: public class XXX { [XmlAttribute] public bool yyy; ... .... } I dont' understand why the field yyy isn't serialized. If I omit the [XmlAttribute] all works fine but yyy become clearly an element. can somebody help me please? I'm sorry for my english, I hope you can understand.

    M T 2 Replies Last reply
    0
    • T tiziacaia

      I write a web service with a boolean attribute: public class XXX { [XmlAttribute] public bool yyy; ... .... } I dont' understand why the field yyy isn't serialized. If I omit the [XmlAttribute] all works fine but yyy become clearly an element. can somebody help me please? I'm sorry for my english, I hope you can understand.

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, Are you sure that your object is simple like that? Do you use the XXX object as a result of the web method or you simply want to serialize this object in the web service? IMO, the link below might give you a hint: XML and SOAP Serialization[^]

      T 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, Are you sure that your object is simple like that? Do you use the XXX object as a result of the web method or you simply want to serialize this object in the web service? IMO, the link below might give you a hint: XML and SOAP Serialization[^]

        T Offline
        T Offline
        tiziacaia
        wrote on last edited by
        #3

        Thaks a lot for the reply, my object is not simple like that, but I don't think there is somethings that cause the error (I haven't any problems with the rest), my problem is only for boolean attribute. I just want serialize my XXX object in the web application that use the web service (I yet have a referenze in the application). I repeat all works perfectly but if I add the [XmlAttribute] tag to a boolean fields, this don't will be serialized. Thanks

        1 Reply Last reply
        0
        • T tiziacaia

          I write a web service with a boolean attribute: public class XXX { [XmlAttribute] public bool yyy; ... .... } I dont' understand why the field yyy isn't serialized. If I omit the [XmlAttribute] all works fine but yyy become clearly an element. can somebody help me please? I'm sorry for my english, I hope you can understand.

          T Offline
          T Offline
          tiziacaia
          wrote on last edited by
          #4

          I'm sorry but i still have the problem. can somebody help me please?

          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