Action: Query

By Kevin M Schreiner

February 02, 2009

 
 

 

Within your script logic, you may need to execute a query against the connection configured for OWS. With the Action: Execute action you may specify the Query to execute, and provide a name for the query to process a return result. Additionally, if you check the box labeled “Run as Process (Name)”, you can spin this query off into its own processing thread. With that setting, all child actions will also execute in the separate thread, allowing you to truly create self reliant applications which do not live with the timeouts that typically occur with other systems.

 

For example, you may want to provide an Editor interface of OWS and a Button which when clicked will Save the record. The interface may define a few form fields, frm1 through frm3 which have been defined within the Query Options. Your query may read: Update MyTable Set Value1 = '[frm1]', Value2 = '[frm2]', Value3 = '[frm4]' Where ID = [ID]

Beyond this functionality, you may need to return a specific value or record to be utilized by an Action:Assignment step. For instance, you may have performed a Query ending with: Select @@IDENTITY MyID. This statement returns a Table to the requesting Table, and can be used through some extended Syntax within the Action:Assignment. Each step that returns a value adds the first returned table into an array. The value of a column of the first record within the resulting table can be identified within the Action:Assignment value as [COLUMNNAME,QueryName] where the QueryName would be whatever is specified as the name, and the column name would be the name of the column within that first row. For the provided example: [MyID,Update]

At any point, you may determine the overall success or failure of the statement executed by checking the Action parameter of the same name. Meaning. If you execute an action named UPDATE, you can determine its success or failure by checking:

Result


[UPDATE.isSuccessful,Action] - This will yield a True or False.

[UPDATE.Error,Action] – If an error occurred, the physical error message reported from the Database is provided.

[UPDATE.Tables,Action] - Returns the total number of tables contained within the result.

[UPDATE.Tables.0.Rows,Action] - Returns the total number of rows in the table index 0. This can be repeated for all Tables in the result set.

[UPDATE.Rows,Action] - Returns the total number of rows across all tables in the result.

In the provided Picture, the execute statement does not return a result – but it does perform an update on the table based on two parameters defined as query variables.

If your Execute action contains child actions, they will be executed once for each record in the query result, like a for-each loop. In this case, the row index that is pulled from [MyID,Update] would be polled from the MyID column first at row 1 then row 2 and so on and so forth within your module.

Connection


If your execute query needs to be pulled from a database connection other than the standard Dotnetnuke connection provided for your instance, you can specify the ODBC connection string to use for the connection by adding a connection string. For example:

Connection = Provider=sqloledb;Data Source=MyOtherDatabase;Initial Catalog=pubs;Integrated Security=SSPI;

A complete breakdown of connection string is provided in the appendix titled: Connection Strings

Other Query Types


While TSQL is the default type of query supported by OWS, it is important to note that a growing number of other supported data sources are available. These are XML,JSON and Directory.
Each of the provided Query Type are handled by simply providing the XML structure for the given source. Each will begin with the Source type as a node root (<XML>...</XML> etc.)

XML

The XML data source provides the ability to select data resulting from a server side request for information, returned in XML format.

Consider the following Salesforce.com integration. First, we are hitting a web service that returns the user information. This user information then needs to be mapped, via our XML reader into data that is supported within OWS. Essentially, the developer is identifying the portions of the incoming XML that make up the ROWS and COLUMNS utilizing XPATH logic.

XML Request Definition

XML Queryies utilize the following structure, which is modified to target specific source requirements.

