You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Mike Oliver <ol...@appsaspeers.com> on 2003/01/24 19:16:03 UTC
[AXIS4STRUTS] The old In and Out
If we start with the idea [Kevin's suggestion] that on the Axis side we
develop a Web Service that accepts SOAP Requests with an XML payload and
spins that payload into an HTTP POST/GET to a Struts Application as if
that POST or GET was coming from a Web Browser. Then we need not make
any changes to Struts to accept the request as Struts may not know or
need to know it was from Axis/SOAP (leave that to the application
developers).
That presumption then begs some other questions:
What advantages should this Axis4Struts bring to the table?
What should we do over and above the minimum accepting of SOAP Requests
and spinning into an HTTP Browser emulated POST to Struts to add value?
Do we even bother with GET?
Since any programmer can use commons-httpclient to form his own java
emulation of a browser POST to struts, what advantage can we bring with
Axis4Struts?
What would the WSDL for an Axis4Struts Web Service look like? What
messages, what types, etc.
What should we do within the Struts framework to make it easier for
developers to have a Forward that returned an XML Payload suitable for
the Axis4Struts Response?
Should we use primitive types (Strings, Integers, etc.) only in the
Axis4Struts.WSDL or should we include alternatives with Java complex
types? (DynaBeans, NVPair[], etc.)
What and how should be do the discovery? If a single interface with a
multi-purpose payload for the Form Data is used, how will developers
accessing the web service determine what the content of the payload
should be?
What role should other common Struts compatible components like Scaffold
and JSTL and other Axis compatible components like WSIF play in
Axis4Struts?
Michael Oliver
Chief Technology Officer
AppsAsPeers LLC
7391 S. Bullrider Ave.
Tucson, AZ 85747
520.574.1150 Voice
520.844.1036 Fax
520.270.8862 Cell
http://www.appsaspeers.com <http://www.appsaspeers.com/> Home Page
5202708862@voicestream.net SMS
http://www.ollie.ezpeer.net <http://www.ollie.ezpeer.net/> Personal
Home Page
http://www.ollie.im-live.com/im-live/ Instant Chat
MikeOliverAZ@hotmail.com MSN Messenger
MikeOliverAZ@yahoo.com Yahoo Instant Messenger
MikeOliverAZ Aol Instant Messenger
Re: [AXIS4STRUTS] The old In and Out
Posted by Joe Germuska <Jo...@Germuska.com>.
I still haven't really absorbed the rationale for this, and my
difficulty in answering some of your questions make me willing to
step up and say so.
Maybe it would help if we could frame the goal of the project, in
terms of more than "wouldn't it be cool?"
My understanding is that people would like to be able to use Struts
as a single controller, with multiple "views" -- a web services view
as well as more familiar browser views. If this is the case, then it
seems that it would make sense to integrate Struts and Axis into a
single web application.
I'm much more familiar with Struts than with Axis, but I've been
poking around the Axis architecture guide a bit
<http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/architecture-guide.html>
It seems to me that encoding and decoding SOAP is the most
complicated step, so my hunch would be to plug Struts into Axis
instead of the other way around. Perhaps you could write a
StrutsProvider class, parallel to the RPC, Message, Wrapped, and
Document providers; this would take the decoded SOAP message and pass
it into Struts. Here's where I think you run into a snag,
considering that Struts is bound to the Servlet API in the execute()
method signature, while it's possible that Axis could have been
triggered by a non-HTTP transport. But if you just took it for
granted that Axis was only working in HTTP (for now), you can get at
the HTTP environment through the Axis MessageContext. It seems that
the Axis JavaDoc isn't online, so it'll take some more investigation
to figure out what this is really all about.
An alternative might be to have a customized Struts RequestProcessor
recognize a SOAP request early on and call on Axis classes to unpack
things before using the struts-config to lookup an action to process
stuff. This might allow you to populate an ActionForm object as the
primary means for passing data in to the Struts Action. You could
then reuse a single Struts Action class at mapped to two different
action paths so that you could have mapping-specific forwards (i.e.
each mapping would have a "success" named-forward, one of which would
make an HTML page and one of which would produce a SOAP response...
I'm going to have to get back to regular work, but I thought I'd see
if this made sense to anyone...
Joe
At 11:16 AM -0700 2003/01/24, Mike Oliver wrote:
>If we start with the idea [Kevin's suggestion] that on the Axis side we
>develop a Web Service that accepts SOAP Requests with an XML payload and
>spins that payload into an HTTP POST/GET to a Struts Application as if
>that POST or GET was coming from a Web Browser. Then we need not make
>any changes to Struts to accept the request as Struts may not know or
>need to know it was from Axis/SOAP (leave that to the application
>developers).
>
>
>
>That presumption then begs some other questions:
>
>
>
>What advantages should this Axis4Struts bring to the table?
>
>
>
>What should we do over and above the minimum accepting of SOAP Requests
>and spinning into an HTTP Browser emulated POST to Struts to add value?
>
>
>
>Do we even bother with GET?
>
>
>
>Since any programmer can use commons-httpclient to form his own java
>emulation of a browser POST to struts, what advantage can we bring with
>Axis4Struts?
>
>
>
>What would the WSDL for an Axis4Struts Web Service look like? What
>messages, what types, etc.
>
>
>
>What should we do within the Struts framework to make it easier for
>developers to have a Forward that returned an XML Payload suitable for
>the Axis4Struts Response?
>
>
>
>Should we use primitive types (Strings, Integers, etc.) only in the
>Axis4Struts.WSDL or should we include alternatives with Java complex
>types? (DynaBeans, NVPair[], etc.)
>
>
>
>What and how should be do the discovery? If a single interface with a
>multi-purpose payload for the Form Data is used, how will developers
>accessing the web service determine what the content of the payload
>should be?
>
>
>
>What role should other common Struts compatible components like Scaffold
>and JSTL and other Axis compatible components like WSIF play in
>Axis4Struts?
>
>
>
>Michael Oliver
>Chief Technology Officer
>AppsAsPeers LLC
>7391 S. Bullrider Ave.
>Tucson, AZ 85747
>520.574.1150 Voice
>520.844.1036 Fax
>520.270.8862 Cell
>http://www.appsaspeers.com <http://www.appsaspeers.com/> Home Page
>5202708862@voicestream.net SMS
>http://www.ollie.ezpeer.net <http://www.ollie.ezpeer.net/> Personal
>Home Page
>http://www.ollie.im-live.com/im-live/ Instant Chat
>MikeOliverAZ@hotmail.com MSN Messenger
>MikeOliverAZ@yahoo.com Yahoo Instant Messenger
>MikeOliverAZ Aol Instant Messenger
>
>
>
>
--
--
Joe Germuska | "Big corporations here now believe we
will have war.
Joe@Germuska.com | Believe all would welcome it as relief to
suspense."
http://blog.germuska.com/ | telegram to President McKinley, 25 March 1898
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>