axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r560204 - in /webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2: description/AxisBinding.java description/AxisService2WSDL11.java description/AxisService2WSDL20.java util/WSDLSerializationUtil.java
Date Fri, 27 Jul 2007 11:45:57 GMT
Author: deepal
Date: Fri Jul 27 04:45:55 2007
New Revision: 560204

URL: http://svn.apache.org/viewvc?view=rev&rev=560204
Log:
fixing resin  ?wsdl issues


Modified:
    webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
    webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
    webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
    webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java

Modified: webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisBinding.java?view=diff&rev=560204&r1=560203&r2=560204
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
(original)
+++ webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
Fri Jul 27 04:45:55 2007
@@ -125,7 +125,9 @@
      */
     public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace wsoap,
                               OMNamespace whttp, String interfaceName, Map nameSpaceMap,
-                              String addressingFlag, String serviceName) {
+                              String addressingFlag,
+                              String serviceName,
+                              OMNamespace wsaw) {
         String property;
         OMFactory omFactory = OMAbstractFactory.getOMFactory();
         OMElement bindingElement;
@@ -171,7 +173,7 @@
             }
 
             WSDLSerializationUtil
-                    .addWSAddressingToBinding(addressingFlag, omFactory, bindingElement);
+                    .addWSAddressingToBinding(addressingFlag, omFactory, bindingElement,
wsaw);
 
         } else if (WSDL2Constants.URI_WSDL2_HTTP.equals(type)) {
             // HTTP Binding specific properties

Modified: webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?view=diff&rev=560204&r1=560203&r2=560204
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
(original)
+++ webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
Fri Jul 27 04:45:55 2007
@@ -73,6 +73,8 @@
 
     private OMNamespace wsdl;
 
+    private OMNamespace wsaw;
+
     private String style = DOCUMENT;
 
     private String use = LITERAL;
@@ -135,6 +137,7 @@
         soap12 = ele.declareNamespace(URI_WSDL12_SOAP, SOAP12_PREFIX);
         http = ele.declareNamespace(HTTP_NAMESPACE, HTTP_PREFIX);
         mime = ele.declareNamespace(MIME_NAMESPACE, MIME_PREFIX);
+        wsaw =ele.declareNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
         String prefix = WSDLSerializationUtil.getPrefix(axisService.getTargetNamespace(),
                                                         namespaceMap);
         if (prefix == null || "".equals(prefix)) {
@@ -369,7 +372,7 @@
                     addPolicyAsExtElement(PolicyInclude.INPUT_POLICY,
                                           inaxisMessage.getPolicyInclude(), input);
                     WSDLSerializationUtil.addWSAWActionAttribute(input, axisOperation
-                            .getInputAction());
+                            .getInputAction(),wsaw);
                     operation.addChild(input);
                 }
             }
@@ -396,7 +399,7 @@
                     addPolicyAsExtElement(PolicyInclude.OUTPUT_POLICY,
                                           outAxisMessage.getPolicyInclude(), output);
                     WSDLSerializationUtil.addWSAWActionAttribute(output, axisOperation
-                            .getOutputAction());
+                            .getOutputAction(),wsaw);
                     operation.addChild(output);
                 }
             }
@@ -414,7 +417,7 @@
                             + ":" + faultyMessage.getName(), null);
                     fault.addAttribute(ATTRIBUTE_NAME, faultyMessage.getName(), null);
                     WSDLSerializationUtil.addWSAWActionAttribute(fault, axisOperation
-                            .getFaultAction(faultyMessage.getName()));
+                            .getFaultAction(faultyMessage.getName()),wsaw);
                     // TODO add policies for fault messages
                     operation.addChild(fault);
                 }
@@ -548,20 +551,16 @@
         // 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");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         } else if (axisService.getWSAddressingFlag().equals(
                 AddressingConstants.ADDRESSING_REQUIRED)) {
-            OMNamespace wsawNamespace = fac.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         }
 
         for (Iterator operations = axisService.getOperations(); operations.hasNext();) {
@@ -688,20 +687,16 @@
         // 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");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         } else if (axisService.getWSAddressingFlag().equals(
                 AddressingConstants.ADDRESSING_REQUIRED)) {
-            OMNamespace wsawNamespace = fac.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(fac, binding,
                                 AddressingConstants.USING_ADDRESSING,
                                 DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true",
-                                wsawNamespace);
+                    wsaw);
         }
 
         for (Iterator operations = axisService.getOperations(); operations.hasNext();) {

Modified: webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java?view=diff&rev=560204&r1=560203&r2=560204
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
(original)
+++ webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
Fri Jul 27 04:45:55 2007
@@ -30,6 +30,7 @@
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.ws.commons.schema.XmlSchema;
 
@@ -49,6 +50,7 @@
 
     private AxisService axisService;
     private String[] eprs = null;
+    private OMNamespace wsaw;
 
     public AxisService2WSDL20(AxisService service) {
         this.axisService = service;
@@ -82,7 +84,7 @@
         WSDLSerializationUtil.populateNamespaces(descriptionElement, nameSpacesMap);
 
         descriptionElement.declareNamespace(axisService.getTargetNamespace(), axisService.getTargetNamespacePrefix());
-
+        wsaw = descriptionElement.declareNamespace(AddressingConstants.Final.WSAW_NAMESPACE,
"wsaw");
         // Need to add the targetnamespace as an attribute according to the wsdl 2.0 spec
         OMAttribute targetNamespace = omFactory
                 .createOMAttribute(WSDL2Constants.TARGET_NAMESPACE, null,
@@ -248,7 +250,7 @@
                                                    interfaceName,
                                                    axisService.getNamespaceMap(),
                                                    axisService.getWSAddressingFlag(),
-                                                   axisService.getName()));
+                                                   axisService.getName(),wsaw));
             }
 
             descriptionElement.addChild(serviceElement);
