You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Hank Bruning <ha...@jblade.com> on 2015/10/17 23:12:32 UTC

Re: Local Metadata/schema validation

Venkat,
I think the answer is using "file://" using Micheal's code example.
I have to do the exact same thing with the Redfish metadata to validate
IPv6/IPv4 addresses for the GitHub RedHelix project so if the Olingo
experts say it is not yet implemented I'd be happy to write it or test it.
One of the two.

Hank Bruning

On Tue, Oct 13, 2015 at 3:09 PM, <Ve...@dell.com> wrote:

> *Dell - Internal Use - Confidential *
>
> Hi Michael,
>
>
>
>     Thanks for your reply. But in my case, I have to get the metadata from
> OData server and validate the received metadata xml by using locally
> provided schema files for the URIs mentioned in metadata xml file.
>
>
>
> I see that in olingo, when it encounters a URI in metadata xml, it tries
> to get the file specified by URI.
>
>
>
> Ex:
>
>   <edmx:Reference Uri="*http://redfish.dmtf.org/schemas/v1/RedfishExtensions.xml
> <http://redfish.dmtf.org/schemas/v1/RedfishExtensions.xml>*">
>
>     <edmx:Include Namespace="RedfishExtensions.1.0.0" Alias="Redfish"/>
>
>     <edmx:Include Namespace="Validation.1.0.0" Alias="Validation"/>
>
>   </edmx:Reference>
>
>
>
> Olingo will try to connect to http://redfish.dmtf.org for schema
> validation.
>
>
>
> I would like to know is there any way to switch off the validation after
> getting metadata or replace http://redfish.dmtf.org with “file://” or
> http://localhost  etc.. so, that it can validate in local..
>
>
>
> Thanks,
>
> Venkat.
>
>
>
> *From:* Bolz, Michael [mailto:michael.bolz@sap.com]
> *Sent:* Tuesday, October 13, 2015 3:17 AM
> *To:* user@olingo.apache.org
> *Subject:* Re: Local Metadata/schema validation
>
>
>
> Hi Venkant,
>
>
>
> If you want to validate that the metadata file is syntactically correct
> you can read (parse) it via the ODataClient metadata reader, e.g.:
>
>             Edm edm =
> ODataClientFactory.getClient().getReader().readMetadata(getClass().getResourceAsStream("metadata.xml"));
>
>
>
> Best Regards,
>
> Michael
>
>
>
> On 12 Oct 2015, at 20:54, Venkat_Donepudi@Dell.com
> <Ve...@dell.com> wrote:
>
>
>
> *Dell - Internal Use - Confidential *
>
> Hi,
>
>
>
> I ran across a situation like I have to validate metadata schema files
> locally as my appliance /server will not have internet connection enabled.
>
>
>
> Is there any way to do on V4-beta-3 version?
>
>
>
>
>
> Regards,
>
> Venkat.
>
>
>

RE: Local Metadata/schema validation

Posted by Ve...@Dell.com.
Dell - Internal Use - Confidential
Hank,

   Thanks for your suggestion. I will try to do as you mentioned..

Thanks,
Venkat

From: Hank Bruning [mailto:hank@jblade.com]
Sent: Saturday, October 17, 2015 4:13 PM
To: user@olingo.apache.org
Subject: Re: Local Metadata/schema validation

Venkat,
I think the answer is using "file://" using Micheal's code example.
I have to do the exact same thing with the Redfish metadata to validate IPv6/IPv4 addresses for the GitHub RedHelix project so if the Olingo experts say it is not yet implemented I'd be happy to write it or test it. One of the two.
Hank Bruning

On Tue, Oct 13, 2015 at 3:09 PM, <Ve...@dell.com>> wrote:

Dell - Internal Use - Confidential
Hi Michael,

    Thanks for your reply. But in my case, I have to get the metadata from OData server and validate the received metadata xml by using locally provided schema files for the URIs mentioned in metadata xml file.

I see that in olingo, when it encounters a URI in metadata xml, it tries to get the file specified by URI.

Ex:
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions.xml">
    <edmx:Include Namespace="RedfishExtensions.1.0.0" Alias="Redfish"/>
    <edmx:Include Namespace="Validation.1.0.0" Alias="Validation"/>
  </edmx:Reference>

Olingo will try to connect to http://redfish.dmtf.org for schema validation.

I would like to know is there any way to switch off the validation after getting metadata or replace http://redfish.dmtf.org with “file://” or http://localhost  etc.. so, that it can validate in local..

Thanks,
Venkat.

From: Bolz, Michael [mailto:michael.bolz@sap.com<ma...@sap.com>]
Sent: Tuesday, October 13, 2015 3:17 AM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Re: Local Metadata/schema validation

Hi Venkant,

If you want to validate that the metadata file is syntactically correct you can read (parse) it via the ODataClient metadata reader, e.g.:
            Edm edm = ODataClientFactory.getClient().getReader().readMetadata(getClass().getResourceAsStream("metadata.xml"));

Best Regards,
Michael

On 12 Oct 2015, at 20:54, Venkat_Donepudi@Dell.com<ma...@dell.com> wrote:

Dell - Internal Use - Confidential
Hi,

I ran across a situation like I have to validate metadata schema files locally as my appliance /server will not have internet connection enabled.

Is there any way to do on V4-beta-3 version?


Regards,
Venkat.