axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r413752 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/description/ java2wsdl/src/org/apache/ws/java2wsdl/
Date Mon, 12 Jun 2006 22:09:03 GMT
Author: dims
Date: Mon Jun 12 15:09:02 2006
New Revision: 413752

URL: http://svn.apache.org/viewvc?rev=413752&view=rev
Log:
Fix for AXIS2-804 - WSDL2Java fails while generating skeleton

Fixed a typo as well in a constant.


Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2OMBuilder.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLConstants.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java?rev=413752&r1=413751&r2=413752&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
Mon Jun 12 15:09:02 2006
@@ -24,11 +24,11 @@
 import java.io.ByteArrayOutputStream;
 import java.io.StringWriter;
 import java.net.URL;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 
 /*
@@ -53,7 +53,7 @@
 
     private AxisService axisService;
 
-    private String[] url;
+    private String[] urls;
 
     private String targetNamespace;
 
@@ -84,9 +84,9 @@
     public AxisService2OM(AxisService service, String[] serviceURL,
             String style, String use, String servicePath) {
         this.axisService = service;
-        url = serviceURL;
+        urls = serviceURL;
         if (style == null) {
-            this.style = DOCUMNT;
+            this.style = DOCUMENT;
         } else {
             this.style = style;
         }
@@ -380,13 +380,16 @@
 
     private void generateSOAP11Port(OMFactory fac, OMElement service)
             throws Exception {
-        for (int i = 0; i < url.length; i++) {
-            String urlString = url[i];
-            URL url = new URL(urlString);
+        for (int i = 0; i < urls.length; i++) {
+            String urlString = urls[i];
+            String protocol = urlString == null ? null : new URI(urlString).getScheme();
+            if(urlString == null) {
+                urlString = "REPLACE_WITH_ACTUAL_URL";
+            }
             OMElement port = fac.createOMElement(PORT, wsdl);
             service.addChild(port);
             port.addAttribute(ATTRIBUTE_NAME, axisService.getName()
-                    + SOAP11PORT + "_" + url.getProtocol(), null);
+                    + SOAP11PORT + ((protocol == null) ? "" : "_" + protocol), null);
             port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":"
                     + axisService.getName() + BINDING_NAME_SUFFIX, null);
             addExtensionElement(fac, port, SOAP_ADDRESS, LOCATION, urlString,
@@ -400,9 +403,9 @@
 
     private void generateHTTPPort(OMFactory fac, OMElement service)
             throws Exception {
-        for (int i = 0; i < url.length; i++) {
-            String urlString = url[i];
-            if (urlString.startsWith("http")) {
+        for (int i = 0; i < urls.length; i++) {
+            String urlString = urls[i];
+            if (urlString != null && urlString.startsWith("http")) {
                 OMElement port = fac.createOMElement(PORT, wsdl);
                 service.addChild(port);
                 port.addAttribute(ATTRIBUTE_NAME, axisService.getName()
@@ -419,13 +422,16 @@
 
     private void generateSOAP12Port(OMFactory fac, OMElement service)
             throws Exception {
-        for (int i = 0; i < url.length; i++) {
-            String urlString = url[i];
-            URL url = new URL(urlString);
+        for (int i = 0; i < urls.length; i++) {
+            String urlString = urls[i];
+            String protocol = urlString == null ? null : new URI(urlString).getScheme();
+            if(urlString == null) {
+                urlString = "REPLACE_WITH_ACTUAL_URL";
+            }
             OMElement port = fac.createOMElement(PORT, wsdl);
             service.addChild(port);
             port.addAttribute(ATTRIBUTE_NAME, axisService.getName()
-                    + SOAP12PORT + "_" + url.getProtocol(), null);
+                    + SOAP12PORT + ((protocol == null) ? "" : "_" + protocol), null);
             port.addAttribute(BINDING_LOCAL_NAME, tns.getPrefix() + ":"
                     + axisService.getName() + SOAP12BINDING_NAME_SUFFIX, null);
             addExtensionElement(fac, port, SOAP_ADDRESS, LOCATION, urlString,

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2OMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2OMBuilder.java?rev=413752&r1=413751&r2=413752&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2OMBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2OMBuilder.java
Mon Jun 12 15:09:02 2006
@@ -8,7 +8,6 @@
 import java.util.Iterator;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.axiom.om.OMAbstractFactory;
@@ -86,7 +85,7 @@
         this.schemaCollection = schemaCollection;
         this.typeTable = typeTab;
         if (style == null) {
-            this.style = DOCUMNT;
+            this.style = DOCUMENT;
         } else {
             this.style = style;
         }

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?rev=413752&r1=413751&r2=413752&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
Mon Jun 12 15:09:02 2006
@@ -38,7 +38,7 @@
 
     private String schemaTargetNamespace = null;
     private String schemaTargetNamespacePrefix = null;
-    private String style = Java2WSDLConstants.DOCUMNT;
+    private String style = Java2WSDLConstants.DOCUMENT;
     private String use = Java2WSDLConstants.LITERAL;
     private String locationUri = Java2WSDLConstants.DEFAULT_LOCATION_URL;
 

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLConstants.java?rev=413752&r1=413751&r2=413752&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLConstants.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLConstants.java
Mon Jun 12 15:09:02 2006
@@ -74,7 +74,7 @@
     String SOAP_ACTION = "soapAction";
     String SOAP_BODY = "body";
     String SOAP_USE = "use";
-    String DOCUMNT = "document";
+    String DOCUMENT = "document";
     String LITERAL = "literal";
     //
     // Schema XSD Namespaces



---------------------------------------------------------------------
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