cancel
Showing results for 
Search instead for 
Did you mean: 

SMP3 - Error Create Request

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

kenichi_unnai
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hi Kenichi,

I asked at back-end manager, here is his response:

As we have a  structure and table data to be inserted we have redefined the method CREATE_DEEP_ENTITY in DPC class in ODATA and written code to align the functionality.

If that is not enough, please tell me exactly what you need.

Best regards.

kenichi_unnai
Advisor
Advisor
0 Kudos

Okie that tells us quite a few things.

- The service was implemented in SAP Gateway

- The service you want to use is Deep Insert operation

First off have a read of this doc:

And jump to the page 28 to test out your deep insert service via REST client as instructed.

If you're working with the online store, it is fairly straightforward to execute deep insert, while if you need to run it with offline store, have a read the QA here: #10 SMP3 OData SDK for iOS - Offline APIs