Consuming Web Services inside J2EE/ Jboss  
Author Message
SMMT





PostPosted: 2004-12-3 1:06:00 Top

java-programmer, Consuming Web Services inside J2EE/ Jboss Hi,

I have search the web , and by know I hava an good ideia on how to publish may Stateless EJB has a
webservice (using JBoss 3.2.x). My problem is now consume web services inside a Stateless EJB (or
any other , for that matter). I've searched, but with no luck. Having a WSDL file for a web service
how do I comsume it inside my beans ? (i.e. use the web service as an extension of my server
funcionality) How to I access that service from inside EJB using JBoss?
Any ideias ?
 
Marek Lange





PostPosted: 2004-12-3 16:09:00 Top

java-programmer >> Consuming Web Services inside J2EE/ Jboss SMMT wrote:
> Hi,
>
> I have search the web , and by know I hava an good ideia on how to
> publish may Stateless EJB has a webservice (using JBoss 3.2.x). My
> problem is now consume web services inside a Stateless EJB (or any other
> , for that matter). I've searched, but with no luck. Having a WSDL file
> for a web service how do I comsume it inside my beans ? (i.e. use the
> web service as an extension of my server funcionality) How to I access
> that service from inside EJB using JBoss?

It is easy to make your EJB "webservice ready". There are differences
between 3.x and 4.x since JBoss4 is J2EE 1.4 certified. The JBoss docs
provide good examples for JBoss 4.x:

http://docs.jboss.org/jbossas/getting_started/startguide40/ws.html

For 3.x look here:

http://www.nsdev.org/jboss/stories/jboss-net.html
http://www.jboss.org/developers/guides/jboss.net/xdoclet

If your archive is deployed correctly you can see the wsdl in your
browser and test the webservice e.g. by using XmlSpy or any other
webservice client.

Hope this hepls.

-marek
 
SMMT





PostPosted: 2004-12-3 17:57:00 Top

java-programmer >> Consuming Web Services inside J2EE/ Jboss Marek Lange wrote:
> SMMT wrote:
>
>> Hi,
>>
>> I have search the web , and by know I hava an good ideia on how to
>> publish may Stateless EJB has a webservice (using JBoss 3.2.x). My
>> problem is now consume web services inside a Stateless EJB (or any
>> other , for that matter). I've searched, but with no luck. Having a
>> WSDL file for a web service how do I comsume it inside my beans ?
>> (i.e. use the web service as an extension of my server funcionality)
>> How to I access that service from inside EJB using JBoss?
>
>
> It is easy to make your EJB "webservice ready". There are differences
> between 3.x and 4.x since JBoss4 is J2EE 1.4 certified. The JBoss docs
> provide good examples for JBoss 4.x:

The goal is not to make my EJB available using webservices, but, consum webservices inside EJB.
In other words, the goal is to make a Webservice Cliente inside the Application server that consumes
a web service provided by a 3tr-party (for wich I asume I have the WSDL descriptor), using an EJB
(say, a stateless bean that comunicates with a webservice, but that is not a webservice it self.)

Nervertheless, I apreciate the links and the awnser.
 
 
Marek Lange





PostPosted: 2004-12-3 19:44:00 Top

java-programmer >> Consuming Web Services inside J2EE/ Jboss SMMT wrote:
> The goal is not to make my EJB available using webservices, but, consum
> webservices inside EJB.
> In other words, the goal is to make a Webservice Cliente inside the
> Application server that consumes a web service provided by a 3tr-party
> (for wich I asume I have the WSDL descriptor), using an EJB (say, a
> stateless bean that comunicates with a webservice, but that is not a
> webservice it self.)

Your EJB must then be exposed as a webservice client (Axis etc.). This
is nothing EJB specific.

-marek
 
 
SMMT





PostPosted: 2004-12-12 5:39:00 Top

java-programmer >> Consuming Web Services inside J2EE/ Jboss Marek Lange wrote:

> Your EJB must then be exposed as a webservice client (Axis etc.). This
> is nothing EJB specific.

Any tutorial I can read on own to do that ?
 
 
MarioB





PostPosted: 2005-2-15 1:03:00 Top

java-programmer >> Consuming Web Services inside J2EE/ Jboss Hi,
I've got the same problem like you. I also have to program an ejb that
acts as a consumer of a web service. I'm gonna use jBoss 4 and axis 1.1.
If you already have got a solution for the problem it would be fine if you
could give me some hints.

thanks