09-03-2011 12:21 AM
Hi,
I want to read the contents of XML file, so i want to use Transformation. I require your help in getting that.
XML File contents
- <SOAP_FAULT>
- <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
- <s:Header>
<a:Action s:mustUnderstand="1">http://www.aaaa/bbbb/ccccc/ServiceUnavailableFault</a:Action>
<a:RelatesTo>urn:uuid:18a90558-58e4-1ee0-b5b6-4406eadff48f</a:RelatesTo>
-
- <u:Timestamp u:Id="_0">
<u:Created>2011-09-02T22:23:11.917Z</u:Created>
<u:Expires>2011-09-02T22:28:11.917Z</u:Expires>
</u:Timestamp>
</s:Header>
- <s:Body>
- <s:Fault>
- <s:Code>
<s:Value>s:Sender</s:Value>
</s:Code>
- <s:Reason>
<s:Text xml:lang="en-US">No recipients found</s:Text>
</s:Reason>
+ <s:Detail>
- <ServiceUnavailableFault xmlns="http://www.aaabbbccc.com/AONI/2/0/messages/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RequestId>18a90558-58e4-1ee0-acc4-b45d6629582d</RequestId>
</ServiceUnavailableFault>
</s:Detail>
</s:Fault>
</s:Body>
</s:Envelope>
</SOAP_FAULT>
Here i want to read the tag <Reason> which is currenlyt displaying as "No recipients found".
could you please help me in getting this..?
Thaks,
Raghu
09-03-2011 10:04 PM
Hi,
if you just need to extract one element (?), you could use iXML : interface if_ixml_document contains method find_from_path_ns , to which you may pass the path to your element (and pass the namespace prefix too), which is :
/SOAP_FAULT/s:Envelope/s:Body/s:Fault/s:Reason
Sandra
12-13-2011 1:42 AM