<XML>

  
<PATH></PATH>

   <VALUE>
      <CONTENTTYPE></CONTENTTYPE>
      <NAME></NAME>
   </VALUE>

   <POST>
      <CONTENTTYPE></CONTENTTYPE>
      <QUERY></QUERY>
      <BODY></BODY>
   </POST>

   <GET>
      <CONTENTTYPE></CONTENTTYPE>
      <QUERY></QUERY>
      <BODY></BODY>
   </GET>

   <SOAP>
      <CONTENTTYPE></CONTENTTYPE>
      <ACTION></ACTION>
      <BODY></BODY>
   </SOAP>

   <AUTHENTICATION>
      <TYPE></TYPE>
      <USERNAME></USERNAME>
      <PASSWORD></PASSWORD>
      <DOMAIN></DOMAIN>
   </AUTHENTICATION>

   <TRANSFORM>
      <SOURCE></SOURCE>
      <TARGET></TARGET>
      <DECODE></DECODE>
   </TRANSFORM>

   <ROWS></ROWS>
   <NAMESPACES>
      <NAMESPACE>
          <PREFIX></PREFIX>
          <URI></URI>
      </NAMESPACE>
   </NAMESPACE>
   <COLUMNS>
      <COLUMN>
          <NAME></NAME>
          <XPATH></XPATH>
      </COLUMN>
      <COLUMN>
          <NAME></NAME>
          <XPATH></XPATH>
      </COLUMN>
      <COLUMN>
          <NAME></NAME>
          <XPATH></XPATH>
      </COLUMN>
   </COLUMNS>
</XML>

Only one of the the request nodes is necessary, the provided capabilities are:

PATH - a direct file path which will be utilized to load the XML Source from a file.
VALUE - a direct load from a variable source like Session, Action or Form.
POST - a HTTP Post request to a specific URL provided within the QUERY node. (PATH is required here as the URL SOURCE)
GET - an HTTP Get request to a specific URL provided within the QUERY node. (PATH is required here as the URL SOURCE)
SOAP - a SOAP request to a specific URL.

 

XML Get - Blip TV Example

A simple example of using an external XML Feed to be displayed within your site can be peformed very easily using the XML Query. For this example the requirement was to connect to the popular Blip.tv API and retrieve the first 10 records. The following snippet dsplays the XML structure which is returned from Blip.

<response>
<current_time>2009-02-02T19:55:25Z</current_time>
<timestamp>1233604525852</timestamp>

<status>OK</status>
<payload>

<asset lang="en">
<id>1735367</id>
<item_type>file</item_type>
	<item_id>1726758</item_id>
<guid>BFC5DD64-F0A9-11DD-9E27-F0C6567AFFFC</guid>
<deleted>false</deleted>

<modified>1233524774000</modified>

<title>42- Meanwhile, Back in Rome</title>
<links>
		<link rel="alternate" type="text/html" href="http://blip.tv/file/1726758" />
<link rel="alternate" type="text/xml" href="http://blip.tv/file/1726758/?skin=api" />
<link rel="service.edit" type="text/html" href="http://blip.tv/file/post/1726758/" />
<link rel="alternate" type="application/rss+xml" href="http://blip.tv/rss/1735367" />
<link rel="alternate" type="application/atom+xml" href="http://blip.tv/file/1726758/?skin=atom" />
<link rel="service.edit" type="text/xml" href="http://blip.tv/file/post/1726758/?skin=api" />
</links>
<timestamp>1233524774000</timestamp>
	<latitude></latitude>
<longitude></longitude>
<explicit>false</explicit>
<license>
<name>Creative Commons Attribution-NonCommercial 3.0</name>
<link type="text/html" href="http://creativecommons.org/licenses/by-nc/3.0/" />
</license>
<createdBy>
		<login>Mike Duncan</login>
<uid>134334</uid>
<links>
<link type="text/html" href="http://blip.tv/users/view/Mike%20Duncan" />
<link type="application/rss+xml" href="http://thehistoryofrome.blip.tv/rss" />
<link type="application/rss+atom" href="http://thehistoryofrome.blip.tv/posts/?skin=atom" />
</links>
</createdBy>
	<description mode="escaped" type="text/html"></description>
<notes mode="escaped" type="text/html"></notes>
<tags>

</tags>
<mediaList>

<media>
<role>Source</role>
<link type="audio/mpeg" href="http://blip.tv/file/get/MikeDuncan-42MeanwhileBackInRome504.mp3" />
			<width>0</width>
<height>0</height>
<duration>1454</duration>
<videocodec></videocodec>
<audiocodec>mp3</audiocodec>
<bitrate></bitrate>
<audiobitrate>64</audiobitrate>
			<videobitrate>0</videobitrate>
<size>11632557</size>
</media>

</mediaList>


