[
https://issues.apache.org/jira/browse/OLINGO-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Bolz reassigned OLINGO-677:
-----------------------------------
Assignee: Michael Bolz
> 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-annotation, odata2-core, odata4-server
> Affects Versions: V2 2.0.3
> Reporter: Prashanth
> Assignee: Michael Bolz
> Priority: Blocker
>
> 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)