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);
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);