cancel
Showing results for 
Search instead for 
Did you mean: 

Service Consumption in SAP Gateway

CRVMANISH
Contributor
0 Kudos

Hello Experts,

                         We have web application developed in ASP and C# , we have consume web service in SAP to send data to web application database whenever notifications are created in SAP using classic method of webservice consumption in ABAP.

But We want to achieve this using oData and gateway

We want to achieve push notification from Gateway to web application , it should directly make entry in web app database like it is achieve in above method.

Please Suggest

Regards

Manish

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Manish,

you would have to build a receiver for the notifications that are sent by SAP NetWeaver Gateway so that they can be received by an online HTTP Destination/Server.

Have a look at the following blogs and documents

http://scn.sap.com/community/netweaver-gateway/blog/2012/12/03/pushing-notifications-made-easy-push-...

and also at the content that has been published by my colleagues Andrew Whitaker

http://scn.sap.com/people/andrew.whitaker2/content

Best Regards,

Andre

CRVMANISH
Contributor
0 Kudos

Hello Andre,

I am already aware about push notification , receiving data is the problem.

I cannot have one instance always running to receive data pushed from SAP.

I want to consume external web service in SAP  , whenever data is pushed it handles it , this is web application not mobile device , in mobile it is easy to have receiver.

i can have background service running but i don't to use it.

How can this be achieved using SAP Gateway.

Regards

Manish

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Manish,

I am not sure whether I got your question correctly.

But maybe this scenario is a solution for your.

http://help.sap.com/saphelp_gateway20sp05/helpdata/en/17/df1d243c1a4f51a2d9fdaf75be9385/frameset.htm

Here the SAP NetWeaver Gateway hub itself collects the notifications that can then be retrieved via pull from the consumer, for example from your ASP application.

Best Regards,

Andre

CRVMANISH
Contributor
0 Kudos

Hi Andre,

I don't want to do continuous polling on my web application to fetch data from Gateway.

It should work instantaneously.

Is it possible to consume external web service using gateway.

Regards

Manish

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Manish,

yes, it is possible to call SOAP web services from SAP NetWeaver Gateway. You just have to call them from your ABAP code in your data provider class.

But this web service has to be online as well, doesn't it ?

Maybe I don't understand your scneario completely but I do not see what you are exactly looking for.

Where is the difference between calling a web service from Gateway compared to have an http endpoint available that can consume notifications from Gateway.


Both the Web Service end point as well as an HTTP destination accepting posts containing notificatinos from Gateway would have to be online.

Or am I missing something here ?


Best Regards,

Andre

CRVMANISH
Contributor
0 Kudos

HI Andre,

Exactly , Now you understood correctly, yes that web service will be online always.

Now how can i achieve this using gateway. ? What are the steps to consume external web service in gateway?

Please Suggest

Regards

Manish

Former Member
0 Kudos

Hi Manish,

I am also looking for a solution to consume a webservice in netweaver gateway. Were you successful in doing so? If yes could you please share the details with me.


<<Email id is removed, if you want to connect to community members via email id, you can mention it in your SCN profile>>

Thanks

Stan

Message was edited by: Jitendra Kansal (Moderator)

kammaje_cis
Active Contributor
0 Kudos

If you are looking to convert a SAP SOAP web service to a REST OData service, there is no tool available as of now.

If you are just talking about consuming a web service it is the regular ABAP way. See this link on how to consume a SOAP web service in ABAP.

http://wiki.sdn.sap.com/wiki/display/Java/Consume+SOAP+WebService+by+SAP+and+add+custom+Header

Let me give a simile.

if you need to consume a RFC in Gateway,  you would call the RFC in your Data Provider class and get data. Here instead of a RFC you have a SOAP web service. So if you need to call a web service, you need to do the steps in the above link and call it from the data provider class. (using the proxy that got generated)

Thanks

Krishna

CRVMANISH
Contributor
0 Kudos

Hi Stanley,

Their is no concrete solution by SAP Gateway , even in SP07 . You can leverage on this.

I have done it in similar way. You can write your code in data provider class.

http://scn.sap.com/community/abap/blog/2012/10/10/consuming-rest-based-web-services-from-abap

Regards

Manish

Former Member
0 Kudos

Thanks Manish.

I have found another way to do it.

CRVMANISH
Contributor
0 Kudos

Hi Stanley,

Please share the other work around that you have found out.

Regards

Manish

Former Member
0 Kudos

Hi Manish,

The web service I was mentioning was a WCF service.

We were able to execute the web service using Class cl_http_client and Interface if_http_client.

By concatenating the parameter to the WCF link we were able to pass the data to the windows server.

Thanks

Stan

CRVMANISH
Contributor
0 Kudos

Hello Stanley,

Can you please share what method you are using , this might help us also.

Regards

Manish

CRVMANISH
Contributor
0 Kudos

Got you.

Thanks for the reply

Regards

Manish

Former Member
0 Kudos

'create_by_url' from Class cl_http_client and 'RECEIVE' from interface IF_HTTP_CLIENT.

former_member182874
Active Contributor
0 Kudos

Hi Krishna,

When we consume webservices by writing this code in DPC class. Will UI5 be able to consume this type of service ?

I hope this means that any webservices can be converted to Gateway services ?

Regards,

Tejas

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tejas,

everything that can be called from ABAP (so also SOAP web services) can be called from within a DPC_EXT class and than be called by a SAPUI5 app.

Question is whether you want to do this yourself via code.

An alternative when you have the SAP Mobile Platform 3.0 in place would be to use the so called integration gateway component that is part of SMP 3.0 as described by my colleague in the following document   .

Is it a third party web service or is it a webservice based on ABAP?


Best Regards,

Andre

former_member182874
Active Contributor
0 Kudos

Hi Andre,

Customer call it as a REST services in non SAP system. They want to migrate these services to Gateway server and then a UI5 call for odata .

Regards,

Tejas

kammaje_cis
Active Contributor
0 Kudos

Yeah definitely. Your DPC class is basically working as an adapter.

former_member182874
Active Contributor
0 Kudos

Capability Matrix doc looks helpful

kammaje_cis
Active Contributor
0 Kudos

If these are already REST services, I would not recommend to route it through Gateway (unless you want to mash the external API with SAP Data).

Rather using a Web Dispatcher to route the calls to non-SAP system would make sense.

former_member182874
Active Contributor
0 Kudos

Yes, the architecture they are following is not a recommended approach, though they are looking on the possibilities..

Could you elaborate on : Rather using a Web Dispatcher to route the calls to non-SAP system would make sense

Would it be possible to make a call from UI5 to non-SAP systems or UI5 to these REST services ?

Regards,

Tejas