on ‎2018 Sep 07 1:05 AM
Anyone successfully replicate the webinar steps in 1808? The 3rd one on this page? https://wiki.hybris.com/display/km/Commerce+Release+1808+Internal+Enablement+Webinars
The metadata for ExampleProduct looks like this. Is this right? When I submit to it, it complains about "name"
ERROR [hybrisHTTP18] [DefaultODataProcessor] Exception while creating entity of type Product org.apache.olingo.odata2.api.ep.EntityProviderException: Illegal argument for method call with message 'name'.
Here's my metadata. Any thoughts?
<edmx:DataServices m:DataServiceVersion="1.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Schema Namespace="HybrisCommerceOData" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
<EntityType Name="Product">
<Key>
<PropertyRef Name="integrationKey"/>
</Key>
<Property Name="name" Type="Edm.String" IsLanguageDependent="true" Nullable="true"/>
<Property Name="code" Type="Edm.String" IsUnique="true" Nullable="false"/>
<Property Name="integrationKey" Type="Edm.String" Nullable="false" Alias="CatalogVersion_version|Catalog_id|Product_code"/>
<NavigationProperty Name="catalogVersion" Relationship="HybrisCommerceOData.FK_Product_CatalogVersion" FromRole="Product" ToRole="CatalogVersion" IsUnique="true" Nullable="false"/>
<NavigationProperty Name="unit" Relationship="HybrisCommerceOData.FK_Product_Unit" FromRole="Product" ToRole="Unit" Nullable="true"/>
</EntityType>
<EntityType Name="Catalog">
<Key>
<PropertyRef Name="integrationKey"/>
</Key>
<Property Name="id" Type="Edm.String" IsUnique="true" Nullable="false"/>
<Property Name="integrationKey" Type="Edm.String" Nullable="false" Alias="Catalog_id"/>
</EntityType>
<EntityType Name="Unit">
<Key>
<PropertyRef Name="integrationKey"/>
</Key>
<Property Name="code" Type="Edm.String" IsUnique="true" Nullable="false"/>
<Property Name="integrationKey" Type="Edm.String" Nullable="false" Alias="Unit_code"/>
</EntityType>
<EntityType Name="CatalogVersion">
<Key>
<PropertyRef Name="integrationKey"/>
</Key>
<Property Name="version" Type="Edm.String" IsUnique="true" Nullable="false"/>
<Property Name="integrationKey" Type="Edm.String" Nullable="false" Alias="CatalogVersion_version|Catalog_id"/>
<NavigationProperty Name="catalog" Relationship="HybrisCommerceOData.FK_CatalogVersion_Catalog" FromRole="CatalogVersion" ToRole="Catalog" IsUnique="true" Nullable="false"/>
</EntityType>
<Association Name="FK_Product_CatalogVersion">
<End Type="HybrisCommerceOData.Product" Multiplicity="0..1" Role="Product"/>
<End Type="HybrisCommerceOData.CatalogVersion" Multiplicity="0..1" Role="CatalogVersion"/>
</Association>
<Association Name="FK_Product_Unit">
<End Type="HybrisCommerceOData.Product" Multiplicity="0..1" Role="Product"/>
<End Type="HybrisCommerceOData.Unit" Multiplicity="0..1" Role="Unit"/>
</Association>
<Association Name="FK_CatalogVersion_Catalog">
<End Type="HybrisCommerceOData.CatalogVersion" Multiplicity="0..1" Role="CatalogVersion"/>
<End Type="HybrisCommerceOData.Catalog" Multiplicity="0..1" Role="Catalog"/>
</Association>
<EntityContainer Name="Container" m:IsDefaultEntityContainer="true">
<EntitySet Name="Products" EntityType="HybrisCommerceOData.Product"/>
<EntitySet Name="Catalogs" EntityType="HybrisCommerceOData.Catalog"/>
<EntitySet Name="Units" EntityType="HybrisCommerceOData.Unit"/>
<EntitySet Name="CatalogVersions" EntityType="HybrisCommerceOData.CatalogVersion"/>
<AssociationSet Name="Product_CatalogVersions" Association="HybrisCommerceOData.FK_Product_CatalogVersion">
<End EntitySet="Products" Role="Product"/>
<End EntitySet="CatalogVersions" Role="CatalogVersion"/>
</AssociationSet>
<AssociationSet Name="Product_Units" Association="HybrisCommerceOData.FK_Product_Unit">
<End EntitySet="Products" Role="Product"/>
<End EntitySet="Units" Role="Unit"/>
</AssociationSet>
<AssociationSet Name="CatalogVersion_Catalogs" Association="HybrisCommerceOData.FK_CatalogVersion_Catalog">
<End EntitySet="CatalogVersions" Role="CatalogVersion"/>
<End EntitySet="Catalogs" Role="Catalog"/>
</AssociationSet>
</EntityContainer>
</Schema>
</edmx:DataServices>
Request clarification before answering.
can you guys post the webinar and impex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It turns out there was nothing wrong with my setup above, but my post was wrong. Be sure to add your admin/nimda basic credentials, and also here is request which works. Post to: https://localhost:9002/odata2webservices/ExampleProduct/Products { "code": "test_product", "name": "Product 1 new name", "catalogVersion": { "catalog": { "id": "Default" }, "version": "Staged" } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.