I suggest you ...

Associations not working with SAP Netweaver Gateway Services

I have been testing SAP Netweaver Gateway Services with the Sesame Data Browser and noticed that when the associations are enabled I get the following exception.

System.InvalidOperationException: [NoMatch]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60831.0&File=System.Core.dll&Key=NoMatch
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
at Sesame.Providers.OData.Models.ODataConnection.b.a.c(a A_0)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Sesame.Providers.OData.Models.ODataConnection.b.h(ab A_0)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Sesame.Providers.OData.Models.ODataConnection.ah(String A_0, Boolean A_1, EntityType A_2, EntityType A_3, Nullable`1 A_4, Nullable`1& A_5, String& A_6)
at Sesame.Providers.OData.Models.ODataConnection.m.c(Object A_0, OpenReadCompletedEventArgs A_1)

Sample metadata for the Gateway service

EntityType Name="Supplier" sap:content-version="1">
<Key>
<PropertyRef Name="SupplierID"/>
</Key>
<Property Name="SupplierID" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Name" sap:filterable="false"/>
<Property Name="Name" Type="Edm.String" MaxLength="40" sap:label="Name" sap:filterable="false" m:FC_TargetPath="SyndicationTitle" m:FC_KeepInContent="false"/>
..
<NavigationProperty Name="Products" Relationship="ZNWGWSAMP.Product_Supplier_Supplier_Products" FromRole="ToRole_Supplier_Product" ToRole="FromRole_Product_Supplier"/>
</EntityType>

<Association Name="Product_Supplier_Supplier_Products" sap:content-version="1">
<End Type="ZNWGWSAMP.Product" Multiplicity="*" Role="FromRole_Product_Supplier"/>
<End Type="ZNWGWSAMP.Supplier" Multiplicity="1" Role="ToRole_Supplier_Product"/>
</Association>

<AssociationSet Name="AssocSet_Product_Supplier_Supplier_Products" Association="ZNWGWSAMP.Product_Supplier_Supplier_Products" sap:content-version="1">
<End EntitySet="Products" Role="FromRole_Product_Supplier"/>
<End EntitySet="Suppliers" Role="ToRole_Supplier_Product"/>
</AssociationSet>

And the metadata from a similar service which works

<EntityType Name="Supplier">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
<Property Name="Name" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text" m:FC_KeepInContent="true"/>
..
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Supplier_Supplier_Products" FromRole="Supplier_Products" ToRole="Product_Supplier"/>
</EntityType>

<Association Name="Product_Supplier_Supplier_Products">
<End Role="Product_Supplier" Type="ODataDemo.Product" Multiplicity="*"/>
<End Role="Supplier_Products" Type="ODataDemo.Supplier" Multiplicity="0..1"/>
</Association>

<AssociationSet Name="Products_Supplier_Suppliers" Association="ODataDemo.Product_Supplier_Supplier_Products">
<End Role="Product_Supplier" EntitySet="Products"/>
<End Role="Supplier_Products" EntitySet="Suppliers"/>
</AssociationSet>

Any thoughts?
Cheers
John Patterson

4 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    John Patterson shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base