Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8960505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:40:23+00:00 2026-06-15T15:40:23+00:00

I am trying to put some data from Android to an OData Server: <edmx:Edmx

  • 0

I am trying to put some data from Android to an OData Server:

<edmx:Edmx Version="1.0">
  <edmx:DataServices m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0">
    <Schema Namespace="DBModel">
      <EntityType Name="insertData">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="double_data" Type="Edm.Double"/>
      </EntityType>
    </Schema>
    <Schema Namespace="Data">
      <EntityContainer Name="DataEntities" m:IsDefaultEntityContainer="true" p6:LazyLoadingEnabled="true">
        <EntitySet Name="insertStuff" EntityType="DBModel.insertData"/>
      </EntityContainer>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>

My method to send the data to the server:

public class DataTransmitter {
  String serviceUrl = "http://url.tld/Data.svc";
  String entitySet = "insertStuff";

  ODataJerseyConsumer c = ODataJerseyConsumer.newBuilder(serviceUrl).build();

  void sendData(double data, UUID uuid) throws Exception {
    OEntity newLocation = c.createEntity(entitySet)
        .properties(OProperties.guid("ID", uuid.toString()))
        .properties(OProperties.double_("double_data", data))
        .execute();
}

Whenever I start the Application I get the following error on adb logcat:

org.odata4j.exceptions.NotFoundException: EdmEntitySet insertStuff is not found

I guess I have to include the Namespace DBModel somehow. But I don’t know how, and can’t seem to find it in the documentation.

EDIT: I included the line ODataConsumer.dump.all(true); to see what the Client is receiving from the server. I can see the whole $metadata as shown above in the output.

I/System.out( 2984): GET http://url.tld/Data.svc/$metadata
I/System.out( 2984): Accept: application/xml
I/System.out( 2984): User-Agent: odata4j.org
I/System.out( 2984): Status: 200
I/System.out( 2984): Cache-Control: no-cache
I/System.out( 2984): Content-Length: 1455
I/System.out( 2984): Content-Type: application/xml;charset=utf-8
I/System.out( 2984): DataServiceVersion: 1.0;
I/System.out( 2984): Date: Tue, 04 Dec 2012 17:39:34 GMT
I/System.out( 2984): Server: Microsoft-IIS/7.5
I/System.out( 2984): X-Android-Received-Millis: 1354642777769
I/System.out( 2984): X-Android-Sent-Millis: 1354642777536
I/System.out( 2984): X-AspNet-Version: 4.0.30319
I/System.out( 2984): X-Content-Type-Options: nosniff
I/System.out( 2984): X-Powered-By: ASP.NET
I/System.out( 2984): <edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
I/System.out( 2984):   <edmx:DataServices m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
I/System.out( 2984):     <Schema Namespace="DBModel" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
I/System.out( 2984):       <EntityType Name="insertData">
I/System.out( 2984):         <Key>
I/System.out( 2984):           <PropertyRef Name="ID" />
I/System.out( 2984):         </Key>
I/System.out( 2984):         <Property Name="ID" Type="Edm.Guid" Nullable="false" />
I/System.out( 2984):         <Property Name="double_data" Type="Edm.Double" />
I/System.out( 2984):       </EntityType>
I/System.out( 2984):     </Schema>
I/System.out( 2984):     <Schema Namespace="Data" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
I/System.out( 2984):       <EntityContainer Name="DataEntities" m:IsDefaultEntityContainer="true" p6:LazyLoadingEnabled="true" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation">
I/System.out( 2984):         <EntitySet Name="insertStuff" EntityType="DBModel.insertData" />
I/System.out( 2984):       </EntityContainer>
I/System.out( 2984):     </Schema>
I/System.out( 2984):   </edmx:DataServices>
I/System.out( 2984): </edmx:Edmx>

So the client is able to connect to the server AND accessing the EntitySet insertStuff. But still it shows the error

E/MainActivity(  987): null
E/MainActivity(  987): org.odata4j.exceptions.NotFoundException: EdmEntitySet insertStuff is not found
E/MainActivity(  987):  at org.odata4j.edm.EdmDataServices.getEdmEntitySet(EdmDataServices.java:55)
E/MainActivity(  987):  at org.odata4j.internal.EdmDataServicesDecorator.getEdmEntitySet(EdmDataServicesDecorator.java:36)
E/MainActivity(  987):  at org.odata4j.consumer.ConsumerCreateEntityRequest.execute(ConsumerCreateEntityRequest.java:42)
.
.
.
E/MainActivity(  987):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/MainActivity(  987):  at android.os.Looper.loop(Looper.java:137)
E/MainActivity(  987):  at android.app.ActivityThread.main(ActivityThread.java:4966)
E/MainActivity(  987):  at java.lang.reflect.Method.invokeNative(Native Method)
E/MainActivity(  987):  at java.lang.reflect.Method.invoke(Method.java:511)
E/MainActivity(  987):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/MainActivity(  987):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
E/MainActivity(  987):  at dalvik.system.NativeStart.main(Native Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:40:24+00:00Added an answer on June 15, 2026 at 3:40 pm

    It seems, that this is related to the bug postet here: Issue 226: odata4j doesn’t recognize WCF-$metadata correctly

    So to fix that all I had to do is to create the odata4j-0.8.0-SNAPSHOT-clientbundle.jar based on the current odata4j sources. Because a fix is already included in the 0.8.0-SNAPSHOT (Issue 226 fix)

    Sorry about asking here before consulting the bug reports!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to put some geolocation data from Google Maps into a database. But
I'm trying to send some data from the server to the client, but the
trying to retrieve some data from the database and put in into my form.
Hey! I am trying to put some data from a textbox to an existing
I am trying to serialize some data from a form. The html: <form class=span5
Im trying to retrieve some data from JSON object which holds location information such
I am trying to wrap up some data from an array of BYTES into
I am trying to get column data from sqlLite DB and put that data
I'm trying to get some data from a PHP file which only gives a
Trying to use $SAFE=1 (just wanted to put some processing in a drb server)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.