cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring APNS for OData

Former Member
0 Kudos

Architecture:-

SAP >> Net weaver Gateway >> OData >> SMP 2.3 SP 2 >> iOS

Scenario:-

We have configured APNS in SCC and enabled Notification in XCode. We are able to register the user and see the "APNS Device Token" in SCC.

We have also successfully subscribed for the required Entity in OData.

(Case: a) We triggered the Push Notification from SAP.

(Case: b) We also tried to invoke the Notification from a Firefox REST Client.

                    URL: http://<SMP HOST>:<PORT>/GWC/SUPNotification/<Application Connection ID>/<User Name>@<Security Config>/Application ID/Domain

                    Method Type: POST

Problem:-

We are unable to get Notifications to the device, when we send a Notifications from SAP or the REST Client.

Observation:-

(Case: a) We encounter an error in SAP Net weaver Gateway. Error: "405 - Method not allowed"

(Case: b) We encounter an error in REST Client. Error: "403 - User not in required Role"


Note:-

We found a Known issue in Infocentre, in regards to Configuring APNS for OData (ref. RTC-155). Here they say the work around for this is to use "admin" Security Config, but we are already using the same.


Request anyone to assist me on this issue.


Thanks in advance,

Nirumal Thomas.

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member196814
Active Participant
0 Kudos

Hi Nirumal,

I am also reeving same type of error in SMP 2.3.5 HWC apps enabled with WFDCN functionality.

[ErrorCode:5616] [NativeErrorCode:0] [Message:Object Name: 'SUP'] [Detail:The named MOCA object was not registered on the device.] [Source:moCA.cpp 1601.] [RequestID:3213]



Please share your experience on this and if you were able to resolve this then please share the solution.



Thanks & Regards

Rahul

Former Member
0 Kudos

So i have checked and found that all the ports are in-fact open.

What else could be wrong? Any Ideas?

Thanks in advance,

Nirumal.

Former Member
0 Kudos

Lets see if the notification ever makes it to your device, and in what format if it does.

You can enable device side logging for APNs by following these instructions:

https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376...

Thanks,

Andrew.

Former Member
0 Kudos

Hi,

Currently we are successfully able to Push a Notification from SAP to SMP. We are even able to see in the Server Logs, that the Notification has been sent from SMP.

But we are still unable to receive the Notification to our device.

Any idea what has been missed out. We are not seeing any errors in the SMP Server logs or the Device Console.

Thanks

Nirumal.

Former Member
0 Kudos

We are able to see an error in a file in the following path in SMP Server;

Path: /logs/DroppedMessages/

Message:-

Found request for SUP:Message  Parameter Header (DT_EMPTY) = [unimplemented formatting]  Parameter Data (DT_BINARY) = 7B22626F6479223A22222C2268656164657273223A7B22486F7374223A2231302E3230332E3134382E38323A38303030222C22557365722D4167656E74223A224D6F7A696C6C612F352E30202857696E646F7773204E5420362E313B2072763A31322E3029204765636B6F2F32303130303130312046697265666F782F31322E30222C22416363657074223A22746578742F68746D6C2C6170706C69636174696F6E2F7868746D6C2B786D6C2C6170706C69636174696F6E2F786D6C3B713D302E392C2A2F2A3B713D302E38222C224163636570742D456E636F64696E67223A22677A69702C206465666C617465222C22436F6E6E656374696F6E223A226B6565702D616C697665222C22436F6E74656E742D4C656E677468223A2230222C22436F6E74656E742D54797065223A22746578742F706C61696E3B20636861727365743D5554462D38222C22507261676D61223A226E6F2D63616368652C206E6F2D6361636865222C2243616368652D436F6E74726F6C223A226E6F2D63616368652C206E6F2D6361636865222C22417574686F72697A6174696F6E223A2242617369632063335A6A4C6D7874583256755A7A7068596D4E414E445532222C22436F6F6B6965223A224A53455353494F4E49443D626C75646133663232636671227D2C22436F52656C6174696F6E4964223A223638585437524C55227D;Error: [ErrorCode:5616] [NativeErrorCode:0] [Message:Object Name: 'SUP'] [Detail:The named MOCA object was not registered on the device.] [Source:moCA.cpp 1601.] [RequestID:3213]

Any Idea what this error is?

Thanks,

Nirumal.

Former Member
0 Kudos

If this is for OData, the MOCA error is probably a red-herring as those messages are relevant for MBS based apps only. 

Are you using the production APNS gateway or the sandbox gateway in the APNS configuration in SCC?  Is the client application built with the matching profile?

Thanks,

Andrew.

Former Member
0 Kudos

"Are you using the production APNS gateway or the sandbox gateway in the APNS configuration in SCC?"

- We are using the sandbox gateway.

"Is the client application built with the matching profile?"

- Could you be more specific about what you mean by matching profile?

Thanks,

Nirumal.

Former Member
0 Kudos

If you are referring to the mobile provisioning profile, we are using the correct one.

Former Member
0 Kudos

Yes, I was referring to the mobile provisioning profile. 

If that's not it, wondering if you have double checked the ports required are opened on the server, and on the device side?

On the server, outbound TCP ports 2195 and 2196.

On the iOS device, outbound TCP port 5223.  If connecting over a cellular network this is usually ok, but have seen wifi networks block this.

Thanks,

Andrew.

Former Member
0 Kudos

So how can i test if port 5223 is open in my network.

I know that 2195 and 2196 is open, i was able to test them using the telnet command;

> telnet gateway.sandbox.push.apple.com 2195

is there a similar way of testing if port 5223 is open?

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can use this link to test if a port is open in a particular network(ip address)

http://www.yougetsignal.com/tools/open-ports/

Former Member
0 Kudos

Hi Jitendra,

We are not getting Error 505, we are getting the "Error 405-Method not allowed".

Regarding Error 403, the document was helpful and I was able to get a "Status 200-Succesful" in the REST Client. In SCC we are able to see 1 pending item for the user. We are able to see this request in the httpd-log file in the SMP Server, But we are unable to receive the notification in the device.

Thanks,

Nirumal.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Nirumal,


We encounter an error in SAP Net weaver Gateway. Error: "405 - Method not allowed"

Error 505 seems a server error. I guess by checking and analyzing logs on GW system can give some hints.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40ab6d83-b7b8-3010-65bc-d7a08f0f3...

Regarding error 403-User not in required Role, you can check this document for different possible solutions:

Rgrds,

Jitendra