olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Song, Chuning (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OLINGO-1175) Unable to Read metadata
Date Tue, 05 Sep 2017 10:36:00 GMT

    [ https://issues.apache.org/jira/browse/OLINGO-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153431#comment-16153431
] 

Song, Chuning edited comment on OLINGO-1175 at 9/5/17 10:35 AM:
----------------------------------------------------------------

Hi Gayathri,

Ha! This looks like an HTML file instead of the JSON/XML data we are expecting. 

I'm speculating, that sometimes, the SAML authentication fails for some reasons. HttpClient
then fetches the login prompt page instead of the metadata. 

Could you please check the underlying logics under this authentication instead of OData code
blocks. I think the issue roots from authentication instead of Olingo related logics.Or alternatively,
before parsing the InputStream as OData-compliant data, check if it's actually OData compliant.


Have you handled this SAML authentication in your code? Since both your browser (Chrome for
example) or Postman will defer this authentication to your system certificate manager, but
if you don't handle it correctly in your code, JVM will have no idea how it should handle
this issue. 

Cheers,
Chuning




was (Author: chuning.song@sap.com):
Hi Gayathri,

Ha! This looks like an HTML file instead of the JSON/XML data we are expecting. 

I'm speculating, that sometimes, the SAML authentication fails for some reasons. HttpClient
then fetches the login prompt page instead of the metadata. 

Could you please check the underlying logics under this authentication instead of OData code
blocks. I think the issue roots from authentication instead of Olingo related logics.Or alternatively,
before parsing the InputStream as OData-compliant data, to check if it's actually OData compliant.


Cheers,
Chuning



> Unable to Read metadata
> -----------------------
>
>                 Key: OLINGO-1175
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1175
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.9
>         Environment: WINDOWS 7
>            Reporter: Gayathri Ramachandran
>            Priority: Blocker
>              Labels: V2, olingo
>         Attachments: ErrorInMonitor.png, ErrorRunningInAPI.png, IndividualRun_TestPass.png,
metadata.xml, TestPass_CollectionRunner.png, Tried running in Postman.png, V2_XML_Parse_Exception.jpg
>
>
> Hi All ,
> The description of issue is as below : 
> Component : Olingo-odata2-api-2.0.9-SNAPSHOT.jar
> Operation: Read (de-serialize) data from metadata i.e inputStream and provide Edm 
> Issue: Unable to read metadata. 
> I'm consuming a C4C Odata using Olingo-odata2-api-2.0.9. The client was developed by
me on May 2017 and was well tested and in use for almost 3 months. For some business reasons,
we have not been running the java client since August 2017. 
> Today, while I tried to tun the JAR file I encountered the below exception:
> Exception in thread "main" org.apache.olingo.odata2.api.ep.EntityProviderException: An
exception of type 'XMLStreamException' occurred.
> at org.apache.olingo.odata2.core.ep.consumer.XmlMetadataConsumer.readMetadata(XmlMetadataConsumer.java:122)
> I'm unable to figure out what has gone wrong. I checked the metaData in a browser and
it slloks fine (the URI is password protected) I can guide you when we proceed further.
> https://my326642.crm.ondemand.com/sap/c4c/odata/cust/v1/mstr_bp/$metadata
> Having met the business functionality, I just don't want to try again from scratch using
other API's. Hence I request you kindly to support on this as this is really critical, 
> Thanks
> Gayathri



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message