<darkMeta><![CDATA[

]]>
</darkMeta>
<embedLookup>Aen2K4iaIg</embedLookup>
<embedUrl type="audio/mpeg">http://blip.tv/file/get/MikeDuncan-42MeanwhileBackInRome504.mp3</embedUrl>
	<embedCode>&lt;embed src=&quot;http://blip.tv/play/Aen2K4iaIg&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;320&quot; height=&quot;270&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;</embedCode>
</asset>

</payload>
</response>



The following XML Query was defined to fetch the data, and populate the result into a standard table structure. The sample below uses some standard XPath logic to determine whether the Source or Web content is handled for each node within the child MediaList nodes.

<XML>
   <PATH>http://blip.tv/posts/</PATH>
   <GET>
      <CONTENTTYPE>text/xml; charset=utf-8</CONTENTTYPE>
      <QUERY>skin=api&pagelen=10</QUERY>
   </GET>
    <NAMESPACES>
        <NAMESPACE>
            <URI>http://www.w3.org/2001/XMLSchema-instance</URI>
            <PREFIX>def</PREFIX>
        </NAMESPACE>
    </NAMESPACES>
    <TRANSFORM>
        <SOURCE>payload</SOURCE>
    </TRANSFORM>
    <ROWS>/root/asset</ROWS>
    <COLUMNS>
        <COLUMN>
            <NAME>id</NAME>
            <XPATH>id</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>title</NAME>
            <XPATH>title</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>media1</NAME>
            <XPATH>mediaList/media[1]/role</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>media1url</NAME>
            <XPATH>mediaList/media[1]/link/@href</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>WebUrl</NAME>
            <XPATH>mediaList/media[role = 'web']/link/@href</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>WebWidth</NAME>
            <XPATH>mediaList/media[role = 'web']/width</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>WebHeight</NAME>
            <XPATH>mediaList/media[role = 'web']/height</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>WebDuration</NAME>
            <XPATH>mediaList/media[role = 'web']/duration</XPATH>
        </COLUMN>

    <COLUMN>
        <NAME>SourceUrl</NAME>
        <XPATH>mediaList/media[role = 'Source']/link/@href</XPATH>
    </COLUMN>
        <COLUMN>
            <NAME>SourceWidth</NAME>
            <XPATH>mediaList/media[role = 'Source']/width</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>SourceHeight</NAME>
            <XPATH>mediaList/media[role = 'Source']/height</XPATH>
        </COLUMN>
        <COLUMN>
            <NAME>SourceDuration</NAME>
            <XPATH>mediaList/media[role = 'Source']/duration</XPATH>
        </COLUMN>
    <COLUMNS>
        <NAME>EmbedCode</NAME>
        <XPATH>embedCode</XPATH>
    </COLUMNS>
   </COLUMNS>
</XML>

The content is then readily displayed using the following syntax:

<ol>
    <li>ID:[id]</li>
    <li>Title:[Title]</li>
    <li>SourceUrl:[SourceUrl]
        <ul>
            <li>width: [SourceWidth]</li>
            <li>height: [SourceHeight]</li>
            <li>duration: [SourceDuration]</li>
        </ul>
    </li>
    <li>WebUrl:[WebUrl]
        <ul>
            <li>width: [WebWidth]</li>
            <li>height: [WebHeight]</li>
            <li>duration: [WebDuration]</li>
        </ul>
    </li>
    <li>[embedCode]</li>
</ol>

The Salesforce request is a simple SOAP request. The WSDL for Salesforce identifies that our request will need to operate like the following.

URL Path: https://www.salesforce.com/services/Soap/c/10.0
Soap Body:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com">
<soapenv:Body>
<urn:login>
<urn:username>example@openwebstudio.com</urn:username>
<urn:password>*************************</urn:password>
</urn:login>
</soapenv:Body>
</soapenv:Envelope>

 


XML Result Structure