@@ -395,7 +397,7 @@
         if (inMessage != null) {
             OMElement inMessageElement = omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME,
wsdl);
             inMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT,
null, WSDLSerializationUtil.getElementName(inMessage, nameSpaceMap)));
-            WSDLSerializationUtil.addWSAWActionAttribute(inMessageElement, axisOperation.getInputAction());
+            WSDLSerializationUtil.addWSAWActionAttribute(inMessageElement, axisOperation.getInputAction(),wsaw);
             WSDLSerializationUtil.addWSDLDocumentationElement(inMessage, inMessageElement,
omFactory, wsdl);
             axisOperationElement.addChild(inMessageElement);
         }
@@ -405,7 +407,7 @@
         if (outMessage != null) {
             OMElement outMessageElement = omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME,
wsdl);
             outMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT,
null, WSDLSerializationUtil.getElementName(outMessage, nameSpaceMap)));
-            WSDLSerializationUtil.addWSAWActionAttribute(outMessageElement, axisOperation.getOutputAction());
+            WSDLSerializationUtil.addWSAWActionAttribute(outMessageElement, axisOperation.getOutputAction(),wsaw);
             WSDLSerializationUtil.addWSDLDocumentationElement(outMessage, outMessageElement,
omFactory, wsdl);
             axisOperationElement.addChild(outMessageElement);
         }
@@ -423,7 +425,7 @@
                     faultElement = omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME,
wsdl);
                 }
                 faultElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF,
null, tns.getPrefix() + ":" + faultMessage.getName()));
-                WSDLSerializationUtil.addWSAWActionAttribute(faultElement, axisOperation.getFaultAction(faultMessage.getName()));
+                WSDLSerializationUtil.addWSAWActionAttribute(faultElement, axisOperation.getFaultAction(faultMessage.getName()),wsaw);
                 WSDLSerializationUtil.addWSDLDocumentationElement(faultMessage, faultElement,
omFactory, wsdl);
                 axisOperationElement.addChild(faultElement);
             }

Modified: webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java?view=diff&rev=560204&r1=560203&r2=560204
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
(original)
+++ webservices/axis2/branches/java/1_3/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
Fri Jul 27 04:45:55 2007
@@ -414,13 +414,13 @@
         }
     }
 
-    public static void addWSAWActionAttribute(OMElement element, String action) {
+    public static void addWSAWActionAttribute(OMElement element,
+                                              String action ,
+                                              OMNamespace wsaw) {
         if (action == null || action.length() == 0) {
             return;
         }
-        OMNamespace namespace = element.declareNamespace(
-                AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
-        element.addAttribute("Action", action, namespace);
+        element.addAttribute("Action", action, wsaw);
     }
 
     public static void addExtensionElement(OMFactory fac, OMElement element,
@@ -433,23 +433,20 @@
 
     public static void addWSAddressingToBinding(String addressingFlag,
                                                 OMFactory omFactory,
-                                                OMElement bindingElement) {
+                                                OMElement bindingElement ,
+                                                OMNamespace wsaw) {
         // Add WS-Addressing UsingAddressing element if appropriate
         // SHOULD be on the binding element per the specification
         if (addressingFlag.equals(AddressingConstants.ADDRESSING_OPTIONAL)) {
-            OMNamespace wsawNamespace = omFactory.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(omFactory, bindingElement,
                                 AddressingConstants.USING_ADDRESSING,
                                 "required", "true",
-                                wsawNamespace);
+                                wsaw);
         } else if (addressingFlag.equals(AddressingConstants.ADDRESSING_REQUIRED)) {
-            OMNamespace wsawNamespace = omFactory.createOMNamespace(
-                    AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
             WSDLSerializationUtil.addExtensionElement(omFactory, bindingElement,
                                 AddressingConstants.USING_ADDRESSING,
                                 "required", "true",
-                                wsawNamespace);
+                                wsaw);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message