axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r1347735 - in /axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws: WSDL2Ws.java info/WSDLInfo.java
Date Thu, 07 Jun 2012 17:49:43 GMT
Author: nadiramra
Date: Thu Jun  7 17:49:42 2012
New Revision: 1347735

URL: http://svn.apache.org/viewvc?rev=1347735&view=rev
Log:
AXISCPP-1077 wsdl2ws should throw exception if doc/literal or rpc/encoded not used 

Modified:
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java
    axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java?rev=1347735&r1=1347734&r2=1347735&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java Thu Jun  7 17:49:42
2012
@@ -254,6 +254,22 @@ public class WSDL2Ws
             bindingEntry    = c_symbolTable.getBindingEntry(port.getBinding().getQName());
         }
         
+        // Ensure that binding entry is document/literal or RPC encoded since that is all
that is supported.
+        if (bindingEntry != null)
+        {
+            String style = bindingEntry.getBindingStyle().getName();
+            if (style == null)
+                style = "document";
+
+            if ((style.equals("document") && !bindingEntry.hasLiteral())
+                    || (style.equals("rpc") && bindingEntry.hasLiteral()))
+                throw new WrapperFault("Binding style not supported.  Supported binding styles:
document/literal, rpc/encoded");
+            
+            // If C-stubs currently supports document/literal only
+            if (style.equals("rpc") && c_cmdLineArgs.getTargetLanguage().equalsIgnoreCase("c"))
+                throw new WrapperFault("Cannot generate C stubs for rpc/encoded.");
+        }
+        
         // ==================================================
         // Build the context that is needed by the code generators.
         // ==================================================            

Modified: axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
URL: http://svn.apache.org/viewvc/axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java?rev=1347735&r1=1347734&r2=1347735&view=diff
==============================================================================
--- axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java (original)
+++ axis/axis1/c/trunk/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java Thu Jun  7
17:49:42 2012
@@ -510,7 +510,7 @@ public class WSDLInfo
             {
                 String style = be.getBindingStyle().getName();
                 if (style == null)
-                    style = "rpc"; // TODO need to revisit.
+                    style = "document";
                 
                 if ((styleDocument && style.equalsIgnoreCase("document"))
                         || (!styleDocument && style.equalsIgnoreCase("rpc")))



Mime
View raw message