Hi,

After your email yesterday, I've been looking into some of the issues you
highlight, sorry for not getting back sooner.

It would appear you've managed to find a hole in our recent work to improve
memory management, and myself and Fred are currently working on fixing the
generated stubs and beans for rpc/encoded WSDLs.

Of course, we're always pleased to receive fixes.  The preferred manner for
providing fixes is as a context diff file.
If you are providing code fixes, it may be more appropriate to mail these
on the axis-c-dev mailing list.  It's also worthwhile raising new Jira
issues (here: http://issues.apache.org/jira/browse/AXISCPP ) and attaching
the diff files.

Regards,
Adrian
_______________________________________
Adrian Dick ([EMAIL PROTECTED])


Petr Cvachoucek <[EMAIL PROTECTED]> wrote on 30/03/2006 13:20:27:

> Hi again,
>
> I did some more investigations and seems successfully solved memory
> leaks. In general the source code generated by wsdl2ws tool needs to be
> extended and copy constructors and assignment operators must be added,
> and destructors must do cleanup. If someone is interested, I can send
> what is required to do.
>
> When testing the client and server (both axis c++ - generated by
> wsdl2ws, using apache2 on server side), I encountered other serious
> problems. The client crashes sometimes, I tried to find the reason and
> found bugs in the axis HTTP transport library. Client crashes sometimes
> when the server response is in chunked format (but not every time).
>
> The method HTTPTransport::getBytes() doesn't work in all cases, here is
> the part I needed to change to make it work correctly:
>
> (original position in HTTPTransport.cpp, line 767)
>
> case eSOAPMessageIsChunked:
> {
>    if (m_GetBytesState == eSOAPMessageIsChunked)
>    {
>      if( m_iBytesLeft == 0)
>      {
>        getNextDataPacket( "No data available for next chunk size.");
>      }
>      m_iContentLength = getChunkSize();
>
>      while( m_iContentLength + strlen(ASCII_S_CRLF) > m_iBytesLeft)
>      {
>        getNextDataPacket( "No data available for next chunk.");
>      }
>      if( m_iBytesLeft >= m_iContentLength + strlen(ASCII_S_CRLF))
>      {
>        nextChunk = m_strReceived.substr(
>          m_iContentLength + strlen(ASCII_S_CRLF));
>
>        m_strReceived = m_strReceived.substr( 0, m_iContentLength);
>        m_iBytesLeft = m_iContentLength;
>
>        if( peekChunkLength( nextChunk) == 0)
>        {
>          m_GetBytesState = eWaitingForHTTPHeader;
>        }
>      }
>      else
>      {
>        nextChunk = "";
>      }
>
>      if( m_bMimeTrue)
>      {
>        processRootMimeBody();
>        m_iBytesLeft = m_strReceived.length();
>      }
>
>      break;
>    }
> }
>
> Also the method HTTPTransport::copyDataToParserBuffer() needs
modification:
>
> (original position in HTTPTransport.cpp, line 1722)
>
>
> bool HTTPTransport::copyDataToParserBuffer(char * pcBuffer, int *
> piSize, int iBytesToCopy)
> {
>    bool bTransportInProgress = false;
>    if( iBytesToCopy > 0)
>    {
>      int iToCopy = (*piSize < iBytesToCopy) ? *piSize : iBytesToCopy;
>      strncpy( pcBuffer, m_strReceived.c_str(), iToCopy);
>      m_iBytesLeft -= iToCopy;
>      *piSize = iToCopy;
>
>      if( m_iBytesLeft > 0)
>      {
>        m_strReceived = m_strReceived.substr( iToCopy);
>      }
>      else
>      {
>        m_strReceived = "";
>      }
>      bTransportInProgress = true;
>    }
>    else
>    {
>      *piSize = 0;
>    }
>
>    return bTransportInProgress;
> }
>
>
> The original behavior was pretty unstable, there were passed invalid
> data to xerces parser and then the xerces throws an exception. But seems
> it is not handled correctly in axis soap engine, because the axis engine
>    crashes.
>
> I'll continue testing and let you know if I find some more bugs. Btw,
> does anybody know why it isn't possible to download previous releases of
> axis c++ ? (only 1.6beta is on http://www.apache.org/dist/ws/axis-c/).
> The 1.6beta is still pretty unstable in my opinion, why there is no
> earlier stable version available for download?????
>
> Petr

Reply via email to