• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a web service from an session bean.

 
H Krzeszowski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about web services and EJB 3.0. I am very new to web services and hence appreciate all help possible. Here is my problem:

I would like to call a web service from a stateless session bean (ejb 3.0) the bean will be running on JBoss. I have the wsdl file defining the web service. I would like to do a solution using annotations and inject the service endpoint interface into my session bean.

Any one having any pointers on how to accomplish this?
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look here: http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/html/Server_Configuration_Guide/Server_Configuration_Guide-Web_Service_Clients-WebServiceRef.html.

Cheers,
Reza
 
H Krzeszowski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, though I still do not understand how I create the java interface for the web service I want to call (I am guessing I still need to create the corresponding java interface for the wsdl file).

I have tried to generate java code using wsdl2java (the Axis 2 program) but that gives me a bunch of java files that depend on other classes such “as org.apache.axis2.databinding.ADBBean”. I was hoping to be able to skip those parts and be able to call a web service just using a wsdl file and jboss without having to find all the jar-files necessary to solve all apache.axis2 dependencies.

I thought the process was:
1. Create a java interface for the web service (Still don’t know how to do this in an easy way from the wsdl file).
2. Inject the created java interface into the session bean
3. Use the interface to call the web service methods.

As I said before I am very new to web services and I am probably missing some steps?
 
H Krzeszowski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone who can give me some more info about this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic