[midPoint] REST query internal error (500)
Katka Valalikova
katkav at evolveum.com
Wed Jul 22 13:31:59 CEST 2015
Hi Anton,
first of all sorry for the late answer.
In my case search works fine. I tried both samples (query-all-users.xml adn query-all-accounts.xml) and the result was the list of the users and shadows existing in midPoint. I used these curl commands (stated also in the wiki ):
Search (all accounts)
curl.exe --user administrator:5ecr3t -H "Content-Type: application/xml" -X POST http://localhost:8080/midpoint/model/rest/shadows/search -d @pathToMidpointGit\samples\rest\query-all-accounts.xml Search (all users)
curl.exe --user administrator:5ecr3t -H "Content-Type: application/xml" -X POST http://localhost:8080/midpoint/model/rest/users/search -d @pathToMidpointGit\samples\rest\query-all-users.xml
According to the attached error it seems that maybe the xml was not properly loaded, please check if you didn't forget the '@' before the path to the sample. E.g. if your midPoint repository is in the C:\Users\midPoint\git-repo the curl command should looks like
curl.exe --user administrator:5ecr3t -H "Content-Type: application/xml" -X POST http://localhost:8080/midpoint/model/rest/users/search -d @ C:\Users\midPoint\git-repo\samples\rest\query-all-users.xml
And if it is possible, please check your server-side log as well. There should be better description and also the reason for the error.
In the case, you have still some problems with REST calls, let me know.
Best Regards,
Katarina Valalikova
----- Original Message -----
From: midpoint at mybtinternet.com
To: midpoint at lists.evolveum.com
Sent: Wednesday, July 15, 2015 4:39:25 PM
Subject: [midPoint] REST query internal error (500)
Hi Guys,
Have tried for the first time to use the REST API and am running into internal error with user and account query.
Am using the xml from the samples (midPoint 3.1.1): query-all-users.xml and query-all-accounts.xml. The former
is used verbatim and the second I have substituted one of my resource OIDs. Both fails on seemingly the same
issue ... see below.
# AO: -----------------------------------------------------------------------------------------------#
2015-07-15 14:51:04,386 [] [http-bio-127.0.0.1-8080-exec-207] WARN (org.apache.cxf.phase.PhaseInterceptorChain): Interceptor for {http://impl.model.midpoint.evolveum.com/}ModelRestService has thrown exception, unwinding now
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
... 55 common frames omitted
2015-07-15 14:51:04,387 [] [http-bio-127.0.0.1-8080-exec-207] WARN (org.apache.cxf.phase.PhaseInterceptorChain): Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor at 30a58fb8
org.apache.cxf.interceptor.Fault: Error parsing XML document Content is not allowed in prolog.
... 44 common frames omitted
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
... 55 common frames omitted
org.apache.cxf.interceptor.Fault: Error parsing XML document Content is not allowed in prolog.
... 44 common frames omitted
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
... 55 common frames omitted
# AO: -----------------------------------------------------------------------------------------------#
2015-07-15 14:59:57,891 [] [http-bio-127.0.0.1-8080-exec-208] WARN (org.apache.cxf.phase.PhaseInterceptorChain): Interceptor for {http://impl.model.midpoint.evolveum.com/}ModelRestService has thrown exception, unwinding now
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
... 55 common frames omitted
2015-07-15 14:59:57,892 [] [http-bio-127.0.0.1-8080-exec-208] WARN (org.apache.cxf.phase.PhaseInterceptorChain): Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor at 30a58fb8
org.apache.cxf.interceptor.Fault: Error parsing XML document Content is not allowed in prolog.
... 44 common frames omitted
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
... 55 common frames omitted
org.apache.cxf.interceptor.Fault: Error parsing XML document Content is not allowed in prolog.
... 44 common frames omitted
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
... 55 common frames omitted
Have also tried get object and test object REST calls, both works ...
Regards,
Anton
_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com
http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150722/8ff075f2/attachment.htm>
More information about the midPoint
mailing list