}
public SearchResponse queryJUDDI(String query) {
HttpServletRequest request = this.getThreadLocalRequest();
HttpSession session = request.getSession();
SearchResponse response = new SearchResponse();
try {
Transport transport = WebHelper.getTransport(session.getServletContext());
UDDIInquiryPortType inquiryService = transport.getUDDIInquiryService();
org.apache.juddi.v3.client.transport.wrapper.UDDIInquiryService uis =
new org.apache.juddi.v3.client.transport.wrapper.UDDIInquiryService();
String reply = uis.inquire(inquiryService, query);
response.setMessage(reply);
response.setSuccess(true);
} catch (Exception e) {
logger.error("Could not obtain token. " + e.getMessage(), e);
response.setSuccess(false);
response.setMessage(e.getMessage());
response.setErrorCode("102");
} catch (Throwable t) {
logger.error("Could not obtain token. " + t.getMessage(), t);
response.setSuccess(false);
response.setMessage(t.getMessage());
response.setErrorCode("102");
}
return response;
}