Geonetwork GetRecords request by Alternate Title no longer returns results - ogc

I'm trying to pull a record from GeoNetwork via the following CSW (POST) request
<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" maxRecords="1" service="CSW" version="2.0.2" resultType="results" outputSchema="http://www.isotc211.org/2005/gmd">
<csw:Query typeNames="csw:Record">
<csw:Constraint version="1.1.0">
<Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" >
<PropertyIsEqualTo>
<PropertyName>alternateTitle</PropertyName>
<Literal>GB001503</Literal>
</PropertyIsEqualTo>
</Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
The metadata record still exists and contains the correct alternateTitle value as far as I can see (snip below)
<gmd:identificationInfo>
<gmd:MD_DataIdentification>
<gmd:citation>
<gmd:CI_Citation>
<gmd:alternateTitle>
<gco:CharacterString>GB001503</gco:CharacterString>
</gmd:alternateTitle>
This previously, in runs a year ago, correctly returned one record. However, running the same query recently results in 0 records being returned. Response below:
<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:SearchStatus timestamp="2022-08-05T15:51:12.142Z" />
<csw:SearchResults numberOfRecordsMatched="0" numberOfRecordsReturned="0" elementSet="summary" nextRecord="0" />
</csw:GetRecordsResponse>
I do know that the GeoNetwork itself has been updated. Has there been a change in how GetRecords behaves in GeoNetwork? Or is there an issue with the request body?

Related

Salesforce Records Are Being Created an Endless Amount of Times in Mule 4

I am trying to create records in Salesforce using a CSV file in Mule 4. However, after the first batch is created successfully, instead of ending the program, Mule goes back and creates the same batches an infinite amount of times.
How do I get Mule to stop after the first batch is created? Here is my code:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns:db="http://www.mulesoft.org/schema/mule/db"
xmlns:salesforce="http://www.mulesoft.org/schema/mule/salesforce"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/salesforce
http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd">
<salesforce:sfdc-config name="Salesforce_Config" doc:name="Salesforce Config" doc:id="8e29192b-953e-499f-a34b-584b34bd6e9c" >
<salesforce:basic-connection username="gregory.palios#ohrsdev2.com" password="1luvL!zzy" securityToken="6QgMUnwuaNM9rgX5HQbiwIdv" url="https://vha-gov--ohrsdev2.my.salesforce.com/services/Soap/u/48.0" />
</salesforce:sfdc-config>
<flow name="addendumFlow" doc:id="4df7a2c4-3d56-4e00-a65a-62f579f43880" >
<file:listener doc:name="On New or Updated File" doc:id="7ea260b4-02a9-429c-82a9-87cf924c6ef1" directory="C:\Users\GregoryPalios\AnypointStudio\studio-workspace\legacyohrstestmigration\Table Files\ADDENDUM">
<scheduling-strategy >
<fixed-frequency />
</scheduling-strategy>
</file:listener>
<ee:transform doc:name="Transform Message" doc:id="93744a3d-5945-4688-af87-afaf90677469">
<ee:message>
<ee:set-payload><![CDATA[%dw 2.0
output application/java
---
[payload map{
ADDENDUM_ID__c: $.ADDENDUM_ID as Number,
ENCOUNTER_ID__c: $.ENCOUNTER_ID as Number,
OH_STD_ENCOUNTER_STATUS_ID__c: $.OH_STD_ENCOUNTER_STATUS_ID as Number,
NOTE__c: $.NOTE,
ADDENDUM_DESCRIPTION__c: $.ADDENDUM_DESCRIPTION,
VIEWED_DATE__c: $.VIEWED_DATE,
VIEWED_DATE_TZ__c: $.VIEWED_DATE_TZ,
DELETED_DATE__c: $.DELETED_DATE,
DELETED_DATE_TZ__c: $.DELETED_DATE_TZ,
DELETED_BY__c: $.DELETED_BY,
CO_SIGNATURE_REQUIRED_IND__c: $.CO_SIGNATURE_REQUIRED_IND,
CO_SIGNER_ACTIVE_DIRECTORY_NAME__c: $.CO_SIGNER_ACTIVE_DIRECTORY_NAME,
ADMIN_LEVEL__c: $.ADMIN_LEVEL,
RECORD_CREATED_BY__c: $.RECORD_CREATED_BY,
RECORD_CREATED_DATE__c: $.RECORD_CREATED_DATE,
RECORD_MODIFIED_BY__c: $.RECORD_MODIFIED_BY,
RECORD_MODIFIED_DATE__c: $.RECORD_MODIFIED_DATE,
RECORD_MODIFIED_COUNT__c: $.RECORD_MODIFIED_COUNT as Number,
RECORD_CREATED_DATE_TZ__c: $.RECORD_CREATED_DATE_TZ,
RECORD_MODIFIED_DATE_TZ__c: $.RECORD_MODIFIED_DATE_TZ,
OH_STD_INACTIVE_ACTIVITY_REASON_ID__c: $.OH_STD_INACTIVE_ACTIVITY_REASON_ID as Number
}]]]></ee:set-payload>
</ee:message>
</ee:transform>
<foreach doc:name="For Each" doc:id="9ab8acaf-988e-4a02-bb72-3150f9688a4a" >
<salesforce:create doc:name="Create" doc:id="2865a2fd-2559-401e-a365-93950717d3a7" config-ref="Salesforce_Config" type="ADDENDUM__c" />
</foreach>
</flow>
In your file listener, you need to set the autoDelete to "true" or move the file to a backup director other than the directory you are listening to.
You can also enable watermarking so file will not be picked up again and again.

