cancel
Showing results for 
Search instead for 
Did you mean: 

Gateway Subscription & Notifications

0 Kudos

Hi All,

I am trying to create Subscription & Notifications for a service which I created through SEGW. For information on my service you can check my blog post

I am successfully able to create Subscriptions for my service.

(Entry created in table /IWBEP/D_MGW_SUB in gateway system)

Can someone please explain the process after this that needs to be done for implementing and testing Notifications ?

Thanks,

Sheetal Reddy

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member195242
Active Participant
0 Kudos

Hi Sheetal,

The blog on Subscription and Notification is available in two parts. Please check the second part of the blog which talks about pushing notification for a subscribed entity in a service:

Part 1 -

Part 2 -

Video -  http://www.youtube.com/watch?v=PxKZV0AAhD8

Basically, since you have completed the first part of subscribing, you have to use the APIs provided by SAP NetWeaver Gateway and push a notification from the backend.

Also, as I see from the picture, you have subscribed for "SubscriptionCollection" which is not correct. You should subscribe for an entity for which you want to be notified. Example - FlightCollection in RMTSAMPLESFLIGHT service. And if you subscribe with a change type "created" means that, you want to be notified whenever a flight is created!

Hope this helps!

Best regards,

Aakash

0 Kudos

Hi Aakash,

Let me tell you the steps which i followed.

1. First of all I created service through SEGW, All the classes and methods will be created automatically (unlike in the Part1 of blog which you specified).

2. Below are my entity set details (SubscriptionCollection & Notification Collection will be created automatically). POHeader is to get Header data and POItems is to get Items data (I created association between these two).

3. If I tried to create Subscription for POHeader I am getting error 'Property 'deliveryAddress' is invalid'. Subscription is successfully created only if i give SubscriptionCollection. like

http://<hostname>/sap/opu/odata/sap/ZPSR_PO_DATA_SRV_01/SubscriptionCollection

If i use POST then entry is successfully created in table /IWBEP/D_MGW_SUB (in gateway system).

4. Now when i try to run the program in backend system(Refering Part2 of blog which you specified), I am not getting any response because internally program is trying to fetch data from  /IWBEP/D_MGW_SUB table in backend system. But this table is filled only in gateway system, in backend system it is empty.

Let me know if you need any clarification on this. Also can please help me how to use HTTP Listner.

Thank You,

Sheetal Reddy

former_member195242
Active Participant
0 Kudos

Hi Sheetal,

Some points:

1. http://<hostname>/sap/opu/odata/sap/ZPSR_PO_DATA_SRV_01/SubscriptionCollection is the correct URL with method POST. The request body should contain the collection name for which you want to subscribe. Example:

............

............

............

<m:properties>

<d:deliveryAddress>[your delivery address]</d:deliveryAddress>

<d:persistNotifications>false</d:persistNotifications>

<d:collection>POHeader</d:collection>

<d:filter/>

<d:select>*</d:select>

<d:changeType>created</d:changeType>

</m:properties>

</content>

</entry>

2. Please also make sure, in the service builder(SEGW project) , the entity set POHeader is marked Subscribable (check box ticked).

3. Which system is your service ZPSR_PO_DATA_SRV_01 connected to? You should create your service in backend system and register/activate in the gateway system. So when you create  subscription, it is created in the backend system and not Gateway hub system. By the way, table /IWBEP/D_MGW_SUB cannot exist in Gateway hub where software component IW_BEP is not present unless its a co-deployed system(IW_FND+IW_BEP).

Best regards,

Aakash

0 Kudos

Hi Aakash,

Actually I am creating service and maintaning it in Gateway hub system only, but in service i am calling RFC function modules from backend ECC system. May be i need to create this service in backend as suggested by you. Do you have any idea on HTTP Listener or HTTP trace where i can test notifications and do you have any document for this ?

Thank you,

Sheetal Reddy

former_member195242
Active Participant
0 Kudos

Hi Sheetal,

Exactly. You have to create the service in the backend system and am assuming your backend as well has the component IW_BEP since you mentioned /IWBEP/D_MGW_SUB table is present there.

IMPORTANT : Make sure that you have taken care of all the configuration as mentioned in the blogs(especially part 2).

There are a lot of HTTP Listener available on internet. You can also search for one. I can provide you link for one of the HTTP listener called MEMBRANE for testing purpose : http://www.membrane-soa.org/soap-monitor/ . Please check its documentation, how to operate it.

Best regards,

Aakash
.