--- "Rohra, Prakash N. ,,DMDC/BEAU" <[EMAIL PROTECTED]> wrote: > We have a similar situation where Server side Struts > components (Actions and > JavaBean business components) will be accessed by a > client Swing Java > application (not a browser). > > We are also looking at various alternatives like > SOAP, XML-RPC or simple > HTTP POST requests (with XML data or Serialized > objects). > > I have 2 questions: > > (1) Does STRUTS support sending serialized VO > objects (as against HTML or > XML text strings) back and forth between client app > and server. What needs > to be changed in STRUTS components to suport this?
It is not a STRUTS problem. It is HTTP/HTTPS problem. Since Servlet use this two protocol to communicate, so you cannot use STRUTS to send serialized VOs directly. You have to do some code to make this work. > > (2) Does SOAP (Web services) support client sessions > ? i.e. will I be able > to maintain individual client's session state (which > might be full business > object JavaBeans) or Web services are suited for > state-less method calls?? > Any pointers will be appriciated ?? This should not be a problem if STRUTS sits on SOAP. > > thanks > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:Kevin.Bedell@;sunlife.com] > Sent: Thursday, October 17, 2002 10:56 AM > To: Struts Users Mailing List > Subject: Re: Can V in MVC be Swing in Struts? > > > > > > 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 > === message truncated === ______________________________________________________________________ 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>