This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Calling a web service from an session bean.

 
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?
 
author
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?
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic