{
LOG.debug( MSG.getMessage( Keys.QUERY_RP_REQ,
requestDoc.toString() ) );
}
QueryResourcePropertiesResponseDocument responseDoc = createResponseDocument();
QueryExpressionType queryExprElem =
requestDoc.getQueryResourceProperties().getQueryExpression();
SOAPEnvelope envelope;
try
{
envelope = getResourceContext().getSOAPMessage().getSOAPPart().getEnvelope();
}
catch ( SOAPException soape )
{
throw new JAXRPCException( MSG.getMessage( Keys.FAILED_TO_EXTRACT_SOAP_ENV, soape ) );
}
XmlBeansQueryExpression queryExpr = new XmlBeansQueryExpression( queryExprElem );
refreshAllProperties();
Object result = null;
try
{
result = QUERY_ENGINE.executeQuery( queryExpr,
getProperties(),
envelope );
}
catch ( UnknownQueryExpressionDialectException uqede )
{
throw new UnknownQueryExpressionDialectFaultException(NAMESPACE_SET, uqede.getDialect() );
}
catch ( QueryEvaluationErrorException qeee )
{
throw new QueryEvaluationErrorFaultException(NAMESPACE_SET, qeee.getMessage() );
}
catch ( InvalidQueryExpressionException iqee )
{
throw new InvalidQueryExpressionFaultException(NAMESPACE_SET, queryExpr );
}
QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse responseElem =
responseDoc.getQueryResourcePropertiesResponse();
if ( result.getClass().isArray() )
{
for ( int i = 0; i < Array.getLength( result ); i++ )
{
Object resultItem = Array.get( result, i );