Author: ema
Date: Tue May 24 14:58:31 2011
New Revision: 1127100
URL: http://svn.apache.org/viewvc?rev=1127100&view=rev
Log:
Merged revisions 1127076 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1127076 | ema | 2011-05-24 22:23:58 +0800 (Tue, 24 May 2011) | 1 line
[CXF-3544]:ignore the build failed policy
........
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 24 14:58:31 2011
@@ -1 +1 @@
-/cxf/trunk:1099767,1100898,1101399,1102198,1103904,1104144,1104180,1104217,1104230,1124357,1125115,1125289,1125323,1126906
+/cxf/trunk:1099767,1100898,1101399,1102198,1103904,1104144,1104180,1104217,1104230,1124357,1125115,1125289,1125323,1126906,1127076
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java?rev=1127100&r1=1127099&r2=1127100&view=diff
==============================================================================
---
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
(original)
+++
cxf/branches/2.3.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
Tue May 24 14:58:31 2011
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import java.util.logging.Logger;
import javax.wsdl.Definition;
import javax.wsdl.extensions.ExtensibilityElement;
@@ -31,6 +32,7 @@ import javax.xml.namespace.QName;
import org.apache.cxf.Bus;
import org.apache.cxf.common.injection.NoJSR250Annotations;
+import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.service.model.AbstractDescriptionElement;
@@ -60,6 +62,7 @@ import org.apache.neethi.PolicyReference
@NoJSR250Annotations
public class Wsdl11AttachmentPolicyProvider extends AbstractPolicyProvider
implements PolicyProvider {
+ private static final Logger LOG =
LogUtils.getL7dLogger(Wsdl11AttachmentPolicyProvider.class);
public Wsdl11AttachmentPolicyProvider() {
this(null);
@@ -181,10 +184,15 @@ public class Wsdl11AttachmentPolicyProvi
if (PolicyConstants.isPolicyElem(e.getElementType())
&& !StringUtils.isEmpty(uri)) {
- Policy policy = builder.getPolicy(e.getElement());
- String fragement = "#" + uri;
- registry.register(fragement, policy);
- registry.register(di.getBaseURI() + fragement, policy);
+ try {
+ Policy policy = builder.getPolicy(e.getElement());
+ String fragement = "#" + uri;
+ registry.register(fragement, policy);
+ registry.register(di.getBaseURI() + fragement,
policy);
+ } catch (Exception policyEx) {
+ //ignore the policy can not be built
+ LOG.warning("Failed to build the policy '" + uri +
"':" + policyEx.getMessage());
+ }
}
}
}