Hi,
When I am executing the below code, I am getting error " Invalid URI format"
[1.0-ml] XDMP-URI:
xdmp:http-get("http://localhost:9000/v1/search?structuredQuery={"query...",
<options xmlns="xdmp:http"><authentication
method="basic"><username>hmhadmin</username><pas...</options>) --Invalid URI
format:
"http://localhost:9000/v1/search?structuredQuery={"query":{"term-query":{"text":"Complete"} }}&format=xml&collection=Resources&options=all-search"
Code :
let $http-res :=
xdmp:http-get('http://localhost:9000/v1/search?structuredQuery={"query":{"term-query":{"text":"Complete"}}}&format=xml&collection=Resources&options=all-search',
<options xmlns="xdmp:http">
<authentication method="basic">
<username>admin</username>
<password>admin</password>
</authentication>
</options>)
return $http-res
My Requirement : I have to call MarkLogic 6.0 rest API’s form a XQuery file
using xdmp:http-get() method ,which contains above code. But i m getting
Invalid URI format error.
But when I am hitting the URL through browser
"http://localhost:9000/v1/search?structuredQuery={"query":{"term-query":{"text":"Complete"}}}&format=xml&collection=Resources&options=all-search"
its working fine.
Also, when I am using string query for search its working fine for me as below
code :
let $http-res :=
xdmp:http-get('http://localhost:9000/v1/search?q=9780547894140&format=xml&collection=Resources&options=all-search',
<options xmlns="xdmp:http">
<authentication method="basic">
<username>admin</username>
<password>admin</password>
</authentication>
</options>)
return $http-res
I think, here the problem is only with json query when we are passing as
structuredQuery to MarkLogic ML 6.0. So, Can you please provide me solution to
resolve this Invalid URI format error.?
Regards,
Asit Nautiyal
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient(s), please reply to the sender and
destroy all copies of the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email,
and/or any action taken in reliance on the contents of this e-mail is strictly
prohibited and may be unlawful.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general