Hi All,

And thanks for all the help and advice given.
I have decided to use a request header as an attribute to inform the struts
action what type of request is coming as mentioned by Martin.

Thanks,
Indi
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On
Behalf Of Indika Maligaspe
Sent: Monday, September 21, 2009 7:46 AM
To: 'Struts Users Mailing List'
Subject: RE: How to read an XML request from struts

I would also like to know what Martin has queried, if there is a way, then
it will be great.

indi


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On
Behalf Of Martin Gainty
Sent: Sunday, September 20, 2009 8:33 PM
To: Struts Users Mailing List
Subject: RE: How to read an XML request from struts


Tommy/Wes
is there any way to autodetect which converter to use for jibx?
public static final String contentTypeXML = "text/xml; charset=UTF-8;
type=jibx";thanks,
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.




> Date: Sun, 20 Sep 2009 10:56:57 -0400
> Subject: Re: How to read an XML request from struts
> From: [email protected]
> To: [email protected]
> 
> A good struts-y way to do it would be to create a converter that can
> convert the xml to an instance of your business object, maybe using
> xstream or jixb. Then set a field on your action of the said business
> type an configure the converter for that action.
> 
> -Wes
> 
> 
> On 9/20/09, Tommy Pham <[email protected]> wrote:
> > ----- Original Message ----
> >> From: indikamaligaspe <[email protected]>
> >> To: [email protected]
> >> Sent: Friday, September 18, 2009 10:53:48 AM
> >> Subject: How to read an XML request from struts
> >>
> >>
> >> Hi,
> >>
> >> I have situation where some users will be posting an XML message (using
a
> >> java client) and some HTML forms to my application running in struts. I
> >> want
> >> to know if there is a way that I can recognize the two different
requests
> >> from my struts acton class.
> >>
> >> Because once I identify the two, I can always handle the two requests
> >> seperately with my request handlers, the problem is identifying the two
> >> requests seperately.
> >>
> >> Thanks
> >> Indi
> >> --
> >> View this message in context:
> >>
http://www.nabble.com/How-to-read-an-XML-request-from-struts-tp25512907p2551
2907.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >
> > getContentType() from org.apache.struts2.dispatcher.StreamResult ?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> 
> 
> -- 
> Wes Wannemacher
> 
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

_________________________________________________________________
Ready for Fall shows? Use Bing to find helpful ratings and reviews on
digital tv's.
http://www.bing.com/shopping/search?q=digital+tv's&form=MSHNCB&publ=WLHMTAG&
crea=TEXT_MSHNCB_Vertical_Shopping_DigitalTVs_1x1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to