On 26/05/2014 12:14, Klevenz, Stephan wrote:
Hi,
I have implemented a first integration test [1] using the client code to read
service document and metadata from the server side implementation. It works
pretty cool except one issue.
The metadata contains a reference uri and during deserialization this link is
requested and results in an exception due to incomplete proxy settings. Well, I
can correct my proxy settings of course but want also to ask if there is a way
to configure client not to follow links in metadata?
Hi Stephan,
there is currently no such option, but it could be done by:
1. adding setFollowEdmReferences(boolean) / isFollowEmdReferences() to
V4's Configuration [2]
2. checking Configuration#isFollowEdmReferences() before processing
external references in XMLMetadataRequestImpl#execute [3]
Anyway, I am actually not sure it would be correct: after all, an Edm
document that declares external reference(s) is likely to have some
unresolved elements in it, if client is not following the external
references.
WDYT?
Regards.
<edmx:Edmx Version="4.0">
<Reference
Uri="http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml">
<Include Namespace="Org.OData.Core.V1" Alias="Core"/>
</Reference>
<edmx:DataServices>
[1]
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=tree;f=fit/src/test/java/org/apache/olingo/fit/tecsvc;h=dadbedfacccbb63e0575c5112e91d21d41a6ae9e;hb=olingo-266-tecsvc
[2]
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=blob;f=lib/client-api/src/main/java/org/apache/olingo/client/api/v4/Configuration.java
[3]
https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=blob;f=lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/v4/XMLMetadataRequestImpl.java
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/