Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1581

Generated code creates bad action in multi-parts request

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.0
    • None
    • wsdl2c tool
    • None

    Description

      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 != '""' and $soapAction != '\"\"'"> 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 != '""' and $soapAction != '\"\"'"> 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 != '""' and $soapAction != '\"\"'"> 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'">

      Attachments

        Activity

          People

            Unassigned Unassigned
            hengli_wang Hengli Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: