axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r480898 - in /webservices/axis2/branches/java/WSDL_2_0/modules: codegen/src/org/apache/axis2/wsdl/codegen/emitter/ kernel/src/org/apache/axis2/deployment/repository/util/ kernel/src/org/apache/axis2/description/
Date Thu, 30 Nov 2006 11:42:45 GMT
Author: chinthaka
Date: Thu Nov 30 03:42:44 2006
New Revision: 480898

URL: http://svn.apache.org/viewvc?view=rev&rev=480898
Log:
Fixing the wsdl base uri problem, introducing jar scheme. Now Woden reads the wsdl woth imports
without a problem.

Modified:
    webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?view=diff&rev=480898&r1=480897&r2=480898
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
Thu Nov 30 03:42:44 2006
@@ -185,8 +185,7 @@
         AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisBinding.getChild(qName);
         Object property = null;
 
-        if (axisBindingOperation != null)
-        {
+        if (axisBindingOperation != null) {
             property = axisBindingOperation.getProperty(name);
         }
 
@@ -209,11 +208,11 @@
 
         AxisBindingMessage axisBindingMessage = null;
         if (axisBindingOperation != null) {
-        axisBindingMessage = (AxisBindingMessage) axisBindingOperation.getChild(key);
+            axisBindingMessage = (AxisBindingMessage) axisBindingOperation.getChild(key);
         }
 
         if (axisBindingMessage != null) {
-        property = axisBindingMessage.getProperty(name);
+            property = axisBindingMessage.getProperty(name);
         }
 
         if (property == null) {
@@ -1979,13 +1978,13 @@
         if (input) {
             if (WSDLUtil.isInputPresentForMEP(MEP)) {
 
-                headerparamList = (ArrayList) getBindingPropertyFromMessage(WSDL2Constants.ATTR_WSOAP_HEADER,axisOperation.getName(),
WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+                headerparamList = (ArrayList) getBindingPropertyFromMessage(WSDL2Constants.ATTR_WSOAP_HEADER,
axisOperation.getName(), WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
 
-        }
+            }
         } else {
             if (WSDLUtil.isOutputPresentForMEP(MEP)) {
-                headerparamList = (ArrayList)getBindingPropertyFromMessage(WSDL2Constants.ATTR_WSOAP_HEADER,axisOperation.getName(),WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
-          }
+                headerparamList = (ArrayList) getBindingPropertyFromMessage(WSDL2Constants.ATTR_WSOAP_HEADER,
axisOperation.getName(), WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+            }
         }
 
         for (Iterator iterator = headerparamList.iterator(); iterator.hasNext();) {

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?view=diff&rev=480898&r1=480897&r2=480898
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
Thu Nov 30 03:42:44 2006
@@ -205,6 +205,10 @@
 
                     ((WSDL11ToAxisServiceBuilder) axisServiceBuilder).setCustomWSLD4JResolver(
                             new AARBasedWSDLLocator(baseURI, serviceArchiveFile, in));
+                } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
+                    // trying to use the jar scheme as the base URI. I think this can be
used to handle
+                    // wsdl 1.1 as well without using a custome URI resolver. Need to look
at it later.
+                    axisServiceBuilder.setBaseUri("jar:file:/" + serviceArchiveFile.getAbsolutePath()
+ "!/" + baseURI);
                 }
             } else {
                 if (serviceArchiveFile != null) {

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=480898&r1=480897&r2=480898
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
Thu Nov 30 03:42:44 2006
@@ -200,7 +200,6 @@
         if (this.interfaceName != null) {
 
 
-
             for (int i = 0; i < endpoints.length; ++i) {
                 if (this.interfaceName.equals(endpoints[i].getName().toString())) {
                     endpoint = endpoints[i];
@@ -214,24 +213,22 @@
 
             axisService
                     .addEndpoint(endpoint.getName().toString(), processEndpoint(endpoint));
-        }
-        else{
+        } else {
 
 
-        for (int i = 0; i < endpoints.length; i++) {
-            axisService
-                    .addEndpoint(endpoints[i].getName().toString(), processEndpoint(endpoints[i]));
-        }
+            for (int i = 0; i < endpoints.length; i++) {
+                axisService
+                        .addEndpoint(endpoints[i].getName().toString(), processEndpoint(endpoints[i]));
+            }
         }
 
-        if (endpoints.length != 0)
-        {
+        if (endpoints.length != 0) {
 
-        endpoint = endpoints[0];
+            endpoint = endpoints[0];
 
-        axisService.setEndpointName(endpoint.getName().toString());
-        axisService.setBindingName(endpoint.getBinding().getName().getLocalPart());
-        axisService.setEndpointURL(endpoint.getAddress().toString());
+            axisService.setEndpointName(endpoint.getName().toString());
+            axisService.setBindingName(endpoint.getBinding().getName().getLocalPart());
+            axisService.setEndpointURL(endpoint.getAddress().toString());
         }
 
 
@@ -280,7 +277,7 @@
 
         SOAPEndpointExtensions soapEndpointExtensions = null;
         try {
-            soapEndpointExtensions = (SOAPEndpointExtensions)endpoint.getComponentExtensionsForNamespace(new
URI(WSDL2Constants.URI_WSDL2_SOAP));
+            soapEndpointExtensions = (SOAPEndpointExtensions) endpoint.getComponentExtensionsForNamespace(new
URI(WSDL2Constants.URI_WSDL2_SOAP));
         } catch (URISyntaxException e) {
             throw new AxisFault("HTTP Binding Extention not found");
         }
@@ -326,7 +323,7 @@
                     WSDLReader reader = DOMWSDLFactory.newInstance().newWSDLReader();
                     WSDLSource wsdlSource = reader.createWSDLSource();
                     wsdlSource.setSource(document.getDocumentElement());
-                    // wsdlSource.setBaseURI(new URI(getBaseUri()));
+                    wsdlSource.setBaseURI(new URI(getBaseUri()));
                     descriptionElement = reader.readWSDL(wsdlSource);
                 } else {
                     throw new AxisFault("No resources found to read the wsdl");
@@ -428,10 +425,9 @@
                     soapUnderlyingProtocol.toString());
         }
         URI soapMepDefault = soapBindingExtensions.getSoapMepDefault();
-        if (soapMepDefault != null)
-        {
-        axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_MEP,
-                soapMepDefault.toString());
+        if (soapMepDefault != null) {
+            axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_MEP,
+                    soapMepDefault.toString());
         }
         axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,
                 soapBindingExtensions.getHttpTransferCodingDefault());
@@ -499,31 +495,26 @@
             }
 
             URI soapAction = soapBindingOperationExtensions.getSoapAction();
-            if (soapAction != null)
-            {
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION,
-                    soapAction.toString());
+            if (soapAction != null) {
+                axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION,
+                        soapAction.toString());
             }
             axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_MODULE,
                     soapBindingOperationExtensions.getSoapModules());
             URI soapMep = soapBindingOperationExtensions.getSoapMep();
