cancel
Showing results for 
Search instead for 
Did you mean: 

How to call SAP function via RFC as webservice in JavaBeans.

Former Member
0 Kudos

Hello all,

I need to call a SAP function (RFC) as a webservice in JavaBeans. Im looking for information or a simple example but Im not able to find it. Do you know any link or documentation to be able to start with it?.

I tried to invoke the service from JavaBeans but it doesn´t works.

I can add the webservice in JavaBeans without any problem and the classes are generated fine (response etc...), but ¿how to call it?

Thanks in advance.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I hope you already generated webservice out of RFC.

You should call RFC webservice like any other webservice from Java bean (I guess by creating object of webservice class and calling method).

Regards,

Gourav

Former Member
0 Kudos

Hi Gourav,

what do you mean with generate webservice out of RFC?

Thanks & Regards.

Former Member
0 Kudos

>what do you mean with generate webservice out of RFC?

In order to consume RFC as webservice you need to generate webservice from RFC (using webservice creation wizard).

I guess you already did.

I don't know exact java code to call WS, once you created proxy in NWDS you should be able to see class and method which you can call to consume webservice.

Regards,

Gourav

Former Member
0 Kudos

Hi,

Please refer the following link:

http://www.riyaz.net/blog/xipi-consuming-xi-web-services-using-web-dynpro-part-ii/technology/sap/7/

I hope this helps to understand the process

Thanks,

Himadama

0 Kudos

Hello,

that is a matter of taste but you could also do following:

You could try to use the JCo in order to call it from the Java Bean via RFC.

http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm

Further on you can create a WebService from the Java Bean if needed.

P.S.

I suppose the Function is remote enabled (if not you have to write a remote-enabled wrapper).

Best Regards,

Diana Abu-Gosh