Difference between revisions of "Web Services Example - queryReport"

From SmartWiki
Jump to: navigation, search
m (edit formatting)
Line 2: Line 2:
  
 
This example applies to the following:
 
This example applies to the following:
SmartSimple site: https://smart.smartsimple.com
+
* SmartSimple site: https://smart.smartsimple.com
Web Service User: user@smartsimple.com
+
* Web Service User: user@smartsimple.com
Web Service Password: password
+
* Web Service Password: password
  
Sample #1
+
==Sample #1==
Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
+
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
Action: http://uta.WS.SmartSimple2.com/queryReport
+
* Action: http://uta.WS.SmartSimple2.com/queryReport
ReportID: 12345
+
* ReportID: 12345 (Note: Report 12345 does not prompt for dynamic run-time criteria)
Note: Report 12345 does not prompt for dynamic run-time criteria
 
  
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com">   <soapenv:Header/>   <soapenv:Body>     <uta:queryReport>         <uta:alias>smart</uta:alias>         <uta:username>user@smartsimple.com</uta:username>         <uta:password>password</uta:password>         <uta:reportid>12345</uta:reportid>         <!--Optional:-->         <uta:criteria></uta:criteria>     </uta:queryReport>   </soapenv:Body></soapenv:Envelope>
+
<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:uta="http://uta.WS.SmartSimple2.com">
 +
<soapenv:Header/>
 +
<soapenv:Body>
 +
<uta:queryReport>
 +
<uta:alias>smart</uta:alias>
 +
<uta:username>user@smartsimple.com</uta:username>
 +
<uta:password>password</uta:password>
 +
<uta:reportid>12345</uta:reportid>
 +
<!--Optional:-->
 +
<uta:criteria></uta:criteria>
 +
</uta:queryReport>
 +
</soapenv:Body>
 +
</soapenv:Envelope>
  
 +
==Sample #2==
 +
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 +
* Action: http://uta.WS.SmartSimple2.com/queryReport
 +
* ReportID: 12345 (Note: Report 12345 does not prompt for dynamic run-time criteria)
  
 +
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com">
 +
<soapenv:Header/>
 +
<soapenv:Body>
 +
<uta:queryReport>
 +
<uta:alias>smart</uta:alias>
 +
<uta:username>user@smartsimple.com</uta:username>
 +
<uta:password>password</uta:password>
 +
<uta:reportid>12345</uta:reportid>
 +
<!--Optional:-->
 +
<uta:criteria>$$column 1 = "criteria 1" and column 2 = "criteria 2"</uta:criteria>
 +
</uta:queryReport>
 +
</soapenv:Body>
 +
</soapenv:Envelope>
  
Sample #2
+
==Sample #3==
Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
+
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
Action: http://uta.WS.SmartSimple2.com/queryReport
+
* Action: http://uta.WS.SmartSimple2.com/queryReport
ReportID: 12345
+
* ReportID: 67890 (Note: Report 67890 prompts for dynamic run-time criteria)
Note: Report 12345 does not prompt for dynamic run-time criteria
 
  
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com">   <soapenv:Header/>   <soapenv:Body>     <uta:queryReport>         <uta:alias>smart</uta:alias>         <uta:username>user@smartsimple.com</uta:username>         <uta:password>password</uta:password>         <uta:reportid>12345</uta:reportid>        <!--Optional:-->        <uta:criteria>$$column 1 = "criteria 1" and column 2 = "criteria 2"</uta:criteria>      </uta:queryReport>  </soapenv:Body></soapenv:Envelope>
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com">
 
+
<soapenv:Header/>
 
+
<soapenv:Body>
 
+
<uta:queryReport>
Sample #3
+
<uta:alias>smart</uta:alias>
Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
+
<uta:username>user@smartsimple.com</uta:username>
Action: http://uta.WS.SmartSimple2.com/queryReport
+
<uta:password>password</uta:password>
ReportID: 67890
+
<uta:reportid>67890</uta:reportid>
Note: Report 67890 prompts for dynamic run-time criteria
+
<!--Optional:-->
 
+
<uta:criteria>criteria 1;;criteria 2</uta:criteria>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com">  <soapenv:Header/>  <soapenv:Body>      <uta:queryReport>        <uta:alias>smart</uta:alias>        <uta:username>user@smartsimple.com</uta:username>        <uta:password>password</uta:password>        <uta:reportid>67890</uta:reportid>         <!--Optional:-->         <uta:criteria>criteria 1;;criteria 2</uta:criteria>     </uta:queryReport>   </soapenv:Body></soapenv:Envelope>
+
</uta:queryReport>
 +
</soapenv:Body>
 +
</soapenv:Envelope>
  
  
 
[[Category:Web Services]]
 
[[Category:Web Services]]

Revision as of 09:44, 6 February 2015

The following are sample SOAP messages that will query SmartSimple to run a report and return the results in an XML format.

This example applies to the following:

Sample #1

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:uta="http://uta.WS.SmartSimple2.com"> <soapenv:Header/> <soapenv:Body> <uta:queryReport> <uta:alias>smart</uta:alias> <uta:username>user@smartsimple.com</uta:username> <uta:password>password</uta:password> <uta:reportid>12345</uta:reportid> <uta:criteria></uta:criteria> </uta:queryReport> </soapenv:Body> </soapenv:Envelope>

Sample #2

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com"> <soapenv:Header/> <soapenv:Body> <uta:queryReport> <uta:alias>smart</uta:alias> <uta:username>user@smartsimple.com</uta:username> <uta:password>password</uta:password> <uta:reportid>12345</uta:reportid> <uta:criteria>$$column 1 = "criteria 1" and column 2 = "criteria 2"</uta:criteria> </uta:queryReport> </soapenv:Body> </soapenv:Envelope>

Sample #3

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com"> <soapenv:Header/> <soapenv:Body> <uta:queryReport> <uta:alias>smart</uta:alias> <uta:username>user@smartsimple.com</uta:username> <uta:password>password</uta:password> <uta:reportid>67890</uta:reportid> <uta:criteria>criteria 1;;criteria 2</uta:criteria> </uta:queryReport> </soapenv:Body> </soapenv:Envelope>