Click here to Skip to main content
15,881,516 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my soap message.. I need how to retrieve
Quote:
AttributeAssignment
values as array using xdocument in c#

Quote:
XML
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope">
- <SOAP-ENV:Header>
- <Delivery>
  <Src>/AA/BB/CC</Src>
  <Dest>/AA/BB/CC/DD</Dest>
  <Reply />
  </Delivery>
  <MTXMLMsg MsgType="REPLY" />
  </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <Response>
- <Results xmlns="http://xacml.aa.web.com">
- <Result>
  <Decision>Permit</Decision>
- <Status>
  <StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok" />
  </Status>
- <Obligations>
- <Obligation FulfillOn="Deny" ObligationId="PutInCache">
  <AttributeAssignment AttributeId="resource" DataType="http://www.w3.org/2001/XMLSchema#string">Appgrp:App: grp2</AttributeAssignment>
  </Obligation>
- <Obligation FulfillOn="Deny" ObligationId="PutInCache">
  <AttributeAssignment AttributeId="resource" DataType="http://www.w3.org/2001/XMLSchema#string">Appgrp:App: grp1</AttributeAssignment>
  </Obligation>
- <Obligation FulfillOn="Deny" ObligationId="PutInCache">
  <AttributeAssignment AttributeId="resource" DataType="http://www.w3.org/2001/XMLSchema#string">Appgrp:App:grp1: subgrp1</AttributeAssignment><pre><pre lang="text"><pre lang="HTML">

</Obligation>
</Obligations>
</Results>
</Result>
</Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>/blockquote>
Posted

1 solution

I solved this problem by using
C#
System.Xml.Linq

Using an XDocument to load your XML file allows you to navigate the nodes by name using the Descendants method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900