[Zope-PAS] Re: plonePAS and JAX-WS
Tres Seaver
tseaver at palladion.com
Fri Aug 25 10:17:26 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zachery Bir wrote:
> On Aug 25, 2006, at 5:40 AM, Jens Vagelpohl wrote:
>
>> On 25 Aug 2006, at 05:47, Serge Zagorac wrote:
>>
>>> Hi All
>>>
>>> Is there any way or example how to configure plonePAS to consume a web
>>> service (in my case JAX-WS via SOAP ) in order to get user details?
>>
>> This won't be a configuration issue, it will be a coding issue. You
>> don't mention specifically what "consume a web service" means, but you
>> might be able to put together a Scriptable Multiplugin or write your
>> own filesystem-based plugin to do the job.
>>
>> However, there is one big caveat. Making HTTP calls (or almost any
>> other network request) out of Zope code during the execution of a web
>> request is risky. The executing thread will wait until the external
>> request has been answered, and if for whatever reason no answer is
>> received it will hang forever. There are four threads available in a
>> normal Zope configuration, the fourth time this happens your website
>> will be unavailable and Zope must be restarted. A lot of care needs to
>> be taken to ensure there are sensible timeouts on these external calls
>> to prevent hangs.
>
> You can get around it, though, if you use something like Zasync. A bit
> heavy-handed, but it's there for ya. :^)
You can't authenticate asynchronously -- the original request is stalled
untill the out-of-process call returns, and there is no way to release
the thread / connection pool it is using.
For the original poster's question: a ScriptableMultiplugin can contain
PythonScripts, ExternalMethods, etc., as well as a RAMCacheManager. You
could implement 'authenticateCredentials' to call an ExternalMethod, for
instance, and then cache the result. You still need to find a way to
deal with the edge case where the service is unavailable: for instance,
you might need to use a module which allowed for timeouts on the service
call.
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE7wZ1+gerLs4ltQ4RAjrPAKC4CZLwnDPOaWUkVTOouPCvMbuGJACbBmMr
bgj1ViBpAKXfxWzs+wxFcbI=
=OEAV
-----END PGP SIGNATURE-----
More information about the Zope-PAS
mailing list