You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2006/05/16 16:27:50 UTC
svn commit: r406954 [1/3] - in /webservices/axis2/trunk/java: etc/
modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/
modules/codegen/src/org/apache/axis2/wsdl/template/java/
modules/core/src/org/apache/axis2/client/ modules/core/src/org/apac...
Author: gdaniels
Date: Tue May 16 07:27:47 2006
New Revision: 406954
URL: http://svn.apache.org/viewcvs?rev=406954&view=rev
Log:
Catch Axis2 up to refactored Neethi.
Modified:
webservices/axis2/trunk/java/etc/project.properties
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/WSSPolicyProcessor.java
Modified: webservices/axis2/trunk/java/etc/project.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/etc/project.properties?rev=406954&r1=406953&r2=406954&view=diff
==============================================================================
--- webservices/axis2/trunk/java/etc/project.properties (original)
+++ webservices/axis2/trunk/java/etc/project.properties Tue May 16 07:27:47 2006
@@ -112,7 +112,7 @@
log4j.version=1.2.13
maven.itest.plugin.version=1.0
opensaml.version=1.0.1
-policy.version=1.0.1
+policy.version=SNAPSHOT
servletapi.version=2.3
spring.version=1.2.6
stax.api.version=1.0
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java?rev=406954&r1=406953&r2=406954&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/PolicyEvaluator.java Tue May 16 07:27:47 2006
@@ -36,10 +36,10 @@
import org.apache.axis2.modules.PolicyExtension;
import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
import org.apache.axis2.wsdl.util.XSLTConstants;
-import org.apache.ws.policy.AndCompositeAssertion;
+import org.apache.ws.policy.All;
import org.apache.ws.policy.Policy;
import org.apache.ws.policy.PrimitiveAssertion;
-import org.apache.ws.policy.XorCompositeAssertion;
+import org.apache.ws.policy.ExactlyOne;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -144,14 +144,14 @@
HashMap map = new HashMap();
- XorCompositeAssertion XOR = (XorCompositeAssertion) policy.getTerms()
+ ExactlyOne XOR = (ExactlyOne) policy.getTerms()
.get(0);
- AndCompositeAssertion AND = (AndCompositeAssertion) XOR.getTerms().get(
+ All AND = (All) XOR.getTerms().get(
0);
for (Iterator iterator = AND.getTerms().iterator(); iterator.hasNext();) {
- AndCompositeAssertion nAND = new AndCompositeAssertion();
+ All nAND = new All();
PrimitiveAssertion pa = (PrimitiveAssertion) iterator.next();
String namespace = pa.getName().getNamespaceURI();
@@ -184,10 +184,10 @@
}
Policy nPolicy = new Policy();
- XorCompositeAssertion nXOR = new XorCompositeAssertion();
+ ExactlyOne nXOR = new ExactlyOne();
nPolicy.addTerm(nXOR);
- AndCompositeAssertion nAND = (AndCompositeAssertion) map
+ All nAND = (All) map
.get(namespace);
nXOR.addTerm(nAND);
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=406954&r1=406953&r2=406954&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Tue May 16 07:27:47 2006
@@ -652,12 +652,12 @@
policy = (org.apache.ws.policy.Policy) policy.normalize();
}
- org.apache.ws.policy.XorCompositeAssertion xor = (org.apache.ws.policy.XorCompositeAssertion) policy.getTerms().get(0);
+ org.apache.ws.policy.ExactlyOne xor = (org.apache.ws.policy.ExactlyOne) policy.getTerms().get(0);
if (xor.isEmpty()) {
// TODO
throw new RuntimeException("No policy alternative found");
}
- org.apache.ws.policy.AndCompositeAssertion anAlternative = (org.apache.ws.policy.AndCompositeAssertion) xor.getTerms().get(0);
+ org.apache.ws.policy.All anAlternative = (org.apache.ws.policy.All) xor.getTerms().get(0);
java.util.List moduleList = getModules(anAlternative.getTerms());
if (axisDescription instanceof org.apache.axis2.description.AxisService) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java?rev=406954&r1=406953&r2=406954&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/WSDLBasedPolicyProcessor.java Tue May 16 07:27:47 2006
@@ -23,10 +23,10 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.PolicyInclude;
import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.ws.policy.AndCompositeAssertion;
+import org.apache.ws.policy.All;
import org.apache.ws.policy.Policy;
import org.apache.ws.policy.PrimitiveAssertion;
-import org.apache.ws.policy.XorCompositeAssertion;
+import org.apache.ws.policy.ExactlyOne;
import java.util.ArrayList;
import java.util.HashMap;
@@ -89,9 +89,9 @@
policy = (Policy) policy.normalize();
}
- XorCompositeAssertion XOR = (XorCompositeAssertion) policy
+ ExactlyOne XOR = (ExactlyOne) policy
.getTerms().get(0);
- AndCompositeAssertion AND = (AndCompositeAssertion) XOR
+ All AND = (All) XOR
.getTerms().get(0);
Iterator pAsserations = AND.getTerms().iterator();
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java?rev=406954&r1=406953&r2=406954&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java Tue May 16 07:27:47 2006
@@ -18,7 +18,6 @@
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.util.StAXUtils;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.impl.llom.OMNamespaceImpl;
import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.wsdl.SOAPHeaderMessage;
@@ -34,20 +33,20 @@
/*
* Copyright 2004,2005 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
- *
- *
+ *
+ *
*/
public class AxisService2OM implements Java2WSDLConstants {
@@ -57,7 +56,7 @@
private String[] url;
private String targetNamespace;
-
+
private OMElement definition;
private OMNamespace soap;
@@ -101,7 +100,7 @@
DEFAULT_WSDL_NAMESPACE_PREFIX);
OMElement ele = fac.createOMElement("definitions", wsdl);
setDefinitionElement(ele);
-
+
Map nameSpaceMap = axisService.getNameSpacesMap();
Iterator keys = nameSpaceMap.keySet().iterator();
while (keys.hasNext()) {
@@ -148,7 +147,7 @@
wsdlTypes.addChild(staxOMBuilder.getDocumentElement());
}
}
-
+
generateMessages(fac, ele);
generatePortType(fac, ele);
@@ -175,7 +174,7 @@
private void generateMessages(OMFactory fac,
OMElement defintions) {
HashSet faultMessageNames = new HashSet();
-
+
Iterator operations = axisService.getOperations();
while (operations.hasNext()) {
AxisOperation axisOperation = (AxisOperation) operations.next();
@@ -383,7 +382,7 @@
+ axisService.getName() + BINDING_NAME_SUFFIX, null);
addExtensionElement(fac, port, SOAP_ADDRESS, LOCATION, urlString,
soap);
-
+
addPolicy(PolicyInclude.PORT_POLICY,
axisService.getPolicyInclude(), service, fac);
}
@@ -446,7 +445,7 @@
TRANSPORT_URI, STYLE, style, soap);
// Add WS-Addressing UsingAddressing element if appropriate
- // SHOULD be on the binding element per the specification
+ // SHOULD be on the binding element per the specification
if(axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_OPTIONAL)){
OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
@@ -454,7 +453,7 @@
OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
}
-
+
Iterator operations = axisService.getOperations();
while (operations.hasNext()) {
AxisOperation axisOperation = (AxisOperation) operations.next();
@@ -565,7 +564,7 @@
OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
}
-
+
Iterator operations = axisService.getOperations();
while (operations.hasNext()) {
AxisOperation axisOperation = (AxisOperation) operations.next();
@@ -810,8 +809,8 @@
bais)).getDocumentElement());
} else if (policyElement instanceof PolicyReference) {
- OMNamespace ns = factory.createOMNamespace(PolicyConstants.WS_POLICY_NAMESPACE_URI, PolicyConstants.WS_POLICY_PREFIX);
- OMElement refElement = factory.createOMElement(PolicyConstants.WS_POLICY_REFERENCE, ns);
+ OMNamespace ns = factory.createOMNamespace(PolicyConstants.POLICY_NAMESPACE_URI, PolicyConstants.POLICY_PREFIX);
+ OMElement refElement = factory.createOMElement(PolicyConstants.POLICY_REFERENCE, ns);
String policyURIString = ((PolicyReference) policyElement).getPolicyURIString();
OMAttribute attribute = factory.createOMAttribute("URI", null, policyURIString);
refElement.addAttribute(attribute);