<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SOAP framework accessing XML element attributes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400586#M1925106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That just shows you are doing it right. &lt;SPAN __jive_emoticon_name="angry" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/74/images/emoticons/angry.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Dec 2015 07:17:07 GMT</pubDate>
    <dc:creator>GrahamRobbo</dc:creator>
    <dc:date>2015-12-11T07:17:07Z</dc:date>
    <item>
      <title>SOAP framework accessing XML element attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400582#M1925102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked around and spent considerable time in the ABAP debugger without cracking this. Hope someone here can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have generated an ABAP SOAP proxy for consuming a web service. All works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This web service uses a generic method to retrieve data for any entity. To achieve this the response has the data stored in the XML element attributes rather than in the element content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So instead of seeing something like this....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;lt;Object&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;lt;Name&amp;gt;Fred&amp;lt;/Name&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;lt;Address&amp;gt;1 Plane Street&amp;lt;/Address&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;lt;City&amp;gt;Sydney&amp;lt;/City&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/Object&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...I need to handle something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&amp;lt;Object name="Fred" address="1 Plane Street" city="Sydney"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/Object&amp;gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can't figure out how to do this from the generated proxy class. Has anyone come across this before?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 05:55:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400582#M1925102</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2015-12-11T05:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: SOAP framework accessing XML element attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400583#M1925103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the web service can be called and returns the correct data - you just can't access the top-level nodes attributes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is the case you could get them via the PAYLOAD protocol (&lt;SPAN style="color: #333333; font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;IF_WS_PAYLOAD&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;payload_handler = cl_proxy_access=&amp;gt;get_payload_handler(&amp;nbsp; &lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt; proxy_name = 'CO_...'&amp;nbsp; &lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt; proxy_method = 'EXECUTE_SYNCHRONOUS' ).&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;Then use "&lt;SPAN style="color: #333333; font-family: 'Courier New', Courier, monospace; font-size: 12px; background-color: #f6f6f6;"&gt;GET_PAYLOAD_FROM_RESPONSE_DATA()&lt;/SPAN&gt;".&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;* Show payload for test purposes&lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;lo_pointer = lo_payload-&amp;gt;get_xml_pointer( ). &lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;cl_proxy_service=&amp;gt;show_xml_document( lo_pointer-&amp;gt; ).&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;A href="http://help.sap.com/saphelp_nw74/helpdata/en/48/50b1fcb82971b9e10000000a421937/content.htm?frameset=/en/48/50b1fcb82971b9e10000000a421937/frameset.htm&amp;amp;current_toc=/en/21/9eb8492ccc495a8cf9b3c08f8318f2/plain.htm&amp;amp;node_id=165" title="http://help.sap.com/saphelp_nw74/helpdata/en/48/50b1fcb82971b9e10000000a421937/content.htm?frameset=/en/48/50b1fcb82971b9e10000000a421937/frameset.htm&amp;amp;current_toc=/en/21/9eb8492ccc495a8cf9b3c08f8318f2/plain.htm&amp;amp;node_id=165"&gt;Querying the Payload - ABAP Web Services - SAP Library&lt;/A&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph" style="font-style: inherit; font-weight: inherit; font-family: 'Courier New', Courier, monospace;"&gt;??&lt;/SAMP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 06:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400583#M1925103</guid>
      <dc:creator>js2</dc:creator>
      <dc:date>2015-12-11T06:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: SOAP framework accessing XML element attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400584#M1925104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's wrong with this editor - the formatting of my response above is all over the place - sorry about that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 06:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400584#M1925104</guid>
      <dc:creator>js2</dc:creator>
      <dc:date>2015-12-11T06:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: SOAP framework accessing XML element attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400585#M1925105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks mate - that link to the docu really helped. Not sure why I couldn't find that but you have saved my weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 07:16:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400585#M1925105</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2015-12-11T07:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: SOAP framework accessing XML element attributes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400586#M1925106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That just shows you are doing it right. &lt;SPAN __jive_emoticon_name="angry" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/74/images/emoticons/angry.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 07:17:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/soap-framework-accessing-xml-element-attributes/m-p/11400586#M1925106</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2015-12-11T07:17:07Z</dc:date>
    </item>
  </channel>
</rss>

