QAS_EXECUTEQRYSYNC_OPER

Use this service operation to synchronously execute a query and receive the query results in the format selected in the service operation request. The response message depends on the request was for a file or a non file format.

Request Message: QAS_EXEQRY_SYNC_REQ_MSG

Element Name Description

QueryName

Required element unless you are using XML string

Query name. Required unless you are using an XML string.

isConnectedQuery

Required element

Indicate whether this is a connected query. Valid values are Y or N in either upper or lower case.

Note: The default value is N.

XMLString

XML string.

Note: XML string is used only for ad hoc queries. See XML String for the elements.

OwnerType

Required element

Query owner type, public or private in either uppercase or lowercase. Required.

BlockSizeKB

Required element

Blocksize is used only for synchronous poll. For synchronous execution, the value should be set to 0 (zero).

The default value is 0.

MaxRows

Required element

The maximum number of rows to be fetched.

OutResultType

Required element

Select the output type. Valid values are:

  • WEBROWSET

  • XMLP

  • EXCEL

  • HTML

Note: For connected queries, the output type must be XMLP.

See Output Format and Output Type.

OutResultFormat

Required element

Select the output format. Valid values are:

  • FILE

  • NONFILE

Note: For connected queries, the output format must be FILE.

<Prompts> These elements are used for Connected Query or queries containing prompts.

Prompt Elements Description

PSQueryName

This field is used only for Connected Query. Enter the name of the query containing the prompt.

UniquePromptName

Unique prompt name defined in the query. This value is case-sensitive.

Use the service operation QAS_LISTQUERYPROMPTS_OPER to find the unique prompt name.

FieldValue

Field value for the prompt. This value is case-sensitive.

Note: Date fields require the date format as YYYY-MM-DD.

<FieldFilter> If you want to return only specific fields in the query, indicate each field you want returned.

FilterFieldName Element Description

FilterFieldName

List of field names to be returned. This value is case sensitive and must be the unique field name as returned by the service operation QAS_LISTQUERYFIELDS.

Example Request:

This request will execute the query MSGCAT_PROMPT, the unique name for the prompt is Set and the prompt value is2.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:qas="http://xmlns.oracle.com/Enterprise/Tools/schemas/
QAS_EXEQRY_SYNC_REQ_MSG.VERSION_1"
xmlns:qas1="http://xmlns.oracle.com/Enterprise/Tools/schemas/
QAS_EXEQRY_SYNC_REQ.VERSION_1">
   <soapenv:Header/>
   <soapenv:Body>
      <qas:QAS_EXEQRY_SYNC_REQ_MSG>
         <qas1:QAS_EXEQRY_SYNC_REQ>
            <QueryName>MSGCAT_PROMPT</QueryName>
            <isConnectedQuery>N</isConnectedQuery>
            <OwnerType>PUBLIC</OwnerType>
            <BlockSizeKB>0</BlockSizeKB>
            <MaxRow>2</MaxRow>
            <OutResultType>XMLP</OutResultType>
            <OutResultFormat>FILE</OutResultFormat>
            <Prompts>
               <!--Zero or more repetitions:-->
               <PROMPT>
                  <PSQueryName></PSQueryName>
                  <UniquePromptName>BIND1</UniquePromptName>
                  <FieldValue>2</FieldValue>
               </PROMPT>
            </Prompts>
         </qas1:QAS_EXEQRY_SYNC_REQ>
      </qas:QAS_EXEQRY_SYNC_REQ_MSG>
   </soapenv:Body>
</soapenv:Envelope>

Response Message: QAS_QUERYRESULTS_FILE_RESP

This response is used when the output format requested is FILE.

Element Name Description

QueryResults

File URL

Example Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <QAS_GETQUERYRESULTS_RESP_MSG
      xmlns="http://xmlns.oracle.com/Enterprise/Tools/
      schemas/QAS_GETQUERYRESULTS_RESP_MSG.VERSION_1">
         <QAS_QUERYRESULTS_FILE_RESP xmlns="http://xmlns.oracle.com/
         Enterprise/Tools/schemas/QAS_QUERYRESULTS_FILE_RESP.VERSION_1">
            <FILEURL>http://ple-infodev-08.example.com:8010/psreports/
            QEDMO/9999957/MSGCAT_PROMPT.xml</FILEURL>
         </QAS_QUERYRESULTS_FILE_RESP>
      </QAS_GETQUERYRESULTS_RESP_MSG>
   </soapenv:Body>
</soapenv:Envelope>

Response Message: QAS_QUERYRESULTS_WRS_RESP

This response is used when the requested output format is NONFILE and the output type is WEBROWSET.

Element Name Description

QueryResults

Query Result in webrowset format.