The data returned from the web service provided in the Definition would look similar to the following:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<loginResponse>
<result>
<metadataServerUrl>https://na2-api.salesforce.com/services/Soap/m/10.0/</metadataServerUrl>
<passwordExpired>false</passwordExpired>
<serverUrl>https://na2-api.salesforce.com/services/Soap/c/10.0/</serverUrl>
<sessionId>5555555500000009HtW!ARYAQG8IcaGWkpAuscrvkbV84HW4EWWJeDbgsvPmv4IEYUC2yTsKRQd0SRUg555555555555555555555555555555555555</sessionId>
<userId>555555555511ZIk555</userId>
<userInfo>
<accessibilityMode>false</accessibilityMode>
<currencySymbol>$</currencySymbol>
<organizationId>555555555559HtW555</organizationId>
<organizationMultiCurrency>false</organizationMultiCurrency>
<organizationName>example.openwebstudio.com</organizationName>
<profileId>55555555555oGKM555</profileId>
<roleId>55555555555jq5r555</roleId>
<userDefaultCurrencyIsoCode xsi:nil="true"/>
<userEmail>example@openwebstudio.com</userEmail>
<userFullName>Paul Example</userFullName>
<userId>555555555511ZIk555</userId>
<userLanguage>en_US</userLanguage>
<userLocale>en_US</userLocale>
<userName>example@openwebstudio.com</userName>
<userTimeZone>America/Chicago</userTimeZone>
<userType>Standard</userType>
<userUiSkin>Theme2</userUiSkin>
</userInfo>
</result>
</loginResponse>
</soapenv:Body>
</soapenv:Envelope>

XML Query from Local value

Provided below is the example of using a soap request. Notice the structure here, a standard SOAP envolope and result. With OWS, we will need to first to unpack the result, then digest its values.

<XML>
<SOAP>
<ACTION>""</ACTION>
<CONTENTTYPE>text/xml; charset=utf-8</CONTENTTYPE>
<BODY>
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com">
<soapenv:Body>
<urn:login>
<urn:username>dev@ceforce.com</urn:username>
<urn:password>ceforce01JDgaiKx4ps3J07CZq5Wtq3TV</urn:password>
</urn:login>
</soapenv:Body>
</soapenv:Envelope>
</BODY>
</SOAP>
<TRANSFORM>
<SOURCE>loginResponse</SOURCE>
</TRANSFORM>
<NAMESPACES>
<NAMESPACE>
<URI>urn:partner.soap.sforce.com</URI>
<PREFIX>def</PREFIX>
</NAMESPACE>
<NAMESPACE>
<URI>http://www.w3.org/2001/XMLSchema-instance</URI>
<PREFIX>xsi</PREFIX>
</NAMESPACE>
</NAMESPACES>
<ROWS>/root/result</ROWS>
<COLUMNS>
<COLUMN>
<NAME>metadataServerUrl</NAME>
<XPATH>metadataServerUrl</XPATH>
</COLUMN>
<COLUMN>
<NAME>passwordExpired</NAME>
<XPATH>passwordExpired</XPATH>
</COLUMN>
<COLUMN>
<NAME>serverUrl</NAME>
<XPATH>serverUrl</XPATH>
</COLUMN>
<COLUMN>
<NAME>sessionId</NAME>
<XPATH>sessionId</XPATH>
</COLUMN>
<COLUMN>
<NAME>userId</NAME>
<XPATH>userId</XPATH>
</COLUMN>
<COLUMN>
<NAME>accessibilityMode</NAME>
<XPATH>userInfo/accessibilityMode</XPATH>
</COLUMN>
<COLUMN>
<NAME>currencySymbol</NAME>
<XPATH>userInfo/currencySymbol</XPATH>
</COLUMN>
<COLUMN>
<NAME>organizationId</NAME>
<XPATH>userInfo/organizationId</XPATH>
</COLUMN>
<COLUMN>
<NAME>organizationMultiCurrency</NAME>
<XPATH>userInfo/organizationMultiCurrency</XPATH>
</COLUMN>
<COLUMN>
<NAME>organizationName</NAME>
<XPATH>userInfo/organizationName</XPATH>
</COLUMN>
<COLUMN>
<NAME>profileId</NAME>
<XPATH>userInfo/profileId</XPATH>
</COLUMN>
<COLUMN>
<NAME>roleId</NAME>
<XPATH>userInfo/roleId</XPATH>
</COLUMN>
<COLUMN>
<NAME>userDefaultCurrencyIsoCode</NAME>
<XPATH>userInfo/userDefaultCurrencyIsoCode/@xsi:nil</XPATH>
</COLUMN>
<COLUMN>
<NAME>userEmail</NAME>
<XPATH>userInfo/userEmail</XPATH>
</COLUMN>
<COLUMN>
<NAME>userFullName</NAME>
<XPATH>userInfo/userFullName</XPATH>
</COLUMN>
<COLUMN>
<NAME>userLanguage</NAME>
<XPATH>userInfo/userLanguage</XPATH>
</COLUMN>
<COLUMN>
<NAME>userLocale</NAME>
<XPATH>userInfo/userLocale</XPATH>
</COLUMN>
<COLUMN>
<NAME>userName</NAME>
<XPATH>userInfo/userName</XPATH>
</COLUMN>
<COLUMN>
<NAME>userType</NAME>
<XPATH>userInfo/userType</XPATH>
</COLUMN>
<COLUMN>
<NAME>userUiSkin</NAME>
<XPATH>userInfo/userUiSkin</XPATH>
</COLUMN>
</COLUMNS>
</XML>

 

 

 


