The JavaWorld article is indeed pretty good, except for the predating of
the XHMTL tag in the struts-html tag library.

Also it seems to me that the meat of the servlet they use in their
example code could be encapsulated in a single custom tag that inserted
the xml in the output.

So if you take the service(...) method out of the XSLServlet (attached)
and build a custom parameterized tag the Axis4Struts.jsp would then look
more like this:

<%@ page contentType="text/xml" %>
<%@ taglib prefix="axis" uri="http://jakarta.apache.org/struts/axis";
%>
<payLoad>
    <axis:write name="payLoad" formBean="true" resultBean="true"
requestXML="true"/>
</payLoad>

If we make the formBean, resultBean and requestXML parameters to the
custom tag, then we can selectively output any of those three as the xml
payload for Axis.  Or we could split them into three custom tags

<%@ page contentType="text/xml" %>
<%@ taglib prefix="axis" uri="http://jakarta.apache.org/struts/axis";
%>
<payLoad>
    <axis:write name="formBeanXML"/>
    <axis:write name="resultBeanXML"/>
    <axis:write name="requestXML"/>
</payLoad>

Michael Oliver
AppsAsPeers LLC
7391 S. Bullrider Ave.
Tucson, AZ 85747
Phone:(520)574-1150
Fax:(520)844-1036

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 28, 2003 8:23 AM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: Re: [AXIS4STRUTS]Generating XML from Struts JSP



The XTags that are part of the Jakarta taglibs may be worth evaluating.


      http://jakarta.apache.org/taglibs/doc/xtags-doc/index.html

Also, here's a link to a a pretty current article describing one method
of
generating XML responses from Struts. It looks like a good reference in
general.


http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html?

Kevin






 

 

             "Michael Oliver"                  To:
<[EMAIL PROTECTED]>

             <[EMAIL PROTECTED]>           cc: (bcc: Kevin
Bedell/Systems/USHO/SunLife)                                            
             01/28/2003 12:04 AM               Subject:
[AXIS4STRUTS]Generating XML from Struts JSP

             Please respond to "Struts

             Users Mailing List"

 

 





Has anyone used JSP with Struts to generate XML?
http://java.sun.com/products/jsp/html/JSPXML.html

Would anyone be interested in a struts-xml.tld and the associated custom
tag classes?

If so what kinds of tags would you want? bean name and value?

Can we just add a few XML oriented tags to the struts-html.tld and
html/custom tag classes?

DynaBean Tags?

Build an xml document from the contents of a DynaBean?

Just some of the things we might want for Axis4Struts and others may
want
too.

Ollie






------------------------------------------------------------------------
---
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:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Attachment: XSLServlet.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to