You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mulligan, Scott H" <sc...@eds.com> on 2006/03/10 19:51:41 UTC
Web Service fronting a Struts app
I have a Struts 1.1 application running for my employer. Now I am being asked if I can create a web service that acts as a front door to the Struts application. Has anyone ever done this? Is there a way to extend Struts to read a SOAP body in the HttpRequest instead of the regular request parameters? I don't have much Web Services practical experience, but I do understand the concepts.
Thanks for any input you can provide.
Scott
Re: Extending PropertyMessageResources
Posted by James Mitchell <jm...@apache.org>.
Extend the factory as well, and specify that in the struts-config.xml
--
James Mitchell
EdgeTech, Inc.
http://edgetechservices.net/
678.910.8017
Skype: jmitchtx
On Mar 15, 2006, at 1:41 PM, Mulligan, Scott H wrote:
> I need to customize the order in which resource bundles are read
> for messages. Specifically, I have default bundles for groups to
> which a country belongs. First I search the bundle for the language/
> country (fr_FR). If I can't find the property, I want to search the
> group resource bundles to which France belongs (there can be
> multiple - i.e. fr_Group1, fr_Group2). After that I would look in
> the bundle for the language (fr) and the default bundle.
>
> My research shows I need to extend the PropertyMessageResources
> class. How can I indicate to Struts objects that they should use my
> class instead of PropertyMessageResources?
>
> Thanks,
> Scott Mulligan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Extending PropertyMessageResources
Posted by "Mulligan, Scott H" <sc...@eds.com>.
I need to customize the order in which resource bundles are read for messages. Specifically, I have default bundles for groups to which a country belongs. First I search the bundle for the language/country (fr_FR). If I can't find the property, I want to search the group resource bundles to which France belongs (there can be multiple - i.e. fr_Group1, fr_Group2). After that I would look in the bundle for the language (fr) and the default bundle.
My research shows I need to extend the PropertyMessageResources class. How can I indicate to Struts objects that they should use my class instead of PropertyMessageResources?
Thanks,
Scott Mulligan
Re: Web Service fronting a Struts app
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Just to save anyone that might be interested time, here's what you'll want
to read:
http://sourceforge.net/docman/display_doc.php?docid=26792&group_id=126469
That pretty well explains it all (although I think I see a mistake with
regard to specifying the RP in struts-config, but the example app shows it
properly in any case).
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
On Fri, March 10, 2006 1:57 pm, Frank W. Zammetti said:
> Your wish is my command:
>
> http://sourceforge.net/projects/strutsws
>
> This is actually for Struts 1.2.4 IIRC, and a port to 1.3 was contributed
> as well, but I doubt you would have much trouble back-porting it to 1.1.
> The key is a custom RP, so it should just be a matter of copying the new
> code into a 1.1 RP.
>
> Of course, if you could upgrade your app to 1.2.x, so much the better :)
> Also note that a version using the Tiles RP was never written, so you
> couldn't use this as-is, even with the right version of Struts, if you
> were using Tiles. Again, probably not a big deal to move the code to an
> Tiles RP, it just never got done.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> On Fri, March 10, 2006 1:51 pm, Mulligan, Scott H said:
>> I have a Struts 1.1 application running for my employer. Now I am being
>> asked if I can create a web service that acts as a front door to the
>> Struts application. Has anyone ever done this? Is there a way to extend
>> Struts to read a SOAP body in the HttpRequest instead of the regular
>> request parameters? I don't have much Web Services practical experience,
>> but I do understand the concepts.
>>
>> Thanks for any input you can provide.
>>
>> Scott
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Web Service fronting a Struts app
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Your wish is my command:
http://sourceforge.net/projects/strutsws
This is actually for Struts 1.2.4 IIRC, and a port to 1.3 was contributed
as well, but I doubt you would have much trouble back-porting it to 1.1.
The key is a custom RP, so it should just be a matter of copying the new
code into a 1.1 RP.
Of course, if you could upgrade your app to 1.2.x, so much the better :)
Also note that a version using the Tiles RP was never written, so you
couldn't use this as-is, even with the right version of Struts, if you
were using Tiles. Again, probably not a big deal to move the code to an
Tiles RP, it just never got done.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
On Fri, March 10, 2006 1:51 pm, Mulligan, Scott H said:
> I have a Struts 1.1 application running for my employer. Now I am being
> asked if I can create a web service that acts as a front door to the
> Struts application. Has anyone ever done this? Is there a way to extend
> Struts to read a SOAP body in the HttpRequest instead of the regular
> request parameters? I don't have much Web Services practical experience,
> but I do understand the concepts.
>
> Thanks for any input you can provide.
>
> Scott
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Web Service fronting a Struts app
Posted by Dave Newton <ne...@pingsite.com>.
Mulligan, Scott H wrote:
> I have a Struts 1.1 application running for my employer. Now I am being asked if I can create a web service that acts as a front door to the Struts application. Has anyone ever done this? Is there a way to extend Struts to read a SOAP body in the HttpRequest instead of the regular request parameters? I don't have much Web Services practical experience, but I do understand the concepts.
>
I did something similar, but took a different approach. I took an
existing Struts application, refactored out the base functionality, and
built a webservice on top of it. I changed the Struts app to use the
same libraries the service used (rather than using the webservice from
within Struts, probably to save time or something).
I ended up with an easy-to-test base functionality that I could throw
stuff on top of.
I'd be interested in hearing other thoughts about good ways to go about
this as I may be doing something similar quite soon.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org