You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Chandan V.A (JIRA)" <ji...@apache.org> on 2015/07/04 14:50:05 UTC

[jira] [Resolved] (OLINGO-677) Unable to create entity with absolute path in href attrbute of links

     [ https://issues.apache.org/jira/browse/OLINGO-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chandan V.A resolved OLINGO-677.
--------------------------------
       Resolution: Fixed
    Fix Version/s: V2 2.0.5

Hi Prashanth,
The issue is fixed with commit - http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/9a7e9135

Thanks
Kind Regards
Chandan

> Unable to create entity with absolute path in href attrbute of links
> --------------------------------------------------------------------
>
>                 Key: OLINGO-677
>                 URL: https://issues.apache.org/jira/browse/OLINGO-677
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.3
>            Reporter: Prashanth
>            Assignee: Chandan V.A
>            Priority: Blocker
>             Fix For: V2 2.0.5
>
>
> We are trying to create an entity having links with absolute path in href attribute but its failing because of absolute path.
> Actual Problem :
> When input contains link with absolute url , response is 404.
> Ex :
> <link href="http://localhost:8080/odataweb/odata.svc/Containers(1)" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ContainerDetails" title="ContainerDetails" type="application/atom+xml;type=feed"/>
> When input contains link with relative url , response is 201 created.
> Ex :
> <link href="Containers(1)" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ContainerDetails" title="ContainerDetails" type="application/atom+xml;type=feed"/>
> Need to resolved : Olingo should process requesst successfully irrespective of the link href path ( absolute or relative )
> Following are not working and working cases :
> 1) Not Working Example input :
> <?xml version='1.0' encoding='utf-8'?>
> <entry 
>     xmlns="http://www.w3.org/2005/Atom" 
>     xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
>     xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://localhost:8080/odataweb/odata.svc/">
>       <title type="text">ContainerEvents</title>
>     <category term="CASM-JPA.ContainerEvent" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
>       <link href="http://localhost:8080/odataweb/odata.svc/Containers(1)" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ContainerDetails" title="ContainerDetails" type="application/atom+xml;type=feed"/>
>     <content type="application/xml">
>         <m:properties>
>             <d:Evt>test_14</d:Evt>
>             <d:Id>60</d:Id>
>             <d:Value>test_14</d:Value>
>         </m:properties>
>     </content>
> </entry>
> Output :
> 404 Error with following response .
> <?xml version='1.0' encoding='UTF-8'?>
> <error 
>     xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
>     <code/>
>     <message xml:lang="en-US">Could not find container with name: 'http://localhost:8080/odataweb/odata'.</message>
> </error>
> 2) Working Example input :
> <?xml version='1.0' encoding='utf-8'?>
> <entry 
>     xmlns="http://www.w3.org/2005/Atom" 
>     xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
>     xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://localhost:8080/odataweb/odata.svc/">
>       <title type="text">ContainerEvents</title>
>     <category term="CASM-JPA.ContainerEvent" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
>     <link href="Containers(1)" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ContainerDetails" title="ContainerDetails" type="application/atom+xml;type=feed"/>
>     <content type="application/xml">
>         <m:properties>
>             <d:Evt>test_14</d:Evt>
>             <d:Id>14</d:Id>
>             <d:Value>test_14</d:Value>
>         </m:properties>
>     </content>
> </entry>
> Output :
> 201 Created and the response includes the entity created.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)