Re: Subetha 0.9 and Web services
From
Jeff Schnitzer
Oct 29, 2006 9:11 PM
I've looked this over and it's not an API that we can directly provide.
It completely circumvents the security model of SubEtha and and allows
anyone to subscribe and unsubscribe anyone else.
However, you can fairly easily and efficiently provide this API to
yourself without modifying SubEtha code at all. Here's what you want to do:
1) Create an independent project that builds an ejb-jar and that
compiles against the subetha-api.jar. This can be found inside
subetha.ear/subetha.sar (the sar file inside the ear).
2) Provide the API you want; in this case subscribe() and unsubscribe().
3) Put @RunAs("siteAdmin") at the top of your EJB class.
4) Call the methods on the subetha Admin interface instead of the
AccountMgr interface. This allows you to avoid the token-emailing
roundtrip. You can get the ID of a list from it's email address by
calling the ListMgr.getListByEmail() method I just created.
5) Package up your jar and drop it in the JBoss deploy directory.
This way you can provide any kind of web service API you want bypassing
security as much as you care, dependent only on our public API.
If you run into any trouble along this process, I'm happy to help.
Jeff
Nadeem M Nayeck wrote:
> Find attached the web service layer, and a modified version of
> AccountMgrBean.java :)
> I have an axis-generated ws client that i use to test the available WS
> operations.
> regards,
> Nadeem
>
> On 26/10/06, Jeff Schnitzer <jeff@infohazard.org> wrote:
>> Certainly - it can always help us understand what you're trying to do
>> :-)
>>
>> Jeff
>>
>> Nadeem Nayeck wrote:
>> > I added a separate class that exposes subscription and
>> unsubcription operations to subetha-0.8. I think that can be ported
>> to 0.9 without affecting any already written code in 0.9. Would you
>> like to review it? Anyone ?
>> >
>> > regards,
>> > Nadeem
>> > _______________________________________________
>> > SubEtha Development mailing list
>> > dev@subethamail.org
>> > http://www.subethamail.org/se/list/dev
>> > http://www.subethamail.org/se/archive_msg.jsp?msgId=8420
>> >
>>
>> _______________________________________________
>> SubEtha Development mailing list
>> dev@subethamail.org
>> http://www.subethamail.org/se/list/dev
>> http://www.subethamail.org/se/archive_msg.jsp?msgId=8426
>>
Thread History