axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r485507 - in /webservices/axis2/branches/java/WSDL_2_0/modules: codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
Date Mon, 11 Dec 2006 05:23:41 GMT
Author: amilas
Date: Sun Dec 10 21:23:38 2006
New Revision: 485507

URL: http://svn.apache.org/viewvc?view=rev&rev=485507
Log:
According to WS-i basic profile 1.1, an empty soap body message should send if the number
of
message parts are zero. Change the Interface Implementation template to correct that mistake.

Modified:
    webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    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/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?view=diff&rev=485507&r1=485506&r2=485507
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
Sun Dec 10 21:23:38 2006
@@ -366,12 +366,18 @@
                         <!-- No input parameters present. So generate assuming no input
parameters-->
                         <xsl:otherwise>
                             <xsl:choose>
-                                <xsl:when test="$style='rpc' or $style='document'">
-                                    //Style is taken to be "document". No input parameters
+                                <xsl:when test="$style='rpc'">
+                                    //Style is taken to be "rpc". No input parameters
                                     org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
                                     env = factory.getDefaultEnvelope();
                                     env.getBody().addChild(factory.createOMElement("<xsl:value-of
select="$method-name"/>", "<xsl:value-of select="$method-ns"/>", ""));
                                 </xsl:when>
+                                <xsl:when test="$style='document'">
+                                    //Style is taken to be "document". No input parameters
+                                    // according to the WS-Basic profile in this case we
have to send an empty soap message
+                                    org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
+                                    env = factory.getDefaultEnvelope();
+                                </xsl:when>
                                 <xsl:otherwise>
                                      //Unknown style detected !! No code is generated
                                 </xsl:otherwise>
@@ -607,12 +613,18 @@
                         <!-- No input parameters present. So generate assuming no input
parameters-->
                         <xsl:otherwise>
                             <xsl:choose>
-                                <xsl:when test="$style='document' or $style='rpc'">
+                                <xsl:when test="$style='rpc'">
                                     //Style is Doc. No input parameters
                                     org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
                                     env = factory.getDefaultEnvelope();
                                     env.getBody().addChild(factory.createOMElement("<xsl:value-of
select="$method-name"/>", "<xsl:value-of select="$method-ns"/>", ""));
                                 </xsl:when>
+                                <xsl:when test="$style='document'">
+                                    //Style is taken to be "document". No input parameters
+                                    // according to the WS-Basic profile in this case we
have to send an empty soap message
+                                    org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
+                                    env = factory.getDefaultEnvelope();
+                                </xsl:when>
                                 <xsl:otherwise>
                                     //Unknown style detected !! No code is generated
                                 </xsl:otherwise>
@@ -796,11 +808,17 @@
                                         <!-- No input parameters present. So generate
assuming no input parameters-->
                                         <xsl:otherwise>
                                             <xsl:choose>
-                                                <xsl:when test="$style='rpc' or $style='document'">
+                                                <xsl:when test="$style='rpc'">
                                                     //Style is taken to be "document". No
input parameters
                                                     org.apache.axiom.soap.SOAPFactory factory
= getFactory(_operationClient.getOptions().getSoapVersionURI());
                                                     env = factory.getDefaultEnvelope();
                                                     env.getBody().addChild(factory.createOMElement("<xsl:value-of
select="$method-name"/>", "<xsl:value-of select="$method-ns"/>", ""));
+                                                </xsl:when>
+                                                <xsl:when test="$style='document'">
+                                                    //Style is taken to be "document". No
input parameters
+                                                    // according to the WS-Basic profile
in this case we have to send an empty soap message
+                                                    org.apache.axiom.soap.SOAPFactory factory
= getFactory(_operationClient.getOptions().getSoapVersionURI());
+                                                    env = factory.getDefaultEnvelope();
                                                 </xsl:when>
                                                 <xsl:otherwise>
                                                      //Unknown style detected !! No code
is generated

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=485507&r1=485506&r2=485507
==============================================================================
--- 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
Sun Dec 10 21:23:38 2006
@@ -861,8 +861,7 @@
            elementQName = Constants.XSD_ANY;
         } else
         if (WSDLConstants.WSDL20_2006Constants.NMTOKEN_NONE.equals(messageContentModelName))
{
-            // TODO : Need to improve this
-           elementQName = Constants.AXIS2_NONE;
+            // nothing to do here keep the message element as null
         } else {
             throw new AxisFault("Sorry we do not support " + messageContentModelName +
                     ". We do only support #any, #none and #element as message content models.");



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