synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiranya Jayathilaka <hiranya...@gmail.com>
Subject Exceptions When Using Endpoints Stored in the Remote Registry
Date Mon, 31 Aug 2009 04:09:39 GMT
Hi Folks,

Currently the AbstractRegistry#getResource method returns endpoints without
initializing them (see the following code snippet from the method).

   if (entry.getMapper() != null) {
            entry.setValue(entry.getMapper().getObjectFromOMNode(omNode));
            if (entry.getValue() instanceof SequenceMediator) {
                SequenceMediator seq = (SequenceMediator) entry.getValue();
                seq.setDynamic(true);
                seq.setRegistryKey(entry.getKey());
            } else if (entry.getValue() instanceof Endpoint) {
                Endpoint ep = (Endpoint) entry.getValue();
            }
   }

As a result when certain types of endpoints (eg: WSDL endpoints) are kept in
the remote registry they cannot be successfully used in proxy services etc.
This is because unless we do not initialize an endpoint, its associated
EndpointContext will not get initialized which leads to errors during
sending messages to the endpoint and specially when routing responses back.
I think we need to fix this up in the AbstractRegistry class. WDYT?

Thanks
-- 
Hiranya Jayathilaka
Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Mime
View raw message