Using Struts/Soap/EJB for XML?

Using SOAP implies (usually) communications between the client app and the
server over HTTP. Using EJB generally implies communications from the
client and server using RMI.

The only way I can see to do what you are describing is to 'wrap' an EJB on
the server using a Web Service. Which, btw, is exactly what Weblogic and
JBoss.NET do for web services. But these are not the only solutions.

If you are interested in using SOAP for communications between the client
and server, then Apache AXIS is likely your best bet. It provides about the
best and most current Java SOAP client code. (More up to date then Apache
SOAP.) You could then code your back-end processing in Java (if you want -
and which is my personal choice!) using Axis as well. The Java2WSDL and
WSDL2Java utilities provided by Axis are a good place to start.

My upcoming book, Struts Kick Start, has a chapter and a sample application
dedicated to exactly this solution. It provides a Struts App that uses SOAP
and XML to communicate to a Java-based Web Service that was built using
Axis. I include build files and scripts to generate the .java files using
the Java2WSDL and WSDL2Java utilities. Also, copies of Axis (and struts,
etc) are included on the CD-ROM that comes with the book.

Regarding Code Generators - XDoclet seems the best for this work, but it is
still a bit immature when it comes to the web service stuff - Struts code
generation is provided, though I've not used it. There is an Ant task under
development that automatically generates Java code for web service
communications (it wraps the Java2WSDL and WSDL2Java utilities) but it is
not ready for prime time yet and no documentation yet exists.

Best of luck,

Kevin


--
Kevin Bedell
Author, Struts Kick Start










Xue-Feng Yang <[EMAIL PROTECTED]> on 10/17/2002 10:27:29 AM

Please respond to "Struts Users Mailing List"
       <[EMAIL PROTECTED]>

To:    Struts Users Mailing List <[EMAIL PROTECTED]>
cc:     (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:    Re: Can V in MVC be Swing in Struts?


Thanks for the suggestions.

The architecture of my project is different from
standard B2B and B2C although they are part of it.

I will choose Struts/Soap/EJB to deal with XML, but
implement other parts from ground to Struts.

I would like to know if there are good code generators
for XML/Struts/Soap/EJB. Seems to me this part of the
code is standard now.


--- [EMAIL PROTECTED] wrote:
>
>
>
> If you decline to use SOAP protocol and want to
> build an interface that
> returns XML over HTTP, I'd recommend looking XML-RPC
> protocol - it's
> simpler and actually pretty easy to use. The
> O'Reilly XML-RPC book gives
> you step by step instructions on how to do it and
> even points you to Java
> libraries that can save you a bunch of time.
>
> The value here is that there are Java libraries
> available for you to use to
> manage all the communications from the client. You
> wouldn't have to write
> any low-level communications stuff, you could just
> use the packages already
> available - plus there are VB, Perl, Python, etc
> packages available for
> XML-RPC clients as well so it would make your
> service much more reusable.
>
>
>
>
>
>
> "Vilya Harvey" <[EMAIL PROTECTED]> on
> 10/17/2002 05:13:33 AM
>
> Please respond to "Struts Users Mailing List"
>        <[EMAIL PROTECTED]>
>
> To:    "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> cc:     (bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:    Re: Can V in MVC be Swing in Struts?
>
>
> You're right, it will work. In a previous job, I
> worked on a project which
> had a Visual Basic (!) client talking to some EJBs
> via servlets which
> returned XML responses. That project wasn't using
> JSP, simply because
> servlets were more convenient in that case, but
> there's no reason why it
> couldn't have. We found a lot of benefits from this
> approach.
>
> The downside was that a fair amount of time was
> spent defining the exact
> protocol between the client and the servlets. Of
> course, this was before
> SOAP... If you haven't already, it may be worth your
> while to take a look
> at
> that.
>
> Hope that helps,
> Vil.
> --
> Vilya Harvey, Consultant
> [EMAIL PROTECTED]                 /
> digital steps /
> (W) +44 (0)1483 469 480
> (M) +44 (0)7816 678 457
> http://www.digitalsteps.com/
>
> --Disclaimer--
>
> This e-mail and any attachments may be confidential
> and/or legally
> privileged. If you have received this email and you
> are not a named
> addressee, please inform the sender at Digital Steps
> Ltd by phone on
> +44 (0)1483 469 480 or by reply email and then
> delete the email from
> your system. If you are not a named addressee you
> must not use,
> disclose, distribute, copy, print or rely on this
> email. Although
> Digital Steps Ltd routinely screens for viruses,
> addressees should
> check this email and any attachments for viruses.
> Digital Steps Ltd
> makes no representation or warranty as to the
> absence of viruses in this
> email or any attachments.
>
>
> ----- Original Message -----
> From: "Xue-Feng Yang" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Thursday, October 17, 2002 5:19 AM
> Subject: RE: Can V in MVC be Swing in Struts?
>
>
> > JSP is interpreted into a servlet in a servlet
> > container such as Tomcat. So JSP should work on
> this.
> > Servlet is not only designed for HTML browser, so
> is
> > JSP.
> >
> > I will try it and believe this should work!
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@;jakarta.apache.org>
>
>
>
>
>
>
>
>
---------------------------------------------------------------------------
> This e-mail message (including attachments, if any)
> is intended for the use
> of the individual or entity to which it is addressed
> and may contain
> information that is privileged, proprietary ,
> confidential and exempt from
> disclosure.  If you are not the intended recipient,
> you are notified that
> any dissemination, distribution or copying of this
> communication is
> strictly prohibited.  If you have received this
> communication in error,
> please notify the sender and erase this e-mail
> message immediately.
>
---------------------------------------------------------------------------
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@;jakarta.apache.org>
>


______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@;jakarta.apache.org>







---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to