33 #include <BESDapTransmit.h> 35 #include <DODSFilter.h> 37 #include <BESWWWTransmit.h> 39 #include <BESContainer.h> 40 #include <BESDapNames.h> 41 #include <BESWWWNames.h> 42 #include <mime_util.h> 45 #include <InternalErr.h> 47 #include <BESDapError.h> 48 #include <BESInternalFatalError.h> 49 #include <BESServiceRegistry.h> 53 #include "get_html_form.h" 55 using namespace dap_html_form;
61 BESDEBUG(
"www",
"converting dds to www dds" << endl);
63 DDS *dds = dynamic_cast<BESWWW &>(*obj).get_dds()->get_dds();
66 DDS *wwwdds = dds_to_www_dds(dds);
68 BESDEBUG(
"www",
"writing form" << endl);
70 string url = dhi.
data[WWW_URL];
75 bool netcdf3_file_response = registry->
service_available(OPENDAP_SERVICE, DATA_SERVICE,
"netcdf");
78 bool netcdf4_file_response = registry->
service_available(OPENDAP_SERVICE, DATA_SERVICE,
"netcdf");
79 write_html_form_interface(dhi.get_output_stream(), wwwdds, url,
false ,
80 netcdf3_file_response, netcdf4_file_response);
82 BESDEBUG(
"www",
"done transmitting form" << endl);
86 catch (InternalErr &e) {
87 string err =
"Failed to write html form: " + e.get_error_message();
88 throw BESDapError(err,
true, e.get_error_code(), __FILE__, __LINE__);
91 string err =
"Failed to write html form: " + e.get_error_message();
92 throw BESDapError(err,
false, e.get_error_code(), __FILE__, __LINE__);
98 string err =
"Failed to write html form: Unknown exception caught";
105 set_mime_text(dhi.get_output_stream(), unknown_type, x_plain);
106 BESWWWTransmit::send_basic_form(obj, dhi);
exception thrown if an internal error is found and is fatal to the BES
The service registry allows modules to register services with the BES that they provide.
Abstract exception class for the BES with basic string message.
error object created from libdap error objects and can handle those errors
Structure storing information used by the BES to handle the request.
map< string, string > data
the map of string data that will be required for the current request.
void first_container()
set the container pointer to the first container in the containers list
virtual bool service_available(const string &name, const string &cmd="", const string &format="")
Determines if a service and, optionally, a command and a return format, is available.
Abstract base class representing a specific set of information in response to a request to the BES.