XML Query from URL

Provided below is the example of using a soap request. Notice the structure here, a standard SOAP envolope and result. With OWS, we will need to first to unpack the result, then digest its values.

<XML>
<PATH>https://www.salesforce.com/services/Soap/c/10.0</PATH>
<SOAP>
<ACTION>""</ACTION>
<CONTENTTYPE>text/xml; charset=utf-8</CONTENTTYPE>
<BODY>
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com">
<soapenv:Body>
<urn:login>
<urn:username>dev@ceforce.com</urn:username>
<urn:password>ceforce01JDgaiKx4ps3J07CZq5Wtq3TV</urn:password>
</urn:login>
</soapenv:Body>
</soapenv:Envelope>
</BODY>
</SOAP>
<TRANSFORM>
<SOURCE>loginResponse</SOURCE>
</TRANSFORM>
<NAMESPACES>
<NAMESPACE>
<URI>urn:partner.soap.sforce.com</URI>
<PREFIX>def</PREFIX>
</NAMESPACE>
<NAMESPACE>
<URI>http://www.w3.org/2001/XMLSchema-instance</URI>
<PREFIX>xsi</PREFIX>
</NAMESPACE>
</NAMESPACES>
<ROWS>/root/result</ROWS>
<COLUMNS>
<COLUMN>
<NAME>metadataServerUrl</NAME>
<XPATH>metadataServerUrl</XPATH>
</COLUMN>
<COLUMN>
<NAME>passwordExpired</NAME>
<XPATH>passwordExpired</XPATH>
</COLUMN>
<COLUMN>
<NAME>serverUrl</NAME>
<XPATH>serverUrl</XPATH>
</COLUMN>
<COLUMN>
<NAME>sessionId</NAME>
<XPATH>sessionId</XPATH>
</COLUMN>
<COLUMN>
<NAME>userId</NAME>
<XPATH>userId</XPATH>
</COLUMN>
<COLUMN>
<NAME>accessibilityMode</NAME>
<XPATH>userInfo/accessibilityMode</XPATH>
</COLUMN>
<COLUMN>
<NAME>currencySymbol</NAME>
<XPATH>userInfo/currencySymbol</XPATH>
</COLUMN>
<COLUMN>
<NAME>organizationId</NAME>
<XPATH>userInfo/organizationId</XPATH>
</COLUMN>
<COLUMN>
<NAME>organizationMultiCurrency</NAME>
<XPATH>userInfo/organizationMultiCurrency</XPATH>
</COLUMN>
<COLUMN>
<NAME>organizationName</NAME>
<XPATH>userInfo/organizationName</XPATH>
</COLUMN>
<COLUMN>
<NAME>profileId</NAME>
<XPATH>userInfo/profileId</XPATH>
</COLUMN>
<COLUMN>
<NAME>roleId</NAME>
<XPATH>userInfo/roleId</XPATH>
</COLUMN>
<COLUMN>
<NAME>userDefaultCurrencyIsoCode</NAME>
<XPATH>userInfo/userDefaultCurrencyIsoCode/@xsi:nil</XPATH>
</COLUMN>
<COLUMN>
<NAME>userEmail</NAME>
<XPATH>userInfo/userEmail</XPATH>
</COLUMN>
<COLUMN>
<NAME>userFullName</NAME>
<XPATH>userInfo/userFullName</XPATH>
</COLUMN>
<COLUMN>
<NAME>userLanguage</NAME>
<XPATH>userInfo/userLanguage</XPATH>
</COLUMN>
<COLUMN>
<NAME>userLocale</NAME>
<XPATH>userInfo/userLocale</XPATH>
</COLUMN>
<COLUMN>
<NAME>userName</NAME>
<XPATH>userInfo/userName</XPATH>
</COLUMN>
<COLUMN>
<NAME>userType</NAME>
<XPATH>userInfo/userType</XPATH>
</COLUMN>
<COLUMN>
<NAME>userUiSkin</NAME>
<XPATH>userInfo/userUiSkin</XPATH>
</COLUMN>
</COLUMNS>
</XML>

