cancel
Showing results for 
Search instead for 
Did you mean: 

Running web service in session bean or Java class

ravi_shankar43
Explorer
0 Kudos

Hi All ,

I have wsdl file published on server which i can access from WebService Navigator. I have created this file using create web service option by right clicking on session bean. I want to execute this webservice in other session bean which is in other Track. How can i achieve this?

Thanks in advance

Regards

Ravi Shankar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi H can use avi,

You can create a web service client. You can do this in the same ejb project.

If you use ejb 3, you can use the @WebServiceRef annotation to refer another service

Regards

Marcos

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Ravi Shankar

You have to create Web service Client Proxy project based on the WSDL. You can do this in NWDS. For example, in NWDS 7.1 there is Import WSDL wizard which can help you in the case.

Usually the client proxy project is a deployable one. So you can build/deploy it on a servers. But it can be also a part of any other JEE project.

After this in your client EJB you can invoke Web service business methods using the Java Web service Client (Java class generated by the wizard in Client proxy project).

See topic Consuming Web services.

BR, Sergei

siarhei_pisarenka3
Active Contributor
0 Kudos

Check also this:

[Consuming a Web Service|http://help.sap.com/saphelp_nw04/helpdata/en/24/d0ff2f5d872a468b4643e1fa740569/frameset.htm],

[Web Service Clients Development|http://help.sap.com/saphelp_nw04/helpdata/en/24/d0ff2f5d872a468b4643e1fa740569/frameset.htm]

BR, Sergei