Implementing Sage Intacct API via Postman

I would like to get the invoice link from the purchase order implementing Sage Intacct API via Postman.
I suppose it can be done by following sequences(or by only one api request? not sure about this).
Order a purchase
Create a purchase receipt
Get an invoice link from it
Please refer to this API document (https://developer.intacct.com/api).
i.e. This is the body of a request to create a purchase transaction.
<?xml version="1.0" encoding="UTF-8"?>
<request>
<control>
<senderid>{{sender_id}}</senderid>
<password>{{sender_password}}</password>
<controlid>{{$timestamp}}</controlid>
<uniqueid>false</uniqueid>
<dtdversion>3.0</dtdversion>
<includewhitespace>false</includewhitespace>
</control>
<operation>
<authentication>
<sessionid>{{temp_session_id}}</sessionid>
</authentication>
<content>
<function controlid="{{$guid}}">
<create_potransaction>
<transactiontype>Purchase Requisition</transactiontype>
<datecreated>
<year>2013</year>
<month>6</month>
<day>19</day>
</datecreated>
<vendorid>1001</vendorid>
<referenceno>1234</referenceno>
<vendordocno>vendordocno001</vendordocno>
<datedue>
<year>2013</year>
<month>6</month>
<day>20</day>
</datedue>
<payto>
<contactname>Jameson Company</contactname>
</payto>
<exchratetype>Intacct Daily Rate</exchratetype>
<customfields/>
<potransitems>
<potransitem>
<itemid>75300GL</itemid>
<quantity>100</quantity>
<unit>Each</unit>
<price>1</price>
<locationid>MGMT-US</locationid>
<departmentid>IT</departmentid>
</potransitem>
</potransitems>
</create_potransaction>
</function>
</content>
</operation>
</request>
Thank you in advance.
You can download the Postman collection file (API) from the developer docs.
And then just refer to Purchasing/Purchasing Transactions/Create Transaction (Legacy).
You can change the body (SOAP) content.
I'm sure you can manage it.

Download twilio record in my dataBase #10

I used the "action" option of twiML to send the recording of a call to my application and add the url and the text of call in my database
but it doesn't work
<?xml version="1.0" encoding="UTF-8"?> <Response> <Dial record="true" > +######## </Dial> <Record method="POST" action="http://myapp.com/phone_call/speech.php" timeout="10" /> </Response>
There are a number of different ways to record a call, which I assume is what you are trying to do.
You want to use the Record attribute (and associated recordingStatusCallback) of the Dial Verb. The TwiML Record verb is used for recording voice mails, as an example.
TwiML™ Voice:
Recording Incoming Twilio Voice Calls
Done :)
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial record="true" recordingStatusCallback="https://myapp.com/call/speech.php"
recordingStatusCallbackEvent="completed" >
+##########
</Dial>
</Response>

