[
https://issues.apache.org/jira/browse/OLINGO-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13896576#comment-13896576
]
Michael Bolz commented on OLINGO-152:
-------------------------------------
Hi Dhaval,
the posted first few lines looks good and if I just complete the XML it doesn't
get the posted Exception.
For me it is puzzling that the EOF occurs at char {{26}}.
Could you please remove the {{Woodstox}} parser and use the Java provided
parser and test again?
This can be configured via:
{code}
System.setProperty("javax.xml.stream.XMLInputFactory",
"com.sun.xml.internal.stream.XMLInputFactoryImpl");
System.setProperty("javax.xml.stream.XMLOutputFactory",
"com.sun.xml.internal.stream.XMLOutputFactoryImpl");
{code}
Metadata XML:
{code}
<edmx:Edmx Version="1.0"
xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices m:DataServiceVersion="1.0"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Schema Namespace="cddsdata"
xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
</Schema>
</edmx:DataServices>
</edmx:Edmx>
{code}
> ODAta Client not working
> -------------------------
>
> Key: OLINGO-152
> URL: https://issues.apache.org/jira/browse/OLINGO-152
> Project: Olingo
> Issue Type: Bug
> Components: odata2-documentation
> Reporter: dhaval gupta
> Assignee: Michael Bolz
> Attachments: CopyOfOlingoSampleApp.java
>
>
> Hi,
> 3-4 days back I found the attached programme of the standalone java client to
> connect to the olingo restful service and retrieve data on olingo
> documentation page. I implemented it but when I try to retrieve data I get
> the below expception.
> Exception in thread "main"
> org.apache.olingo.odata2.api.ep.EntityProviderException:
> com.ctc.wstx.exc.WstxEOFException: in xml declaration
> at [row,col {unknown-source}]: [1,26]
> at
> org.apache.olingo.odata2.core.commons.XmlHelper.createStreamReader(XmlHelper.java:58)
> at
> org.apache.olingo.odata2.core.edm.provider.EdmxProvider.parse(EdmxProvider.java:50)
> at com.test.OlingoSampleApp.readEdm(OlingoSampleApp.java:193)
> at com.test.OlingoSampleApp.main(OlingoSampleApp.java:102)
> Caused by: com.ctc.wstx.exc.WstxEOFException: in xml declaration
> at [row,col {unknown-source}]: [1,26]
> at
> com.ctc.wstx.io.ReaderBootstrapper.loadMore(ReaderBootstrapper.java:273)
> at
> com.ctc.wstx.io.ReaderBootstrapper.nextChar(ReaderBootstrapper.java:385)
> at
> com.ctc.wstx.io.ReaderBootstrapper.checkKeyword(ReaderBootstrapper.java:330)
> at
> com.ctc.wstx.io.InputBootstrapper.readXmlEncoding(InputBootstrapper.java:352)
> at
> com.ctc.wstx.io.InputBootstrapper.readXmlDecl(InputBootstrapper.java:288)
> at
> com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:155)
> at
> com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:531)
> at
> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:585)
> at
> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:610)
> at
> com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:316)
> at
> org.apache.olingo.odata2.core.commons.XmlHelper.createStreamReader(XmlHelper.java:44)
> ... 3 more
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)