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
  1. Home
  2. Web Development
  3. ASP.NET
  4. WSI Basic Profile 1.1 Compliant Web Service! (circular references)

WSI Basic Profile 1.1 Compliant Web Service! (circular references)

Scheduled Pinned Locked Moved ASP.NET
helpdata-structurestutorialquestion
1 Posts 1 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.
  • M Offline
    M Offline
    Mehdi Mousavi
    wrote on last edited by
    #1

    Hi folks, I've been lately trying to expose an object graph (with circular references) through a web method, however, this was not possible since the XmlSerializer has got no idea how to address the issue. Therefore, I've just changed the WebServiceBindingAttribute from [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] to [WebServiceBinding(ConformsTo = WsiProfiles.None)] and added the SoapDocumentMethodAttribute to the web methods as follows and the problem is solved. [SoapDocumentMethod(Use=SoapBindingUse.Encoded)] The questions: 1. I would like to know this means that I only and only lose the interoperability? Is this what happens??? 2. Is there anyway to solve the circular referencing problem within the object graph when exposing objects through web methods under the WSI Basic Profile 1.1 standard? 3. Consider a class (MyEntity) that has got some properties, say Prop1, Prop2 and Prop3 all of boolean type. On the service side, consider this: MyEntity entity = new MyEntity(); entity.Prop1 = false; entity.Prop2 = false; entity.Prop3 = false; return entity; When the entity is marshaled to the client, the Prop2 is true, while it's being set to false!!!! What the heck is going wrong with this? What happens when the type is serialized/deserialized??? TIA, Mehdi

    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