[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5803:
---------------------------------------
thx!
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.0
>
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 2 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5803:
---------------------------------------
Use:
mvn clean install -P dev -s ../settings.xml
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.0
>
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 2 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5803:
---------------------------------------
Hello Steven,
could you maybe give me a more detailed description how to do it?
After building Teiid from folder teiiid via
mvn clean install -P dev -s settings.xml
I went into folder wildfly
mvn clean installl
than resulted in build errors
[ERROR] Failed to execute goal on project teiid-wildfly-integration: Could not resolve dependencies for project org.teiid.wildfly:teiid-wildfly-integration:jar:13.0.0-SNAPSHOT: The following artifacts could not be resolved: xalan:serializer:jar:2.7.1.jbossorg-4, org.jboss.security:jboss-negotiation-spnego:jar:3.0.6.Final, org.jboss.security:jboss-negotiation-common:jar:3.0.6.Final: Failure to find xalan:serializer:jar:2.7.1.jbossorg-4 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.0
>
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 2 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5803:
---------------------------------------
See TEIID-5818 - we are making the core Teiid build completely free of wildfly concerns by default. For now once you have built Teiid, then go into the wildfly directory and run the wildfly build from there. This effort is not complete yet, so things may change - such as new maven profiles or even a new repository location for teiid-wildfly.
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.0
>
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 2 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5803:
---------------------------------------
Hello Steven and Ramesh,
I just tried to build teiid from the cloned github sources. According to the README.md
mvn clean install -P dev -s settings.xml
should do the build. I remember that the distribution overlay for teiid-wildfly was in the past placed under
~/.m2/repository/org/teiid/wildfly/teiid-wildfly/1x.x.x-SNAPSHOT/teiid-wildfly-1x.x.x-SNAPSHOT-dist.zip
Unfortunately, under the given path I do not find an overlay anymore. Seems like the zip archive is not assembled anymore. I also do not find the archive under the path described in README.md which is teiid/build/targets
The only files there are
teiid-13.0.0-SNAPSHOT-src.zip and teiid-13.0.0-SNAPSHOT-jdbc.jar
but no overlay.
Could you please tell me how I can build the overlay zip.
And a further question as I build with
mvn clean install -P dev
on the command line, is there something like a release switch as well? What other switches are available? And what switch is preferred for a release build?
Thanks for your help.
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.0
>
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 2 months