<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Good Morning.</div><div><br></div><div>I am trying to use the option getrecords2 with the xml argument (which should override everything), in order to send a POST request with a body.<br></div><div><br></div><div>This is is the POST request (which works on postman):</div><div><br></div><div><?xml version="1.0" ?><br><csw:GetRecords maxRecords="100" outputFormat="application/xml" outputSchema="<a href="http://www.opengis.net/cat/csw/2.0.2">http://www.opengis.net/cat/csw/2.0.2</a>" resultType="results" service="CSW" version="2.0.2" xmlns:csw="<a href="http://www.opengis.net/cat/csw/2.0.2">http://www.opengis.net/cat/csw/2.0.2</a>" xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>" xmlns:ows="<a href="http://www.opengis.net/ows">http://www.opengis.net/ows</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:schemaLocation="<a href="http://www.opengis.net/cat/csw/2.0.2">http://www.opengis.net/cat/csw/2.0.2</a> <a href="http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd</a>"><br>    <csw:Query typeNames="csw:Record"><br>        <csw:ElementSetName>full</csw:ElementSetName><br>        <csw:Constraint version="1.1.0"><br>            <ogc:Filter><br>                <ogc:PropertyIsLike escapeChar="\" singleChar="_" wildCard="%"><br>                    <ogc:PropertyName>csw:AnyText</ogc:PropertyName><br>                    <ogc:Literal>Walter/SeaDataNet</ogc:Literal><br>                </ogc:PropertyIsLike><br>            </ogc:Filter><br>        </csw:Constraint><br>    </csw:Query><br></csw:GetRecords> <br></div><div><br></div><div>And this is the python code to implement this, which does not return any records.<br></div><div><br></div><div>src.getrecords2(xml='<?xml version="1.0" ?> <csw:GetRecords maxRecords="100" outputFormat="application/xml" outputSchema="<a href="http://www.opengis.net/cat/csw/2.0.2">http://www.opengis.net/cat/csw/2.0.2</a>" resultType="results" service="CSW" version="2.0.2" xmlns:csw="<a href="http://www.opengis.net/cat/csw/2.0.2">http://www.opengis.net/cat/csw/2.0.2</a>" xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>" xmlns:ows="<a href="http://www.opengis.net/ows">http://www.opengis.net/ows</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:schemaLocation="<a href="http://www.opengis.net/cat/csw/2.0.2">http://www.opengis.net/cat/csw/2.0.2</a> <a href="http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd</a>"> <csw:Query typeNames="csw:Record"> <csw:ElementSetName>full</csw:ElementSetName> <csw:Constraint version="1.1.0"> <ogc:Filter> <ogc:PropertyIsLike escapeChar="\" singleChar="_" wildCard="%"> <ogc:PropertyName>csw:AnyText</ogc:PropertyName> <ogc:Literal>Walter/SeaDataNet</ogc:Literal> </ogc:PropertyIsLike> </ogc:Filter> </csw:Constraint> </csw:Query> </csw:GetRecords>')<br><br>print('results:', src.results)<br></div><div><br></div><div>I wonder what I am doing wrong here. Do I need to replace the single quotes by double quotes and escape all the characters?</div><div><br></div><div>I welcome any tips or suggestions which could point me in the right direction, as I am running out of ideas here.</div><div><br></div><div>                             Thanks in advance!!!</div><div>                                         Joana<br></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Joana Simoes</div><div>Technical Lead</div><div>Starlab - Living Science<br><br>Starlab <br>Barcelona Offices: <br>Avinguda Tibidabo 47 bis<br>08035 Barcelona - Spain<br>tel: +34 93 254 03 66<br><br>e-mail: <a href="mailto:joana.simoes@starlab.es" target="_blank">joana.simoes@starlab.es</a><br><br>Skype: live:joana.simoes_15<br><br>website: <a href="http://starlab.es" target="_blank">http://starlab.es</a><br></div></div></div></div></div></div>