2014 Mar 10 6:24 AM
hi everyone ,
Is it possible to call a servlet file from local system or file stored in sap and execute through the browser ? Could you please provide some ideas on how to carry out this .
Regards,
Sivaganesh
2014 Mar 10 6:47 AM
Hi Sivaganesh,
Normally your servlet wil be hosted on apache tomcat server. If such a server were accessible by the SAP system the RFC will be hosted on, then you could create a HTTP request in your RFC enabled FM to call and execute your servlet.
Check out the following SAP Help link that shows you how to excute a HTTP request. You can create new request object host or by HTTP destination in SM59.
http://help.sap.com/saphelp_nw70/helpdata/en/1f/93163f9959a808e10000000a114084/content.htm
Hope that helps you out.
Katan
2014 Mar 10 6:47 AM
Hi Sivaganesh,
Normally your servlet wil be hosted on apache tomcat server. If such a server were accessible by the SAP system the RFC will be hosted on, then you could create a HTTP request in your RFC enabled FM to call and execute your servlet.
Check out the following SAP Help link that shows you how to excute a HTTP request. You can create new request object host or by HTTP destination in SM59.
http://help.sap.com/saphelp_nw70/helpdata/en/1f/93163f9959a808e10000000a114084/content.htm
Hope that helps you out.
Katan
2014 Mar 10 7:29 AM
hi katan,
Thanks for your reply ,
Consider that i have already created a RFC which is already used as web service now i just want to call the same RFC through servlet url in SAP.
and what exactly should i do in sm59 ?
Regards,
Sivaganesh
2014 Mar 10 7:40 AM
Hi Sivaganesh,
Ah. I misunderstood your requirement.
If you have already created the RFC as a Web Service, then surely it is possible for you to execute the Web Service from your Servlet.
I'm not totally clear on your architecture, but you can call a Web Service from Java by following this tutorial.
Creating a Simple Web Service and Client with JAX-WS - The Java EE 5 Tutorial
If your Servlet is hosted on NW Java..take a look at this
http://help.sap.com/saphelp_nw73/helpdata/en/4b/96e16c4d8e584de10000000a42189c/content.htm
2014 Mar 10 8:22 AM
hi katan,
I am not using NW java , we are using SAP NW. I am trying to create a web service for servlets in SAP.
As i am new in creating Web service for servlets , i tend to ask more questions So please do help me out, Thanks .!!!
Regards,
Sivaganesh
2014 Mar 10 8:59 AM
Hi Sivaganesh,
I'm still not totally clear what you are trying to achieve.
Are you trying to create a Web Service from your SAP ABAP NW system based on an existing FM?
Thanks,
Katan
2014 Mar 10 10:50 AM
Thank u so much katan patel .. Actually i was also bit confused ... You cleared my doudt very well thank you ..
My actual scenario was that i wanted to get the changed values in my RFC and i should update other Server using servlets.
Regards,
Sivaganesh