cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing external WebService

Former Member
0 Kudos

HI,

I want to access an external WebService from an EJB.

Are there some examples for intergrating an external WebService to an EJB?

Can somebody help?

Thanks

Uli

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ulrike,

You can create web service clients in EJBs as easily as in anywhere else, it doesn't makes any difference for EJBs. You can do this by two methods: (a) Deployable Proxy and (b)Standalone Proxy.

Refer to the following help pages for a detailed solution,

http://help.sap.com/saphelp_erp2005/helpdata/en/64/d326dd765e4590acff3d5481628d87/frameset.htm

Best regards,

Guru.

Former Member
0 Kudos

HI,

thanks for your answer.

But in which way can I integrate then the webservice in my ejb?

How can I access the methods of the webservice in my ejb project then?

And do I need a GUI when I want to invoke the ejb on the WAS?

Thanks

Uli

Former Member
0 Kudos

Hi Ulrike,

Let me axplain you in detail.

First thing is create a Java project and in that create a standalone proxy for a web service. Now you will have all the proxy classes for using the web-service and calling its methods. Don't forget that since the web service is deployed in an external server you need to give the wsdl file for this. Now in this project, create a new class and try to call the methods of the web service. If that works fine, then create seperate methods in this class to access the webservice methods. This is so that other projects can call this class to in turn call the web service.

Then refer this project in you EJB project. Then you can call the methods of the class in your EJB that we created in the other project.

I think that makes it much clear

Best regards,

Guru.

Former Member
0 Kudos

Thanks again.

I will try this I hope i´ll do it right.

But how can I start the ejb after deploying, because i don´t need da gui, so that i don´t need a jsp.

Thanks for help.

Ulrike

Former Member
0 Kudos

Common Ulrike

We don't have a GIU for testing EJBs at present in SAP WAS. So we need to create a web project and a JSP file to access/test the EJB methods.

Best regards,

Guru.

Former Member
0 Kudos

so I understand right, that i have to built a web project with a jsp to access the ejb?

Are there other ways where i don´t need a gui? Because i want to start the programm later from R/3.

Thanks

Ulrike

Former Member
0 Kudos

Hi Ulrike,

Can you just elaborate a bit more on how you wanna use this EJB from R/3, i mean how R/3 comes in the picture. That will help me provide you with an appropriate solution.

Best regards,

Guru.

Former Member
0 Kudos

HI,

I want to start the EJB Application from R/3.

I want to use the EJB as an interface between the R/3 and the external WebService.

So i need no GUI on the WAS to start the ejb.

Do you need some more information?

Thanks

Uli

Former Member
0 Kudos

Hi Ulrike,

Your problem is interesting actually

The solution is - you need to expose the EJB as a web service and call it from the R/3 system through an ABAP program. I have already told you how to expose an EJB as a web service, follow this link on how to call a web service from ABAP,

If you don't have an idea on how to expose an EJB as webservice, use the following tutorial,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/creat...

Best regards,

Guru.<u></u>

Former Member
0 Kudos

Thanks for your answer,

but i wanted to use JCO for the connection of the EJB and the R/3 System.

Because i have no experience in programming ABAP beause i haven´t done anything yet.

Best Regards

Uli

Answers (0)