Generated code creates bad action in multi-parts request
--------------------------------------------------------

                 Key: AXIS2C-1581
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1581
             Project: Axis2-C
          Issue Type: Bug
          Components: wsdl2c tool
    Affects Versions: 1.6.0
            Reporter: Hengli Wang


I use axis2-1.6.1 to generate client stub and use axis2-1.6.0 with curl-7.19.7. 
The http request has multi-parts message with an invalid action item,

-- Encrypted Boundary
.Content-Type: application/HTTP-SPNEGO-session-encrypted
.OriginalContent: type=application/soap+xml;charset=UTF-8;action=""";Length=330
-- Encrypted Boundary

Below is a patch that I used to get around this issue. After the patch, the 
message is,

-- Encrypted Boundary
.Content-Type: application/HTTP-SPNEGO-session-encrypted
.OriginalContent: type=application/soap+xml;charset=UTF-8;Length=330
-- Encrypted Boundary

The patch is,
--- 
./modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl   
    2012-01-12 14:06:44.000000000 -0500
+++ 
./modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl   
    2012-01-12 14:06:38.000000000 -0500
@@ -356,9 +356,11 @@
             if (NULL == soap_act)
             {
               is_soap_act_set = AXIS2_FALSE;
+              <xsl:if test="$soapAction != '' and $soapAction != 
'&quot;&quot;' and $soapAction != '\&quot;\&quot;'">
               soap_action = "<xsl:value-of select="$soapAction"/>";
               soap_act = axutil_string_create(env, "<xsl:value-of 
select="$soapAction"/>");
               axis2_options_set_soap_action(options, env, soap_act);    
+              </xsl:if>
             }
 
             <xsl:choose>
@@ -1090,9 +1092,11 @@
             if (NULL == soap_act)
             {
               is_soap_act_set = AXIS2_FALSE;
+              <xsl:if test="$soapAction != '' and $soapAction != 
'&quot;&quot;' and $soapAction != '\&quot;\&quot;'">
               soap_action = "<xsl:value-of select="$soapAction"/>";
               soap_act = axutil_string_create(env, "<xsl:value-of 
select="$soapAction"/>");
               axis2_options_set_soap_action(options, env, soap_act);
+              </xsl:if>
             }
             <xsl:choose>
              <xsl:when 
test="$soapVersion='http://www.w3.org/2003/05/soap-envelope'">
@@ -1246,9 +1250,11 @@
             soap_act = axis2_options_get_soap_action ( options, env );
             if ( NULL == soap_act )
             {
+              <xsl:if test="$soapAction != '' and $soapAction != 
'&quot;&quot;' and $soapAction != '\&quot;\&quot;'">
               soap_action = "<xsl:value-of select="$soapAction"/>";
               soap_act = axutil_string_create(env, "<xsl:value-of 
select="$soapAction"/>");
               axis2_options_set_soap_action(options, env, soap_act);    
+              </xsl:if>
             }
             <xsl:choose>
              <xsl:when 
test="$soapVersion='http://www.w3.org/2003/05/soap-envelope'">


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: c-dev-h...@axis.apache.org

Reply via email to