axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r681005 - /webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Date Wed, 30 Jul 2008 13:07:09 GMT
Author: nandana
Date: Wed Jul 30 06:07:06 2008
New Revision: 681005

URL: http://svn.apache.org/viewvc?rev=681005&view=rev
Log:
AXIS2-3915, AXIS2-3950 Picking the policies as attributes on portType/operation/message

Modified:
    webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java

Modified: webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=681005&r1=681004&r2=681005&view=diff
==============================================================================
--- webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Wed Jul 30 06:07:06 2008
@@ -569,6 +569,8 @@
 
 	private void populatePortType(PortType wsdl4jPortType,
                                   Definition portTypeWSDL) throws AxisFault {
+	           copyExtensionAttributes(wsdl4jPortType.getExtensionAttributes(),
+                           axisService, PORT_TYPE);
         List wsdl4jOperations = wsdl4jPortType.getOperations();
 
         // Added to use in ?wsdl2 as the interface name
@@ -1290,8 +1292,11 @@
             axisOperation.setPolicyInclude(policyInclude);
         }
 
-        copyExtensibleElements(wsdl4jOperation.getExtensibilityElements(), dif,
+        copyExtensionAttributes(wsdl4jOperation.getExtensionAttributes(),
                                axisOperation, PORT_TYPE_OPERATION);
+        
+        //copyExtensionAttributes(wsdl4jPortType.getExtensionAttributes(),
+        //        axisService, PORT_TYPE);
 
         Input wsdl4jInputMessage = wsdl4jOperation.getInput();
 
@@ -1302,8 +1307,8 @@
                 Message message = wsdl4jInputMessage.getMessage();
                 if (null != message) {
                     inMessage.setName(message.getQName().getLocalPart());
-                    copyExtensibleElements(message.getExtensibilityElements(),
-                                           dif, inMessage, PORT_TYPE_OPERATION_INPUT);
+                    copyExtensionAttributes(wsdl4jInputMessage.getExtensionAttributes(),
+                                          inMessage, PORT_TYPE_OPERATION_INPUT);
 
                 }
                 // Check if the action is already set as we don't want to
@@ -1334,8 +1339,8 @@
                 if (null != message) {
 
                     outMessage.setName(message.getQName().getLocalPart());
-                    copyExtensibleElements(message.getExtensibilityElements(),
-                                           dif, outMessage, PORT_TYPE_OPERATION_OUTPUT);
+                    copyExtensionAttributes(wsdl4jOutputMessage.getExtensionAttributes(),
+                                           outMessage, PORT_TYPE_OPERATION_OUTPUT);
 
                     // wsdl:portType -> wsdl:operation -> wsdl:output
                 }
@@ -1366,8 +1371,8 @@
                 if (null != message) {
 
                     inMessage.setName(message.getQName().getLocalPart());
-                    copyExtensibleElements(message.getExtensibilityElements(),
-                                           dif, inMessage, PORT_TYPE_OPERATION_OUTPUT);
+                    copyExtensionAttributes(wsdl4jInputMessage.getExtensionAttributes(),
+                                           inMessage, PORT_TYPE_OPERATION_OUTPUT);
 
                 }
                 // Check if the action is already set as we don't want to
@@ -1392,8 +1397,8 @@
                 if (null != message) {
 
                     outMessage.setName(message.getQName().getLocalPart());
-                    copyExtensibleElements(message.getExtensibilityElements(),
-                                           dif, outMessage, PORT_TYPE_OPERATION_INPUT);
+                    copyExtensionAttributes(wsdl4jOutputMessage.getExtensionAttributes(),
+                                           outMessage, PORT_TYPE_OPERATION_INPUT);
 
                     // wsdl:portType -> wsdl:operation -> wsdl:output
                 }
@@ -2765,10 +2770,18 @@
                         ref = new PolicyReference();
                         ref.setURI(uris[i]);
 
-                        if (PORT_TYPE.equals(origin)) {
-                            PolicySubject subject = description
-                                            .getPolicySubject();
-                            subject.attachPolicyReference(ref);
+                        if (PORT_TYPE.equals(origin)
+                                || PORT_TYPE_OPERATION.equals(origin)
+                                || PORT_TYPE_OPERATION_INPUT.equals(origin) 
+                                || PORT_TYPE_OPERATION_OUTPUT.equals(origin)) {
+                            
+                            if (description != null) {
+                                PolicySubject subject = description.getPolicySubject();
+                                
+                                if (subject != null) {
+                                    subject.attachPolicyReference(ref);
+                                }
+                            }
                         }
                     }
                 }



Mime
View raw message