Skip to Content
author's profile photo Former Member
Former Member

SMP3 - Error Create Request

Hi All,

I use Sap Mobile Plateform 3 iOS SDK SP06 PL08 and I try to do a create request.

I have already call a create request with successfully, but an other create request doesn't work.

I have a request called "work" that is working fine and a request called "notif" that doesn't work.

I know the payload expected by the server haven't a same format between both and I can't find the right way to write the right code to call the second web-service.

The request "work" expected this payload :

and my code is :


SODataEntityDefault *entity = [[SODataEntityDefault alloc] initWithType:@"etwork"];

[self addPropertyWithName:@"Type" andValue:work.type toEntity:entity];

[self addPropertyWithName:@"NumId" andValue:wor.numId toEntity:entity];

[self.onlineStore scheduleCreateEntity:entity collectionPath:@"etworkSet" options:nil completion:completionBlock];

This is working fine.

But the request "notif" expected this payload :

and my code is :

SODataEntityDefault *entity = [[SODataEntityDefault alloc] initWithType:@"etnotif"];

[self addPropertyWithName:@"NotifId" andValue:notif.notifId toEntity:entity];

[self addPropertyWithName:@"NotifNo" andValue:notif.notifNo toEntity:entity];

[self.onlineStore scheduleCreateEntity:entity collectionPath:@"etnotifSet" options:nil completion:completionBlock];

And this doesn't work.

I note that the payload for "notif" contains an additional line:

<link href="etnotifSet('1e5w4554w')/navnotiftxtSet"

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/navnotiftxtSet"

type="application/atom+xml;type=feed"

title="navnotiftxtSet" />

But I don't know how the set it in the SMP framework. I must use the options? How to do ?

Regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 28, 2015 at 01:51 PM

    First off can you let us know how your OData is implemented?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 04, 2016 at 06:25 AM

    Hi Julien,

    Do you able to solve the problem? i'm having the same issue. Please help.

    my case open with below.

    http://scn.sap.com/thread/3871911

    Regards

    Choong

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.