Categories
Issue while doing view data from HTTP connection and dataset at BIP Data model

Hello Experts,
I created one HTTP (XML feed) connection through BIP (Administration) and it is successfull:
Then I created a BIP data model using this HTTP connection as dataset:
If I validate my data model then it looks good:
However when doing view data getting below error:
Below is detailed error message from view engine log:
Total Number of Datasets: 4
Total Number of Elements: 0
Total Parse Time (ms): 0
Total Used Memory at Start: 2.29 GB
Total Used Memory after Parsing: 2.29 GB
Total Used Memory after Processing: 2.32 GB
Total Datamodel Validation Time: .000 mseconds
Total Xplan Generation Time: .000 mseconds
Total Data Generation Time: 1.000 seconds
Total XML Data Size Generated: 145
Processing Exceptions: oracle.xdo.XDOException: Unsupported content-type:text/html; charset=UTF-8
at oracle.xdo.dataengine.datasource.http.RestApi.writeOutputStream(RestApi.java:327)
at oracle.xdo.dataengine.datasource.http.RestApi.execute(RestApi.java:229)
at oracle.xdo.dataengine.datasource.http.HTTPHandler.execute(HTTPHandler.java:105)
at oracle.xdo.dataengine.datasource.XMLStatement.executeHTTP(XMLStatement.java:235)
at oracle.xdo.dataengine.datasource.ThreadExecutor.process(ThreadExecutor.java:92)
at oracle.xdo.dataengine.datasource.ThreadExecutor.run(ThreadExecutor.java:62)
I am not the expert , however it seems that it is expecting content type as XML and I could not see any option to define content type as XML at BIP whilst I could choose through postman:
My HTTP url in above screenshot (from postman) is defined at BIP as below:
and I mentioned in HTTP connection and dataset like below:
Please help !!!
Thanks,
Answers
-
What is the content-type header that your web service return?
It sounds like your web service isn't a real webservice and isn't returning the right header which probably needs to be "text/xml" or "application/xml".
Not only that: is your web service really returning XML? Because in your screenshot I see JSON, not XML ...
0 -
Hi Gianni,
Thanks for your help !!!
Just to avoid any possible confusion , I am using HTTP (XML feed) connection and not webservice:
my url is a REST API which I created on database tables through ORDS- Oracle Rest Data Services. I am able to access data in database tables through these REST API resources through POSTMAN (URL and example as in OP).
regarding output, I can choose any desired output as POSTMAN give option in dropdown list (JASON, XML, Test etc).
Thanks,
0 -
I just did a quick test, that source is for RSS or XML feeds. I pointed to a website RSS feed which return "application/rss+xml" as content type and it went well. The data useless as it was a RSS of a blog post, but went through without any issue.
That kind of source is for a RSS-like feed, which isn't what your source is. If you can't change the content type on your source (the web server, the ORDS end point) that source will not work.
And POSTMAN allowing you to see a content in various formats doesn't mean the server send you those formats. If the server only send you JSON, it's totally useless if POSTMAN can translate it into XML. BI Publisher doesn't do that!
0 -
Thanks, can you please provide some sample rss feed URL as example which I can also test please.
Also I see webservice urls in google without port number , however in BIP- it's mandatory to provide port number for a webservice end point.
Thanks,
0 -
Any website RSS feed, the first Oracle random one I found: https://asktom.oracle.com/pls/apex/asktom.newest.rss
Everything has a port, even if you don't see it: HTTP is by default 80, if you don't see it the default is used. http://google.com is the exact same thing as http://google.com:80 . HTTPS by default is 443.
0 -
-
-
The "realm" is linked with HTTP basic authentication, it isn't for a URL: https://stackoverflow.com/questions/12701085/what-is-the-realm-in-basic-authentication
0 -
Hi Gianni, Thanks, Yes you are correct, I resolved the issue by following the way you depicted:
Good this is that my ORDS API is also working fine now. I managed to get XML response for my HTTP request through some enhancement for my ORDS - Rest API.
I am also able to generate report from this data set.
Thank you again, you were always keen to help when ever one required it.
Regards,
0 -
Hello Sangeeta,
Your last comment is that you have been able to get the records from our ORDS source.
Can you confirm if the response is in XML format coming from ORDS?
If yes, how have you created the XML response.
I'm doing it as follow:
SELECT
'application/xml',
v_table.v_xml
FROM
(
SELECT
XMLELEMENT(
"ROOT",
XMLAGG(XMLELEMENT(
"ROW",
XMLFOREST(
name, surname, id
)
))
) AS v_xml
FROM
mytable
) v_table
Thanks.
0