[Francophone] Get an XML response with a java http post request on GeoNetwork

victor brinon victor.brinon at hotmail.fr
Wed Jun 7 01:46:53 PDT 2017


Hi OosGeo community,

I try to complete automatically my GeoNetwork catalog with java http post request. No matter the library (io, apache commons, geotools), I always have the same html response as follow.

    <!DOCTYPE html
      SYSTEM "html">
    <html ng-app="gn_login" lang="eng" id="ng-app">
       <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
          <title>My GeoNetwork catalogue - My organization</title>
          <meta charset="utf-8">
          <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
          <meta name="apple-mobile-web-app-capable" content="yes">
          <meta name="description" content="">
          <meta name="keywords" content="">
          <link rel="icon" sizes="16x16 32x32 48x48" type="image/png" href="../../i$
          <link href="rss.search?sortBy=changeDate" rel="alternate" type="applicati$
          <link href="portal.opensearch" rel="search" type="application/opensearchd$
          <link href="/geonetwork/static/gn_login_default.css" rel="stylesheet" med$
          <link href="/geonetwork/static/bootstrap-table.min.css" rel="stylesheet" $
          <link href="/geonetwork/static/ng-skos.css" rel="stylesheet" media="scree$
          <link href="/geonetwork/static/srv_custom_style.css" rel="stylesheet" med$
       </head>
       <body data-ng-controller="GnCatController">
          <div class="navbar navbar-default gn-top-bar" data-ng-hide="layout.hideTo$
          <div data-ng-include="'../../catalog/templates/signin.html'"></div>
          <div ng-include="'../../catalog/templates/info.html'"></div><script src="$
             <div class="alert" data-ng-hide=""><strong></strong>
             </div>
          </noscript>
       </body>
    </html>


I start my GeoNetwork with jetty server. Do you know how to directly request the server to get an XML response?

Thanks for your help,
Victor B

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/francophone/attachments/20170607/15c0d35f/attachment.html>


More information about the Francophone mailing list