-            if (soapMep != null)
-            {
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_MEP,
-                    soapMep.toString());
+            if (soapMep != null) {
+                axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_MEP,
+                        soapMep.toString());
             }
             URI httpLocation = soapBindingOperationExtensions.getHttpLocation();
-            if (httpLocation != null)
-            {
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,
-                    httpLocation.toString());
+            if (httpLocation != null) {
+                axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,
+                        httpLocation.toString());
             }
             axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,
                     soapBindingOperationExtensions.getHttpTransferCodingDefault());
 
 
-
-
             BindingMessageReference[] bindingMessageReferences =
                     bindingOperation.getBindingMessageReferences();
             for (int j = 0; j < bindingMessageReferences.length; j++) {
@@ -607,7 +598,7 @@
 
             }
 
-            axisBinding.addChild(axisBindingOperation.getName(),axisBindingOperation);
+            axisBinding.addChild(axisBindingOperation.getName(), axisBindingOperation);
 
 
         }
@@ -626,9 +617,9 @@
             throw new AxisFault("HTTP Binding Extention not found");
         }
 
-        axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_METHOD,httpBindingExtensions.getHttpMethodDefault());
-        axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,httpBindingExtensions.getHttpQueryParameterSeparatorDefault());
-        axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,httpBindingExtensions.getHttpTransferCodingDefault());
+        axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpBindingExtensions.getHttpMethodDefault());
+        axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, httpBindingExtensions.getHttpQueryParameterSeparatorDefault());
+        axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING, httpBindingExtensions.getHttpTransferCodingDefault());
 
         // Capture all the fault specific properties
 
@@ -684,16 +675,16 @@
                 throw new AxisFault("HTTP Binding Extention not found");
             }
 
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,httpBindingOperationExtensions.getHttpFaultSerialization());
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,httpBindingOperationExtensions.getHttpInputSerialization());
+            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,
httpBindingOperationExtensions.getHttpFaultSerialization());
+            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
httpBindingOperationExtensions.getHttpInputSerialization());
             URI httpLocation = httpBindingOperationExtensions.getHttpLocation();
             if (httpLocation != null) {
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,httpLocation);
+                axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocation);
             }
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_METHOD,httpBindingOperationExtensions.getHttpMethod());
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,httpBindingOperationExtensions.getHttpOutputSerialization());
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,httpBindingOperationExtensions.getHttpQueryParameterSeparator());
-            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,httpBindingOperationExtensions.getHttpTransferCodingDefault());
+            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpBindingOperationExtensions.getHttpMethod());
+            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
httpBindingOperationExtensions.getHttpOutputSerialization());
+            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
httpBindingOperationExtensions.getHttpQueryParameterSeparator());
+            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING, httpBindingOperationExtensions.getHttpTransferCodingDefault());
 
             BindingMessageReference[] bindingMessageReferences =
                     bindingOperation.getBindingMessageReferences();
@@ -721,9 +712,8 @@
                     throw new AxisFault("HTTP Binding Extention not found");
                 }
 
-                axisBindingMessage.setProperty(WSDL2Constants.ATTR_WHTTP_HEADER,httpBindingMessageReferenceExtensions.getHttpHeaders());
-                axisBindingMessage.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,httpBindingMessageReferenceExtensions.getHttpTransferCoding());
-
+                axisBindingMessage.setProperty(WSDL2Constants.ATTR_WHTTP_HEADER, httpBindingMessageReferenceExtensions.getHttpHeaders());
+                axisBindingMessage.setProperty(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,
httpBindingMessageReferenceExtensions.getHttpTransferCoding());
 
 //                    SOAPHeaderBlock[] soapHeaders = soapHeaderExt.getSoapHeaders();
 //
@@ -745,7 +735,7 @@
 
             }
 
-            axisBinding.addChild(axisBindingOperation.getName(),axisBindingOperation);
+            axisBinding.addChild(axisBindingOperation.getName(), axisBindingOperation);
 
 
         }
@@ -787,7 +777,6 @@
         // assuming the style of the operations of WSDL 2.0 is always document, for the time
being :)
         axisOperation.setMessageExchangePattern(operation.getMessageExchangePattern().toString());
         axisOperation.setStyle("document");
-
 
         // The following can be used to capture the wsdlx:safe attribute
 



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