Open GoogleCodeExporter opened 8 years ago
Tony, mind taking a look at this?
Original comment by john.spurlock
on 15 Jan 2012 at 10:57
sure...(several minutes later): the attached metadata is not valid CSDL. Line
5 is incorrect syntax for specifying a collection:
It shows: <Property Name="Row" Nullable="false"
Type="Collection(tns.MultiStringRow)" />
The correct way is:
<Property Name="Row" Nullable="false" Type="tns.MultiStringRow"
CollectionKind="None|Bag|List" />
Is this metadata from a real service? How is the producer implemented? Is
this one of those "we need to be lenient in our implementation" type scenarios?
Original comment by tony.ro...@gmail.com
on 17 Jan 2012 at 6:12
I am also facing a similar issue. My service exposes as CSDL 2.0. I have a
nested complex structure in one of my EntityTypes which is multivalued.
<Property CollectionKind="List" Name="ValueDetails" Type="myns.ValueDetails"/>
<ComplexType Name="ValueDetails">
<Property Name="Value" Type="Edm.String"/>
<Property Name="Timestamp" Type="Edm.DateTime"/>
</ComplexType>
This internal collection of complex type looks like:
<d:ValueDetails>
<d:element>
<d:Value>10</d:Value>
<d:Timestamp>2012-09-07T15:25:04.535+05:30</d:Timestamp>
</d:element>
</d:ValueDetails>
But when I do getEntities on this EntityType, I get the following Exception:
Exception in thread "main" java.lang.RuntimeException:
java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Expected a
text token, got START_ELEMENT.
at [row,col {unknown-source}]: [16,11]
at org.core4j.ReadOnlyIterator.hasNext(ReadOnlyIterator.java:50)
at org.core4j.Enumerable$FuncIterator.hasNext(Enumerable.java:482)
at org.core4j.Enumerable$FuncIterator.hasNext(Enumerable.java:482)
at com.ca.garan10.odata.ODataClient.main(ODataClient.java:32)
Caused by: java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException:
Expected a text token, got START_ELEMENT.
at [row,col {unknown-source}]: [16,11]
at org.odata4j.core.Throwables.propagate(Throwables.java:8)
at org.odata4j.stax2.staximpl.StaxXMLFactoryProvider2$StaxXMLEventReader2.getElementText(StaxXMLFactoryProvider2.java:90)
at org.odata4j.format.xml.AtomFeedFormatParser.parseProperties(AtomFeedFormatParser.java:205)
at org.odata4j.format.xml.AtomFeedFormatParser.parseDSAtomEntry(AtomFeedFormatParser.java:249)
at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:360)
at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:155)
at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:143)
at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:1)
at org.odata4j.jersey.consumer.ConsumerQueryEntitiesRequest$EntryIterator.advance(ConsumerQueryEntitiesRequest.java:81)
at org.core4j.ReadOnlyIterator.hasNext(ReadOnlyIterator.java:48)
... 3 more
Caused by: com.ctc.wstx.exc.WstxParsingException: Expected a text token, got
START_ELEMENT.
at [row,col {unknown-source}]: [16,11]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:605)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
at com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:677)
at com.ctc.wstx.evt.WstxEventReader.getElementText(WstxEventReader.java:118)
at org.odata4j.stax2.staximpl.StaxXMLFactoryProvider2$StaxXMLEventReader2.getElementText(StaxXMLFactoryProvider2.java:88)
... 11 more
Original comment by gvnan...@gmail.com
on 7 Sep 2012 at 10:07
Original issue reported on code.google.com by
kisel.ev...@gmail.com
on 19 Dec 2011 at 10:30Attachments: