org.geoserver.ows.Request.isSOAP()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(259)

本文整理了Java中org.geoserver.ows.Request.isSOAP方法的一些代码示例,展示了Request.isSOAP的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.isSOAP方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:isSOAP

Request.isSOAP介绍

[英]True if the request is a SOAP request.
[中]如果请求是SOAP请求,则为True。

代码示例

代码示例来源:origin: geoserver/geoserver

  1. if (request.isSOAP()
  2. && (handler instanceof OWS10ServiceExceptionHandler
  3. || handler instanceof OWS11ServiceExceptionHandler)) {

代码示例来源:origin: geoserver/geoserver

  1. if (req.isSOAP()) {
  2. req.getHttpResponse().setContentType(SOAP_MIME);
  3. } else {
  4. boolean abortResponse = true;
  5. try {
  6. if (req.isSOAP()) {
  7. if (req.isSOAP() && result instanceof TransformerBase) {
  8. ((TransformerBase) result).setOmitXMLDeclaration(true);
  9. if (req.isSOAP()) {

代码示例来源:origin: geoserver/geoserver

  1. if (!request.isSOAP()) {
  2. encoder.setIndentSize(2);
  3. encoder.setLineWidth(60);
  4. encoder.setOmitXMLDeclaration(request.isSOAP());

代码示例来源:origin: geoserver/geoserver

  1. report.getException().add(e);
  2. if (!request.isSOAP()) {
  3. encoder.setIndentSize(2);
  4. encoder.setLineWidth(60);
  5. encoder.setOmitXMLDeclaration(request.isSOAP());

代码示例来源:origin: geoserver/geoserver

  1. request.setOperation(operation);
  2. if (request.isSOAP()) {

代码示例来源:origin: org.geoserver/gs-wfs

  1. protected void write(
  2. FeatureTypeInfo[] featureTypeInfos, OutputStream output, Operation describeFeatureType)
  3. throws IOException {
  4. // hack for SOAP request, when encoding as SOAP response the schema is actually required
  5. // to be encoded in base64
  6. if (Dispatcher.REQUEST.get() != null && Dispatcher.REQUEST.get().isSOAP()) {
  7. output.write(
  8. ("<wfs:DescribeFeatureTypeResponse xmlns:wfs='" + getWFSNamespaceURI() + "'>")
  9. .getBytes());
  10. ByteArrayOutputStream bout = new ByteArrayOutputStream();
  11. doWrite(featureTypeInfos, bout, describeFeatureType);
  12. output.write(Base64.encodeBase64(bout.toByteArray()));
  13. output.write("</wfs:DescribeFeatureTypeResponse>".getBytes());
  14. } else {
  15. // normal write
  16. doWrite(featureTypeInfos, output, describeFeatureType);
  17. }
  18. }

代码示例来源:origin: org.geoserver/gs-wfs

  1. @Override
  2. public void write(Object value, OutputStream output, Operation operation)
  3. throws IOException, ServiceException {
  4. Encoder encoder = new Encoder(new WFSConfiguration());
  5. encoder.setEncoding(Charset.forName(getInfo().getGeoServer().getSettings().getCharset()));
  6. encoder.setOmitXMLDeclaration(Dispatcher.REQUEST.get().isSOAP());
  7. String baseURL = (String) EMFUtils.get((EObject) operation.getParameters()[0], "baseUrl");
  8. encoder.setSchemaLocation(WFS.NAMESPACE, buildSchemaURL(baseURL, "wfs/2.0/wfs.xsd"));
  9. encode(encoder, value, output, operation);
  10. }

代码示例来源:origin: org.geoserver/gs-wfs

  1. Request dispatcherRequest = Dispatcher.REQUEST.get();
  2. if (dispatcherRequest != null) {
  3. encoder.setOmitXMLDeclaration(dispatcherRequest.isSOAP());

代码示例来源:origin: org.geoserver/gs-wcs2_0

  1. if (!request.isSOAP()) {
  2. encoder.setIndentSize(2);
  3. encoder.setLineWidth(60);
  4. encoder.setOmitXMLDeclaration(request.isSOAP());

相关文章