[ https://issues.apache.org/jira/browse/OLINGO-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155026#comment-16155026 ]
Song, Chuning commented on OLINGO-1175: --------------------------------------- Hi Gayathri, This makes my preposition stand more solid. You see that {color:red}Not a JSON Object: "<html"{color}, and this proves that the InputStream obtained is an HTML document instead of XML. I suspect it being the login page of NetWeaver client. Regarding _How come a collection iteration passes for how many ever times I run, but a monitor fails._, I would assume the server somehow *recognised* your PC, either from passing you with a cookie or remembering your IP address. Therefore, the authentication layer of NetWeaver is transparent to the request originated from your local PC, hence as well as the browser and JVM running on your local PC. However, when we move the production environment to a *foreign* entity (such as the monitor container of postman, running on cloud), the NetWeaver client fails to authenticate this entity, hence responded with a login prompt page. I assume the *memory* of NetWeaver expires after a certain timespan, so occasionally you will see this error on your local PC as well. Regarding _how to go further_, handling authentication is very complex and it's subject to various factors such as the authentication method being employed by your server (such as Kerberos, OAuth, NTLM etc). I suppose there's nothing inherently wrong with your client side code, and I'd recommend you focus on the NetWeaver server. I am unfamiliar with the ABAP stack, so I can't help you with that. Cheers, Chuning P.S. Just in case thought I'd ask. Have you handled this basic authentication in your Olingo client logic? > 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: ApplicationError.png, ApplicationError.png, > ErrorInMonitor.png, ErrorRunningInAPI.png, IndividualRun_TestPass.png, > metadata.xml, NotJSON.jpg, 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)