1
votes

My MPC Provider is not fully providing metadata to the browser when called.

I am calling the service like follows:

http://SERVER/sap/opu/odata/sap/SERVICE/?$metadata

It's returning:

<app:service xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData" xml:lang="en" xml:base="http://SERVER:8000/sap/opu/odata/sap/SERVICE/">
  <app:workspace>
    <atom:title type="text">Data</atom:title>
    <app:collection sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1" href="hu_headerSet">
      <atom:title type="text">hu_headerSet</atom:title>
      <sap:member-title>hu_header</sap:member-title>
    </app:collection>
    <app:collection sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1" href="hu_itemSet">
      <atom:title type="text">hu_itemSet</atom:title>
      <sap:member-title>hu_item</sap:member-title>
    </app:collection>
  </app:workspace>
  <atom:link rel="self" href="http://SERVER:8000/sap/opu/odata/sap/SERVICE/"/>
  <atom:link rel="latest-version" href="http://SERVER:8000/sap/opu/odata/sap/SERVICE/"/>
</app:service>

I'm expecting it to return the details of the two entity sets, including the properties of the entities and the associations, which is what it should do.

I've debugged the MPC which is getting all the attributes, associations, and entities, but these are not being output when called. I'm trying to generate an EDMX to create a new App, I've done this manually before, but both of these entitysets have 40/50 fields.

I've checked SU53 and there's no failed Authorzations, I've cleared the cache every time that I've done a debug to make sure it's not that, and I've set the get_entity calls in the MPC to protected as a test.

Does anyone have any ideas? For those who are more successful, here is a resource with some suggestions that I've already tried: https://blogs.sap.com/2016/06/15/entityset-of-an-odata-not-appearing-in-metadata/

1

1 Answers

5
votes

Use

http://SERVER/sap/opu/odata/sap/SERVICE/$metadata

without the '?'

The responses are different.