axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r397792 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: deployment/ServiceBuilder.java deployment/util/Utils.java description/AxisService2OM.java
Date Fri, 28 Apr 2006 07:53:16 GMT
Author: deepal
Date: Fri Apr 28 00:53:14 2006
New Revision: 397792

URL: http://svn.apache.org/viewcvs?rev=397792&view=rev
Log:
-fixing target nameSpace problem in generated wsdl ?
 - it was replaying default one 

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=397792&r1=397791&r2=397792&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
Fri Apr 28 00:53:14 2006
@@ -96,7 +96,10 @@
                     service.setTargetNamespace(nameSpeceVale);
                 }
             } else {
-                service.setTargetNamespace(Java2WSDLConstants.DEFAULT_TARGET_NAMESPACE);
+                if (service.getTargetNamespace() == null ||
+                        "".equals(service.getTargetNamespace())) {
+                    service.setTargetNamespace(Java2WSDLConstants.DEFAULT_TARGET_NAMESPACE);
+                }
             }
             //Setting schema namespece if any
             OMElement scheamElement = service_element.getFirstChildWithName(new QName(SCHEMA));
@@ -378,7 +381,7 @@
                     AxisMessage inaxisMessage = op_descrip
                             .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                     if (inaxisMessage != null) {
-                        inaxisMessage.setName(opname);
+                        inaxisMessage.setName(opname + Java2WSDLConstants.MESSAGE_SUFFIX);
                     }
                 }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java?rev=397792&r1=397791&r2=397792&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
Fri Apr 28 00:53:14 2006
@@ -193,7 +193,7 @@
                 AxisMessage inMessage = operation.getMessage(
                         WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                 if (inMessage != null) {
-                    inMessage.setName(opName);
+                    inMessage.setName(opName + Java2WSDLConstants.MESSAGE_SUFFIX);
                     inMessage.setElementQName(table.getComplexSchemaType(jmethod.getSimpleName()));
                 }
                 if (!jmethod.getReturnType().isVoidType()) {
@@ -242,7 +242,7 @@
         AxisMessage inMessage = operation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
         if (inMessage != null) {
             inMessage.setElementQName(table.getComplexSchemaType(jmethod.getSimpleName()));
-            inMessage.setName(opName);
+            inMessage.setName(opName + Java2WSDLConstants.MESSAGE_SUFFIX);
         }
         return operation;
     }

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=397792&r1=397791&r2=397792&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
Fri Apr 28 00:53:14 2006
@@ -124,9 +124,9 @@
         String prefix = getPrefix(axisService.getTargetNamespace());
         if (prefix == null || "".equals(prefix)) {
             prefix = DEFAULT_TARGET_NAMESPACE_PREFIX;
-            axisService.getNameSpacesMap().put(prefix,
-                    axisService.getTargetNamespace());
         }
+        axisService.getNameSpacesMap().put(prefix,
+                    axisService.getTargetNamespace());
         tns = ele.declareNamespace(axisService.getTargetNamespace(), prefix);
 
         ele.addAttribute("targetNamespace", axisService.getTargetNamespace(),
@@ -177,7 +177,7 @@
 
 
     private void generateMessages(OMFactory fac,
-                                  OMElement defintions) {
+                                  OMElement defintions) {
         Iterator operations = axisService.getOperations();
         while (operations.hasNext()) {
             AxisOperation axisOperation = (AxisOperation) operations.next();
@@ -250,7 +250,7 @@
         OMElement messageElement = fac
                 .createOMElement(MESSAGE_LOCAL_NAME, wsdl);
         messageElement.addAttribute(ATTRIBUTE_NAME, axismessage.getName()
-                + MESSAGE_SUFFIX, null);
+                , null);
         defintions.addChild(messageElement);
         if (scheamElementName != null) {
             OMElement messagePart = fac.createOMElement(PART_ATTRIBUTE_NAME,
@@ -301,7 +301,7 @@
                     OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME,
                             wsdl);
                     input.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
-                            + ":" + inaxisMessage.getName() + MESSAGE_SUFFIX,
+                            + ":" + inaxisMessage.getName() ,
                             null);
                     addPolicy(PolicyInclude.INPUT_POLICY, inaxisMessage
                             .getPolicyInclude(), input, fac);
@@ -321,7 +321,7 @@
                     OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME,
                             wsdl);
                     output.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
-                            + ":" + outAxisMessage.getName() + MESSAGE_SUFFIX,
+                            + ":" + outAxisMessage.getName() ,
                             null);
                     addPolicy(PolicyInclude.OUTPUT_POLICY, outAxisMessage
                             .getPolicyInclude(), output, fac);
@@ -338,7 +338,7 @@
                     OMElement fault = fac.createOMElement(FAULT_LOCAL_NAME,
                             wsdl);
                     fault.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
-                            + ":" + faultyMessge.getName() + MESSAGE_SUFFIX,
+                            + ":" + faultyMessge.getName() ,
                             null);
                     fault.addAttribute(ATTRIBUTE_NAME, faultyMessge.getName(),
                             null);



Mime
View raw message