| 794 | /************************************************************************/ |
| 795 | |
| 796 | static int msWCSGetCapabilities_Capability(mapObj *map, wcsParamsObj *params, cgiRequestObj *req) |
| 797 | { |
| 798 | char *script_url=NULL, *script_url_encoded=NULL; |
| 799 | |
| 800 | /* we need this server's onlineresource for the request section */ |
| 801 | if((script_url=msOWSGetOnlineResource(map, "CO", "onlineresource", req)) == NULL || (script_url_encoded = msEncodeHTMLEntities(script_url)) == NULL) { |
| 802 | free(script_url); |
| 803 | free(script_url_encoded); |
| 804 | return msWCSException(map, NULL, NULL, params->version ); |
| 805 | } |
| 806 | |
| 807 | /* start the Capabilty section, only need the full start tag if this is the only section requested */ |
| 808 | if(!params->section || (params->section && strcasecmp(params->section, "/") == 0)) |
| 809 | msIO_printf("<Capability>\n"); |
| 810 | else |
| 811 | msIO_printf("<Capability\n" |
| 812 | " version=\"%s\" \n" |
| 813 | " updateSequence=\"%s\" \n" |
| 814 | " xmlns=\"http://www.opengis.net/wcs\" \n" |
| 815 | " xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n" |
| 816 | " xmlns:gml=\"http://www.opengis.net/gml\" \n" |
| 817 | " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" |
| 818 | " xsi:schemaLocation=\"http://www.opengis.net/wcs %s/wcs/%s/wcsCapabilities.xsd\">\n", params->version, params->updatesequence, msOWSGetSchemasLocation(map), params->version); |
| 819 | |
| 820 | /* describe the types of requests the server can handle */ |
| 821 | msIO_printf(" <Request>\n"); |
| 822 | |
| 823 | msWCSPrintRequestCapability(params->version, "GetCapabilities", script_url_encoded); |
| 824 | if (msOWSRequestIsEnabled(map, NULL, "C", "DescribeCoverage", MS_TRUE)) |
| 825 | msWCSPrintRequestCapability(params->version, "DescribeCoverage", script_url_encoded); |
| 826 | if (msOWSRequestIsEnabled(map, NULL, "C", "GetCoverage", MS_TRUE)) |
| 827 | msWCSPrintRequestCapability(params->version, "GetCoverage", script_url_encoded); |
| 828 | |
| 829 | msIO_printf(" </Request>\n"); |
| 830 | |
| 831 | /* describe the exception formats the server can produce */ |
| 832 | msIO_printf(" <Exception>\n"); |
| 833 | msIO_printf(" <Format>application/vnd.ogc.se_xml</Format>\n"); |
| 834 | msIO_printf(" </Exception>\n"); |
| 835 | |
| 836 | /* describe any vendor specific capabilities */ |
| 837 | /* msIO_printf(" <VendorSpecificCapabilities />\n"); */ /* none yet */ |
| 838 | |
| 839 | /* done */ |
| 840 | msIO_printf("</Capability>\n"); |
| 841 | |
| 842 | free(script_url); |
| 843 | free(script_url_encoded); |
| 844 | |
| 845 | return MS_SUCCESS; |
| 846 | } |
| 847 | |
| 848 | /************************************************************************/ |
| 849 | /* msWCSGetCapabilities_CoverageOfferingBrief() */ |
no test coverage detected