axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mi Zhang" <...@thedistillery.com.au>
Subject Consume EJB and Web Services
Date Mon, 14 Mar 2005 03:23:43 GMT
Hi,

I have deployed an EJB as Web Service using Axis. The questions I have
are:

1) If it is possible to use one client to invoke EJB and Web Service.

or

2) If  question 1 is impossible, can I use one interface for EJB and Web
Service clients, for example:
EJB client:

InitialContext initCont = new InitialContext(properties);
NiceThingsHome home = (NiceThingsHome)initCont.lookup("NiceThingsBean");

NiceThingsEJB ntBean = (NiceThingsInterface )home.create();
ntBean.findNiceThingsFor("xxx");


Web Service client:

NiceThingsEJBServiceLocator locator = new NiceThingsEJBServiceLocator();

NiceThingsWSIF niceThingWS =
(NiceThingsWSIF)locator.getPort(NiceThingsWSIF.class);
niceThingWS.findNiceThingsFor("xxx");


What I want to achieve is to use the same interface for NiceThingsEJB
and NiceThingsWSIF, then my client only needs to deal with one
Interface. The idea behinds this is to write a client which can invoke
both EJB and Web Service.

Thanks,
MiZ



The Distillery Pty Limited
ABN 69 080 932 467
PO Box 940, Dickson ACT 2602, AUSTRALIA
Phone: +61 2 6272 0200
Fax: +61 2 6262 5151
Web: www.thedistillery.com.au

The Distillery Inc
2111 Wilson Blvd, Suite 700,
Arlington, Virginia 22201, USA
Phone: +1 703 351 5082
Web: www.thedistilleryinc.com

The Distillery (Europe) Ltd
53 Chandos Place London WC2N 4HS
Tel: +44 (0)20 7812 6692
Fax: +44 (0)20 7812 6677


---------------------------------------------------------------------
The information contained in this email and any files attached may be
confidential and/or copyrighted information of The Distillery, Third
Parties and/or the intended recipient and may be the subject of legal
privilege or public interest immunity. You may only reproduce or
distribute the material if you are expressly authorised by us to do
so. If you are not the intended recipient, any use, disclosure,
copying, circulation, forwarding, printing or publication of this
message or attached files is strictly forbidden.

If you have received this document in error or are not an intended
recipient, please notify the sender and delete from your Inbox and/or
system.

The Distillery does not represent or warrant that files attached to
this e-mail are free from computer viruses or other defects and
liability is limited to the resupply (or cost of resupply) of the
attached files.
---------------------------------------------------------------------
Mime
View raw message