You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Geonetwork API to import ISO19139 metadata file using a Java client generated using the OpenApi spec provided.
This endpoint accept a transformWith parameter to trigger the conversion at insert time. Spying on UI call to the Geonetwork API, I found that this parameter should be set to "schema:iso19115-3.2018:convert/fromISO19139" for my conversion. Unfortunately the parameter is baldy escaped by the Java function generated by the codegen and the API call return 400 Bad Request error. I guess the slash and and semicolon characters are messing with the request interpreter.
Secured PUT /srv/api/records?metadataType=METADATA&recursiveSearch=false&publishToAll=true&assignToCatalog=false&uuidProcessing=OVERWRITE&group=2&rejectIfInvalid=false&transformWith=schema:iso19115-3.2018:convert/fromISO19139&schema=iso19139&allowEditGroupMembers=false
I also made a try using this other endpoint. This time the Java function generated correctly escape the process parameter. However the server filter the request :
WARN:oejs.HttpChannel:qtp466505482-2275: /geonetwork/srv/api/records/MyRecordId/processes/schema:iso19115-3.2018:convert%2FfromISO19139
org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL contained a potentially malicious String "%2F"
Does anyone here already achieved XML transformation using the API? Is "schema:iso19115-3.2018:convert/fromISO19139" the good parameter value?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using the Geonetwork API to import ISO19139 metadata file using a Java client generated using the OpenApi spec provided.
This endpoint accept a
transformWith
parameter to trigger the conversion at insert time. Spying on UI call to the Geonetwork API, I found that this parameter should be set to "schema:iso19115-3.2018:convert/fromISO19139" for my conversion. Unfortunately the parameter is baldy escaped by the Java function generated by the codegen and the API call return 400 Bad Request error. I guess the slash and and semicolon characters are messing with the request interpreter.I also made a try using this other endpoint. This time the Java function generated correctly escape the
process
parameter. However the server filter the request :Does anyone here already achieved XML transformation using the API? Is "schema:iso19115-3.2018:convert/fromISO19139" the good parameter value?
Beta Was this translation helpful? Give feedback.
All reactions