[
https://issues.apache.org/jira/browse/CXF-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15326094#comment-15326094
]
Manikandan commented on CXF-5216:
---------------------------------
Hi Freeman,
I am using like below, but it doesnot work, Can you please help
try {
Bus bus = BusFactory.getDefaultBus();
Map<Object, Definition> definitions =
bus.getExtension(WSDLManagerImpl.class).getDefinitions();
if(!definitions.isEmpty()){
for (Map.Entry<Object, Definition> entry : definitions.entrySet()) {
LOGGER.info("Key : " + entry.getKey() + " Value : " + entry.getValue());
}
Definition extensionDefinition =
bus.getExtension(WSDLManagerImpl.class).getDefinition(endPointUrl);
bus.getExtension(WSDLManager.class).removeDefinition(bus.getExtension(WSDLManager.class).getDefinition(endPointUrl));
}else{
LOGGER.info("No WSDL Definitions available for - " + endPointUrl);
}
} catch (Exception excep) {
LOGGER.error("Error while getting WSDL Definitions: ", excep);
}
> WSDL definition cache issue for web service client when WSDL in service war
> changed
> -----------------------------------------------------------------------------------
>
> Key: CXF-5216
> URL: https://issues.apache.org/jira/browse/CXF-5216
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.6.2
> Reporter: Bin Zhu
> Assignee: Freeman Fang
> Fix For: Invalid
>
> Attachments: CXF-5216-2.patch, CXF-5216.patch
>
>
> In current design, the WSDL definition will be cached in case the the same
> wsdl will be queried later.(WSDLManagerImpl.getDefinition)
> e.g.
> public Definition getDefinition(String url) throws WSDLException {
> synchronized (definitionsMap) {
> if (definitionsMap.containsKey(url)) {
> return definitionsMap.get(url);
> }
> }
> return loadDefinition(url);
> }
> The cache mechanism indeed improves the performance in most scenarios. But if
> the WSDL file in service provider app changed, the client will not get the
> correct WSDL definition even using retrieves the wsdl from server dynamically
> (http://hostname:portname/xxx?wsdl),unless restarting the client app.
> It would be more reasonable to introduce a client property to allow user to
> disable the definition cache so that they can choose if they get WSDL
> definition from cache or the URL dynamically for their scenarios. Any
> thoughts? Thanks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)