In the previous statement you can see the extended XPATH logic for first Unpacking, then populating a data table with the content. To unpack, you must identify first the TRANSFORM. This means - which Node pair to isolate as the root of the structure, and unpack its contents directly. This example locates "loginResponse", and then unpacks its content as the base XML for our query. Next, the NAMESPACE block is provided to define all namespaces (present in the result soapEnv:Body tag) so that the parsing can properly consume the XML. Once defined, the next step is identification of the node(s) that act as the ROW delimiters within the data. In our sample the "result" tag is the row definition. The definition of the Namespacing requires that the root of the incoming XML block CANNOT contain the xml definition. The Namespaces will redefine a root node (called root) so that the logic we are parsing will look like the following:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:def="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result>
<metadataServerUrl>https://na2-api.salesforce.com/services/Soap/m/10.0/</metadataServerUrl>
<passwordExpired>false</passwordExpired>
<serverUrl>https://na2-api.salesforce.com/services/Soap/c/10.0/</serverUrl>
<sessionId>5555555500000009HtW!ARYAQG8IcaGWkpAuscrvkbV84HW4EWWJeDbgsvPmv4IEYUC2yTsKRQd0SRUg555555555555555555555555555555555555</sessionId>
<userId>555555555511ZIk555</userId>
<userInfo>
<accessibilityMode>false</accessibilityMode>
<currencySymbol>$</currencySymbol>
<organizationId>555555555559HtW555</organizationId>
<organizationMultiCurrency>false</organizationMultiCurrency>
<organizationName>example.openwebstudio.com</organizationName>
<profileId>55555555555oGKM555</profileId>
<roleId>55555555555jq5r555</roleId>
<userDefaultCurrencyIsoCode xsi:nil="true"/>
<userEmail>example@openwebstudio.com</userEmail>
<userFullName>Paul Example</userFullName>
<userId>555555555511ZIk555</userId>
<userLanguage>en_US</userLanguage>
<userLocale>en_US</userLocale>
<userName>example@openwebstudio.com</userName>
<userTimeZone>America/Chicago</userTimeZone>
<userType>Standard</userType>
<userUiSkin>Theme2</userUiSkin>
</userInfo>
</result>
</root>

Now, the ROWS XPATH is "/root/result". Finally, the COLUMN definitions will act on this as if this was the relative root.

 To consume this value within our result, let's assume that we are using a standard Query Template. Add a Detail Template and the following result would be rendered properly:

<ol>
<li>metadataServerUrl=[metadataServerUrl]</li>
<li>passwordExpired=[passwordExpired]</li>
<li>serverUrl=[serverUrl]</li>
<li>sessionId=[sessionId]</li>
<li>userId=[userId]</li>
<li>accessibilityMode=[accessibilityMode]</li>
<li>currencySymbol=[currencySymbol]</li>
<li>organizationId=[organizationId]</li>
<li>organizationMultiCurrency=[organizationMultiCurrency]</li>
<li>organizationName=[organizationName]</li>
<li>profileId=[profileId]</li>
<li>roleId=[roleId]</li>
<li>userDefaultCurrencyIsoCode=[userDefaultCurrencyIsoCode]</li>
<li>userEmail=[userEmail]</li>
<li>userFullName=[userFullName]</li>
<li>userLanguage=[userLanguage]</li>
<li>userLocale=[userLocale]</li>
<li>userName=[userName]</li>
<li>userType=[userType]</li>
<li>userUiSkin=[userUiSkin]</li>
</ol>
Average (5 Ratings):
 
Want to help out?
 
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share