How to get file uploaded time in wso2 esb sequence

I am using WSO2 inbound endpoint to fetch a file from an FTP server. And I know how to get the file name back. Now my question is how to get the file uploaded time back (or the last modified time)?
This is the code to get the file name.
<property expression="get-property('transport', 'FILE_NAME')" name="ftp.var.filename"
xmlns:ns="http://org.apache.synapse/xsd"
xmlns:ns2="http://org.apache.synapse/xsd"/>
I think there should be a similar code to get the timestamp of the file.
With the following property, you will be able to get the last modified time of the file polled from the inbound endpoint.
`<property expression="get-property('transport', 'LAST_MODIFIED')" name="ftp.var.last.modified.time" xmlns:ns="http://org.apache.synapse/xsd"/>`
Add this to the relevant sequence to further process and following is a sample sequence in which the file name and the last modified time is logged.
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="fileSequence" onError="fault" xmlns="http://ws.apache.org/ns/synapse">
<log level="custom">
<property expression="get-property('transport', 'FILE_NAME')"
name="ftp.var.filename" xmlns:ns="http://org.apache.synapse/xsd"/>
<property
expression="get-property('transport', 'LAST_MODIFIED')"
name="ftp.var.last.modified.time" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
</sequence>
Please check whether this meets your requirement and please refer [1] to further clarify this.
[1]-https://github.com/wso2/wso2-synapse/blob/master/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java#L767

Google CALDAV ignoring filter options

Is there any documentation why does the google caldav api ignores this request.
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-query xmlns:d="DAV:"
xmlns:C="urn:ietf:params:xml:ns:caldav"
xmlns:A="http:/ /apple.com/ns/ical/">
<d:prop>
<d:getetag/>
<C:calendar-data/>
</d:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="UID">
<C:text-match collation="i;octet">xxxxxxxxxxxx</C:text-match>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
It returns every event but it should return only the one i requested in the filter.
I can only filter the events with
<C:time-range start="20160326T230000Z" end="20160430T220000Z"/>
but everything else is just ignored.
I find another solution to get only one event by uid with caldav api google.
I use href url of the event like $href="https://apidata.googleusercontent.com/caldav/v2/IDCalendar/events/**uid.**ics
And i query with :
<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-multiget xmlns="DAV:"mlns:C="urn:ietf:params:xml:ns:caldav">
<prop><getetag/><C:calendar-data/></prop>
<href>$href</href>
</C:calendar-multiget>
and i get only the event with UID :) .
Dam
but Google CalDAV supports calendar-multiget, where you can use same url pattern
https://icalendar.org/CalDAV-Access-RFC-4791/7-9-caldav-calendar-multiget-report.html
Example:
<?xml version='1.0' encoding='utf-8'?>
<C:calendar-multiget xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:D="DAV" xmlns:I="http://apple.com/ns/ical/">
<ns0:prop xmlns:ns0="DAV:">
<ns0:getetag/>
<C:calendar-data/>
</ns0:prop>
<ns0:href xmlns:ns0="DAV:">/caldav/v2/[calendar_id]/events/[UID]</ns0:href>
</C:calendar-multiget>
with response
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:ical="http://apple.com/ns/ical/">
<D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
<D:href>/caldav/v2/[calendarID]/events/[UID]</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop>
<D:getetag>"63701474571"</D:getetag>
<caldav:calendar-data>BEGIN:VCALENDAR
.....
</caldav:calendar-data>
</D:prop>
</D:propstat>
</D:response>
</D:multistatus>

Resources