Web Service Queries
248
Integration Guide
For example, the following query searches for the purchase orders where
DEPARTMENT is greater than 1000.
<QueryMXPERSON>
<MXPERSONQuery>
<PERSON>
< DEPARTMENT operator=">=">1000</DEPARTMENT>
</PERSON>
</MXPERSONQuery>
</QueryMXPERSON>
The following query searches for person records where PERSONID is greater
than 1000 and less than 20000. The query uses two instances of a single field
element, the first with the From selection criteria, and the second with the To
selection criteria:
<QueryMXPERSON>
<MXPERSONQuery>
<PERSON>
< PERSONID operator=">=">1000</PERSONID >
< PERSONID operator="<=">20000</PERSONID >
</PERSON>
</MXPERSONQuery>
</QueryMXPERSON>
Web Service Queries
Query services that are created in the Enterprise Services and the Object
Structures applications can be deployed as Web services. You must configure
enterprise Web services to bypass the JMS queues.
A successful response to a query that is run in a Web service returns the query
result set. If the result set is empty (it contains no records), the XML that is
returned in the SOAP body contains the following empty mxpersonset tag.
<max:QueryMXPERSONResponse xmlns:max="http://www.ibm.com/maximo"
creationDateTime="2008-09-28T21:49:45" baseLanguage="EN"
transLanguage="EN" messageID="12345" maximoVersion="7.1"
rsStart="1" rsCount="10" rsTotal="10">
</max:MXPERSONSet>
</max:QueryMXPERSONResponse>
If an error occurs, an HTTP response code of 500 is returned, along with a SOAP
fault detailing the error message.
Use the following URL for the Query Web service:
http://hostname:port/meaweb/services/web service name
T host:port/meaweb is the value of the Integration Web Application URL
property.
T web service name is the name of the Web service.
You deploy query enterprise and object structure services as Web services
using the Web Services Library Application.