Author: dkulp
Date: Fri Jun 12 17:09:31 2009
New Revision: 784202
URL: http://svn.apache.org/viewvc?rev=784202&view=rev
Log:
Merged revisions 784183 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r784183 | dkulp | 2009-06-12 12:29:32 -0400 (Fri, 12 Jun 2009) | 3 lines
[CXF-2281] WS-PolicyAttachment support for Java First services
Patch from Dominic Harries applied (with some modifications)
From University of Southampton IT Innovation Centre
........
Added:
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/appended-resources/
- copied from r784183, cxf/trunk/rt/ws/policy/src/main/appended-resources/
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/appended-resources/META-INF/
- copied from r784183,
cxf/trunk/rt/ws/policy/src/main/appended-resources/META-INF/
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/appended-resources/META-INF/NOTICE
- copied unchanged from r784183,
cxf/trunk/rt/ws/policy/src/main/appended-resources/META-INF/NOTICE
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServiceModelPolicyUpdater.java
- copied unchanged from r784183,
cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ServiceModelPolicyUpdater.java
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/distribution/src/main/appended-resources/META-INF/NOTICE
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/ExternalAttachmentProvider.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 12 17:09:31 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784182
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784183
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 12 17:09:31 2009
@@ -1 +1 @@
-/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784182
+/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784183
Modified:
cxf/branches/2.2.x-fixes/distribution/src/main/appended-resources/META-INF/NOTICE
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/src/main/appended-resources/META-INF/NOTICE?rev=784202&r1=784201&r2=784202&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/distribution/src/main/appended-resources/META-INF/NOTICE
(original)
+++
cxf/branches/2.2.x-fixes/distribution/src/main/appended-resources/META-INF/NOTICE
Fri Jun 12 17:09:31 2009
@@ -24,6 +24,8 @@
This Product also includes software developed by David Heinemeier Hansson.
(http://dev.rubyonrails.org/browser/trunk/activesupport/lib/active_support/inflections.rb)
+This product includes software Copyright University of Southampton IT
Innovation Centre, 2009
+(http://www.it-innovation.soton.ac.uk).
This product also includes MTOSI wsdl and schemas developed by the
TeleManagement Forum (http://www.tmforum.org/browse.aspx). The original
Modified:
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java?rev=784202&r1=784201&r2=784202&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java
Fri Jun 12 17:09:31 2009
@@ -33,6 +33,7 @@
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.feature.AbstractFeature;
import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.ws.policy.attachment.external.ExternalAttachmentProvider;
import org.apache.cxf.ws.policy.attachment.reference.ReferenceResolver;
import org.apache.cxf.ws.policy.attachment.reference.RemoteReferenceResolver;
import org.apache.neethi.Policy;
@@ -123,6 +124,14 @@
EndpointInfo ei = endpoint.getEndpointInfo();
EndpointPolicy ep = pe.getServerEndpointPolicy(ei, null);
pe.setServerEndpointPolicy(ei, ep.updatePolicy(p));
+
+ // Add policy to the service model (and consequently to the WSDL)
+ ServiceModelPolicyUpdater pu = new ServiceModelPolicyUpdater(ei);
+ for (PolicyProvider pp : ((PolicyEngineImpl) pe).getPolicyProviders())
{
+ if (pp instanceof ExternalAttachmentProvider) {
+ pu.addPolicyAttachments(((ExternalAttachmentProvider)
pp).getAttachments());
+ }
+ }
}
private Policy initializeEndpointPolicy(Endpoint endpoint, Bus bus) {
Modified:
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/ExternalAttachmentProvider.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/ExternalAttachmentProvider.java?rev=784202&r1=784201&r2=784202&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/ExternalAttachmentProvider.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/ExternalAttachmentProvider.java
Fri Jun 12 17:09:31 2009
@@ -247,7 +247,7 @@
attachments = a;
}
- Collection<PolicyAttachment> getAttachments() {
+ public Collection<PolicyAttachment> getAttachments() {
return attachments;
}