Example Response for webrowset:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <QAS_GETQUERYRESULTS_RESP_MSG
      xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/
      QAS_GETQUERYRESULTS_RESP_MSG.VERSION_1">
         <webRowSet xmlns="http://java.sun.com/xml/ns/jdbc">
            <properties>
               <escape-processing>true</escape-processing>
               <fetch-direction>1000</fetch-direction>
               <fetch-size>0</fetch-size>
               <isolation-level>1</isolation-level>
               <key-columns/>
               <map/>
               <max-field-size>0</max-field-size>
               <max-rows>0</max-rows>
               <query-timeout>0</query-timeout>
               <read-only>true</read-only>
               <show-deleted>false</show-deleted>
               <table-name/>
            </properties>
            <metadata>
               <column-count>5</column-count>
               <column-definition>
                  <column-index>1</column-index>
                  <auto-increment>false</auto-increment>
                  <case-sensitive>false</case-sensitive>
                  <currency>false</currency>
                  <nullable>0</nullable>
                  <signed>false</signed>
                  <searchable>false</searchable>
                  <column-display-size>0</column-display-size>
                  <column-label>Set</column-label>
                  <column-name>A.MESSAGE_SET_NBR</column-name>
                  <schema-name/>
                  <column-precision>0</column-precision>
                  <column-scale>0</column-scale>
                  <table-name/>
                  <catalog-name/>
                  <column-type>4</column-type>
                  <column-type-name>INTEGER</column-type-name>
               </column-definition>
               <column-definition>
                  <column-index>2</column-index>
                  <auto-increment>false</auto-increment>
                  <case-sensitive>false</case-sensitive>
                  <currency>false</currency>
                  <nullable>0</nullable>
                  <signed>false</signed>
                  <searchable>false</searchable>
                  <column-display-size>0</column-display-size>
                  <column-label>Descr</column-label>
                  <column-name>A.DESCR</column-name>
                  <schema-name/>
                  <column-precision>0</column-precision>
                  <column-scale>0</column-scale>
                  <table-name/>
                  <catalog-name/>
                  <column-type>12</column-type>
                  <column-type-name>VARCHAR</column-type-name>
               </column-definition>
               <column-definition>
                  <column-index>3</column-index>
                  <auto-increment>false</auto-increment>
                  <case-sensitive>false</case-sensitive>
                  <currency>false</currency>
                  <nullable>0</nullable>
                  <signed>false</signed>
                  <searchable>false</searchable>
                  <column-display-size>0</column-display-size>
                  <column-label>Msg</column-label>
                  <column-name>B.MESSAGE_NBR</column-name>
                  <schema-name/>
                  <column-precision>0</column-precision>
                  <column-scale>0</column-scale>
                  <table-name/>
                  <catalog-name/>
                  <column-type>4</column-type>
                  <column-type-name>INTEGER</column-type-name>
               </column-definition>
               <column-definition>
                  <column-index>4</column-index>
                  <auto-increment>false</auto-increment>
                  <case-sensitive>false</case-sensitive>
                  <currency>false</currency>
                  <nullable>0</nullable>
                  <signed>false</signed>
                  <searchable>false</searchable>
                  <column-display-size>0</column-display-size>
                  <column-label>Message</column-label>
                  <column-name>B.MESSAGE_TEXT</column-name>
                  <schema-name/>
                  <column-precision>0</column-precision>
                  <column-scale>0</column-scale>
                  <table-name/>
                  <catalog-name/>
                  <column-type>12</column-type>
                  <column-type-name>VARCHAR</column-type-name>
               </column-definition>
               <column-definition>
                  <column-index>5</column-index>
                  <auto-increment>false</auto-increment>
                  <case-sensitive>false</case-sensitive>
                  <currency>false</currency>
                  <nullable>0</nullable>
                  <signed>false</signed>
                  <searchable>false</searchable>
                  <column-display-size>0</column-display-size>
                  <column-label>Severity</column-label>
                  <column-name>B.MSG_SEVERITY</column-name>
                  <schema-name/>
                  <column-precision>0</column-precision>
                  <column-scale>0</column-scale>
                  <table-name/>
                  <catalog-name/>
                  <column-type>12</column-type>
                  <column-type-name>VARCHAR</column-type-name>
               </column-definition>
            </metadata>
            <data>
               <currentRow>
                  <columnValue>2</columnValue>
                  <columnValue>PeopleCode</columnValue>
                  <columnValue>1</columnValue>
                  <columnValue>Invalid use of !.</columnValue>
                  <columnValue>E</columnValue>
               </currentRow>
               <currentRow>
                  <columnValue>2</columnValue>
                  <columnValue>PeopleCode</columnValue>
                  <columnValue>2</columnValue>
                  <columnValue>Literal is too long.</columnValue>
                  <columnValue>E</columnValue>
               </currentRow>
            </data>
         </webRowSet>
      </QAS_GETQUERYRESULTS_RESP_MSG>
   </soapenv:Body>
</soapenv:Envelope>

Response Message: QAS_QUERYRESULTS_XMLP_RESP

This response is used when the requested output is NONFILE and the output type is XMLP.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <QAS_GETQUERYRESULTS_RESP_MSG
      xmlns="http://xmlns.oracle.com/Enterprise/Tools/
      schemas/QAS_GETQUERYRESULTS_RESP_MSG.VERSION_1">
         <query numrows="2" queryname="MSGCAT_PROMPT"
         xsi:noNamespaceSchemaLocation="">
            <row rownumber="1">
               <MESSAGE_SET_NBR>2</MESSAGE_SET_NBR>
               <DESCR>PeopleCode</DESCR>
               <MESSAGE_NBR>1</MESSAGE_NBR>
               <MESSAGE_TEXT>Invalid use of !.</MESSAGE_TEXT>
               <MSG_SEVERITY>E</MSG_SEVERITY>
            </row>
            <row rownumber="2">
               <MESSAGE_SET_NBR>2</MESSAGE_SET_NBR>
               <DESCR>PeopleCode</DESCR>
               <MESSAGE_NBR>2</MESSAGE_NBR>
               <MESSAGE_TEXT>Literal is too long.</MESSAGE_TEXT>
               <MSG_SEVERITY>E</MSG_SEVERITY>
            </row>
         </query>
      </QAS_GETQUERYRESULTS_RESP_MSG>
   </soapenv:Body>
</soapenv:Envelope>