Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 60598 invoked from network); 30 Jul 2008 13:08:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 13:08:02 -0000 Received: (qmail 26694 invoked by uid 500); 30 Jul 2008 13:08:01 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 26581 invoked by uid 500); 30 Jul 2008 13:08:01 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 26572 invoked by uid 500); 30 Jul 2008 13:08:01 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 26569 invoked by uid 99); 30 Jul 2008 13:08:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 06:08:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 13:07:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3CF5A238899C; Wed, 30 Jul 2008 06:07:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: axis2-cvs@ws.apache.org From: nandana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080730130711.3CF5A238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); + } + } } } }