You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "Poindexter, Miles" <Mi...@condenast.com> on 2014/10/02 17:50:51 UTC

Olingo and URLs in data

I have an OData service working with Olingo except for one major glitch.
There is a property called "Link" in the Entity I've created.
The value of this is a URL.

if the Link property is included, olingo shows no results and just gives
this error:  
<error 
xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en-US">An exception occurred.</message>
</error>
If I take out the data by hiding that property, then everything works fine.
I've tried XML encoding the data, and even removing the http:// from the
beginning of the string.

Here is a sample of the data:
RAW:
http://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&w=1000&h
=1000&url=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2
F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.jp
g%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.jp
g&cfs=1

XML ENCODED:
http://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&amp;w=10
00&amp;h=1000&amp;url=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommo
ns%2Fthumb%2F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05-
2006%2529.jpg%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05-
2006%2529.jpg&amp;cfs=1

I'm at a loss trying to figure out why olingo does not like this data.
Can anyone help?


miles
-- 
Miles Poindexter
Condé Nast
Service Oriented Architecture
miles_poindexter@condenast.com
347-967-8944 / 212-790-6692






AW: Olingo and URLs in data

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Miles,

I will take a look into your issue.
For me it would be very helpful if you create an issue at https://issues.apache.org/jira/browse/OLINGO for this and provide following information:
- Version of Apache Olingo which you are using
- Metadata document of your service

Kind regards,
Michael

________________________________________
Von: Poindexter, Miles [Miles_Poindexter@condenast.com]
Gesendet: Donnerstag, 2. Oktober 2014 18:25
An: user@olingo.apache.org
Betreff: Re: Olingo and URLs in data

specifically, it does not like this part of the url:
http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2
F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.jp
g%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.jp
g&cfs=1

if I shorten the url to:
https://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&amp;w=1
000&amp;h=1000&amp;url=

that url works fine.

But others still fail.

So, on the hunch that Olingo is seeing the http:// and thinking it needs
to do something special with it behind the scenes, even though the data
type is String, I ALSO removed the "http://" from the beginning of the
string, and this allows all Entities to show up without problems.

Is there something I should be doing to get Olingo to allow URLs in String
type properties?

Also, looking at EdmTypes, I don't see a URL type for a property, but
maybe I missed it?



miles

--
Miles Poindexter
Condé Nast
Service Oriented Architecture
miles_poindexter@condenast.com
347-967-8944 / 212-790-6692







On 10/2/14, 11:50 AM, "Poindexter, Miles" <Mi...@condenast.com>
wrote:

>I have an OData service working with Olingo except for one major glitch.
>There is a property called "Link" in the Entity I've created.
>The value of this is a URL.
>
>if the Link property is included, olingo shows no results and just gives
>this error:
><error
>xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
><code/>
><message xml:lang="en-US">An exception occurred.</message>
></error>
>If I take out the data by hiding that property, then everything works
>fine.
>I've tried XML encoding the data, and even removing the http:// from the
>beginning of the string.
>
>Here is a sample of the data:
>RAW:
>http://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&w=1000&
>h
>=1000&url=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%
>2
>F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.j
>p
>g%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.j
>p
>g&cfs=1
>
>XML ENCODED:
>http://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&amp;w=1
>0
>00&amp;h=1000&amp;url=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcomm
>o
>ns%2Fthumb%2F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05
>-
>2006%2529.jpg%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05
>-
>2006%2529.jpg&amp;cfs=1
>
>I'm at a loss trying to figure out why olingo does not like this data.
>Can anyone help?
>
>
>miles
>--
>Miles Poindexter
>Condé Nast
>Service Oriented Architecture
>miles_poindexter@condenast.com
>347-967-8944 / 212-790-6692
>
>
>
>
>

Re: Olingo and URLs in data

Posted by "Poindexter, Miles" <Mi...@condenast.com>.
specifically, it does not like this part of the url:
http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2
F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.jp
g%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.jp
g&cfs=1

if I shorten the url to:
https://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&amp;w=1
000&amp;h=1000&amp;url=

that url works fine.

But others still fail.

So, on the hunch that Olingo is seeing the http:// and thinking it needs
to do something special with it behind the scenes, even though the data
type is String, I ALSO removed the "http://" from the beginning of the
string, and this allows all Entities to show up without problems.

Is there something I should be doing to get Olingo to allow URLs in String
type properties?

Also, looking at EdmTypes, I don't see a URL type for a property, but
maybe I missed it?



miles

-- 
Miles Poindexter
Condé Nast
Service Oriented Architecture
miles_poindexter@condenast.com
347-967-8944 / 212-790-6692







On 10/2/14, 11:50 AM, "Poindexter, Miles" <Mi...@condenast.com>
wrote:

>I have an OData service working with Olingo except for one major glitch.
>There is a property called "Link" in the Entity I've created.
>The value of this is a URL.
>
>if the Link property is included, olingo shows no results and just gives
>this error:  
><error 
>xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
><code/>
><message xml:lang="en-US">An exception occurred.</message>
></error>
>If I take out the data by hiding that property, then everything works
>fine.
>I've tried XML encoding the data, and even removing the http:// from the
>beginning of the string.
>
>Here is a sample of the data:
>RAW:
>http://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&w=1000&
>h
>=1000&url=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%
>2
>F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.j
>p
>g%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05-2006%2529.j
>p
>g&cfs=1
>
>XML ENCODED:
>http://fbexternal-a.akamaihd.net/safe_image.php?d=AQAiXj9McXNAoenV&amp;w=1
>0
>00&amp;h=1000&amp;url=http%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcomm
>o
>ns%2Fthumb%2F9%2F9e%2FDebating_chamber%252C_Scottish_Parliament_%252831-05
>-
>2006%2529.jpg%2F720px-Debating_chamber%252C_Scottish_Parliament_%252831-05
>-
>2006%2529.jpg&amp;cfs=1
>
>I'm at a loss trying to figure out why olingo does not like this data.
>Can anyone help?
>
>
>miles
>-- 
>Miles Poindexter
>Condé Nast
>Service Oriented Architecture
>miles_poindexter@condenast.com
>347-967-8944 / 212-790-6692
>
>
>
>
>