You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-c-dev@ws.apache.org by "nadir amra (JIRA)" <ji...@apache.org> on 2010/05/20 00:47:56 UTC

[jira] Commented: (AXIS2C-1142) Circular dependency between engine and http_common libraries

    [ https://issues.apache.org/jira/browse/AXIS2C-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869390#action_12869390 ] 

nadir amra commented on AXIS2C-1142:
------------------------------------

I agree with Supun, we need to eliminate circular dependencies and make the engine be oblivious to the transport being used.  

I have spent a few hours trying to figure why I could not compile on OS/400.....sigh.

> Circular dependency between engine and http_common libraries
> ------------------------------------------------------------
>
>                 Key: AXIS2C-1142
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1142
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: core/engine, core/transport
>    Affects Versions: 1.4.0
>         Environment: CentOS 4.6 (linux), GCC 3.4.6/4.2.3
>            Reporter: Steve Nairn
>            Priority: Minor
>         Attachments: http_common.patch
>
>
> Following discussion on the Axis2/C dev list, there is a circular dependency between libaxis2_engine and libaxis2_http_common.
> The http_common library contains references to a large number of symbols that are resolved by the engine library. Unfortunately the engine library contains references to axis2_http_accept_record_free and axis2_http_header_free, that are resolved by the http_common library. Therefore there is a circular dependency between the libraries.
> The circular dependency makes it very difficult to build these libraries on platforms that do not allow shared libraries to contain unresolved symbols (for example, Windows DLLs). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Re: Porting problems

Posted by Nadir Amra <am...@us.ibm.com>.
Just an update, I changed 

if(str_line > 0)

to 

if(str_line[0] > 0)

But I have concerns about this transport and I am wondering if anyone is 
actually using it?  Not only the things I mentioned below, but in addition 
there is a possibility of buffer overflows if one reads in more than 32000 
bytes, in addition to inefficiencies in how data is read and moved into 
the buffer. 

Yes, once I get things ported and working, I will be working on this and 
other things, but I thought I would point these out. 


Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

Nadir Amra/Rochester/IBM@IBMUS wrote on 05/20/2010 07:24:59 PM:

> [image removed] 
> 
> Porting problems
> 
> Nadir Amra 
> 
> to:
> 
> Apache AXIS C Developers List
> 
> 05/20/2010 07:25 PM
> 
> Please respond to "Apache AXIS C Developers List"
> 
> While porting to IBM i (aka OS/400), found the following problem which I 

> want to verify with developers since I really do not understand how this 

> works...
> 
> In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there is 
> the routine at the bottom. 
> 
> My compile fails due to the line 
> 
> if(str_line > 0)
> 
> which I do not understand.  Can anyone explain?  The other thing I 
> question about this routine is the returning of a buffer that basically 
> declared in automatic storage.   See statement:
> 
> svr_conn->buffer = str_line;
> 
> ====================
> 
> AXIS2_EXTERN axis2_char_t *AXIS2_CALL
> axis2_simple_tcp_svr_conn_read_request(
>     axis2_simple_tcp_svr_conn_t * svr_conn,
>     const axutil_env_t * env)
> {
>     int size = 32000;
>     axis2_char_t str_line[32000];
>     axis2_char_t tmp_buf[32000];
>     int read = -1;
> 
>     AXIS2_ENV_CHECK(env, NULL);
> 
>     memset(str_line, 0, size);
>     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
> tmp_buf, size - 1)) > 0)
>     {
>         tmp_buf[read] = '\0';
>         if(read > 0)
>         {
>             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 
size 
> - 1);
>             if(read > 0)
>             {
>                 tmp_buf[read] = '\0';
>                 strcat(str_line, tmp_buf);
>                 break;
>             }
>             else
>             {
>                 break;
>             }
>         }
>     }
>     if(str_line > 0)
>     {
>         svr_conn->buffer = str_line;
>     }
>     return svr_conn->buffer;
> }
> 
> 
> 
> 
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
> 


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


Re: Porting problems

Posted by Nadir Amra <am...@us.ibm.com>.
Just an update, I changed 

if(str_line > 0)

to 

if(str_line[0] > 0)

But I have concerns about this transport and I am wondering if anyone is 
actually using it?  Not only the things I mentioned below, but in addition 
there is a possibility of buffer overflows if one reads in more than 32000 
bytes, in addition to inefficiencies in how data is read and moved into 
the buffer. 

Yes, once I get things ported and working, I will be working on this and 
other things, but I thought I would point these out. 


Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

Nadir Amra/Rochester/IBM@IBMUS wrote on 05/20/2010 07:24:59 PM:

> [image removed] 
> 
> Porting problems
> 
> Nadir Amra 
> 
> to:
> 
> Apache AXIS C Developers List
> 
> 05/20/2010 07:25 PM
> 
> Please respond to "Apache AXIS C Developers List"
> 
> While porting to IBM i (aka OS/400), found the following problem which I 

> want to verify with developers since I really do not understand how this 

> works...
> 
> In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there is 
> the routine at the bottom. 
> 
> My compile fails due to the line 
> 
> if(str_line > 0)
> 
> which I do not understand.  Can anyone explain?  The other thing I 
> question about this routine is the returning of a buffer that basically 
> declared in automatic storage.   See statement:
> 
> svr_conn->buffer = str_line;
> 
> ====================
> 
> AXIS2_EXTERN axis2_char_t *AXIS2_CALL
> axis2_simple_tcp_svr_conn_read_request(
>     axis2_simple_tcp_svr_conn_t * svr_conn,
>     const axutil_env_t * env)
> {
>     int size = 32000;
>     axis2_char_t str_line[32000];
>     axis2_char_t tmp_buf[32000];
>     int read = -1;
> 
>     AXIS2_ENV_CHECK(env, NULL);
> 
>     memset(str_line, 0, size);
>     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
> tmp_buf, size - 1)) > 0)
>     {
>         tmp_buf[read] = '\0';
>         if(read > 0)
>         {
>             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 
size 
> - 1);
>             if(read > 0)
>             {
>                 tmp_buf[read] = '\0';
>                 strcat(str_line, tmp_buf);
>                 break;
>             }
>             else
>             {
>                 break;
>             }
>         }
>     }
>     if(str_line > 0)
>     {
>         svr_conn->buffer = str_line;
>     }
>     return svr_conn->buffer;
> }
> 
> 
> 
> 
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
> 


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


RE: Axis2C - HTTP transports (native vs. libcurl)

Posted by Bill Mitchell <bm...@austin.rr.com>.
I was accessing a service, not Axis-based, that used cookies to maintain
session information.  Libcurl could preserve cookie information across
messages, which was not done at that time in the HTTP support.  I've not
looked at the current source to see if this has been added to the native
implementation.

 

Bill Mitchell

wtmitchell3@acm.org

 

From: Nandika Jayawardana [mailto:jayawark@gmail.com] 
Sent: Monday, May 31, 2010 12:17 AM
To: Apache AXIS C Developers List
Subject: Re: Axis2C - HTTP transports (native vs. libcurl)

 

The difference between libcurl and native axis2/c http transport was HTTP
keep alive support availability in libcurl transport. However, now keep
alive support is available in native HTTP transport as well. Therefore,
AFAIK there isn't a difference using libcurl or native axis2/c transport. 

 

Regards

Nandika

On Mon, May 31, 2010 at 5:44 AM, Nadir Amra <am...@us.ibm.com> wrote:

Just trying to understand what the benefits are in using the HTTP
transport based on libcurl vs. the native axis2/c HTTP transport?

Basically is there something that is not supported in the native
implementation?

Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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




-- 
http://nandikajayawardana.blogspot.com/
WSO2 Inc: http://www.wso2.com


RE: Axis2C - HTTP transports (native vs. libcurl)

Posted by Bill Mitchell <bm...@austin.rr.com>.
I was accessing a service, not Axis-based, that used cookies to maintain
session information.  Libcurl could preserve cookie information across
messages, which was not done at that time in the HTTP support.  I've not
looked at the current source to see if this has been added to the native
implementation.

 

Bill Mitchell

wtmitchell3@acm.org

 

From: Nandika Jayawardana [mailto:jayawark@gmail.com] 
Sent: Monday, May 31, 2010 12:17 AM
To: Apache AXIS C Developers List
Subject: Re: Axis2C - HTTP transports (native vs. libcurl)

 

The difference between libcurl and native axis2/c http transport was HTTP
keep alive support availability in libcurl transport. However, now keep
alive support is available in native HTTP transport as well. Therefore,
AFAIK there isn't a difference using libcurl or native axis2/c transport. 

 

Regards

Nandika

On Mon, May 31, 2010 at 5:44 AM, Nadir Amra <am...@us.ibm.com> wrote:

Just trying to understand what the benefits are in using the HTTP
transport based on libcurl vs. the native axis2/c HTTP transport?

Basically is there something that is not supported in the native
implementation?

Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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




-- 
http://nandikajayawardana.blogspot.com/
WSO2 Inc: http://www.wso2.com


Re: Axis2C - HTTP transports (native vs. libcurl)

Posted by Nandika Jayawardana <ja...@gmail.com>.
The difference between libcurl and native axis2/c http transport was HTTP
 keep alive support availability in libcurl transport. However, now keep
alive support is available in native HTTP transport as well. Therefore,
AFAIK there isn't a difference using libcurl or native axis2/c transport.

Regards
Nandika

On Mon, May 31, 2010 at 5:44 AM, Nadir Amra <am...@us.ibm.com> wrote:

> Just trying to understand what the benefits are in using the HTTP
> transport based on libcurl vs. the native axis2/c HTTP transport?
>
> Basically is there something that is not supported in the native
> implementation?
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>


-- 
http://nandikajayawardana.blogspot.com/
WSO2 Inc: http://www.wso2.com

Re: Axis2C - HTTP transports (native vs. libcurl)

Posted by Nandika Jayawardana <ja...@gmail.com>.
The difference between libcurl and native axis2/c http transport was HTTP
 keep alive support availability in libcurl transport. However, now keep
alive support is available in native HTTP transport as well. Therefore,
AFAIK there isn't a difference using libcurl or native axis2/c transport.

Regards
Nandika

On Mon, May 31, 2010 at 5:44 AM, Nadir Amra <am...@us.ibm.com> wrote:

> Just trying to understand what the benefits are in using the HTTP
> transport based on libcurl vs. the native axis2/c HTTP transport?
>
> Basically is there something that is not supported in the native
> implementation?
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>


-- 
http://nandikajayawardana.blogspot.com/
WSO2 Inc: http://www.wso2.com

Re: Axis2C - HTTP transports (native vs. libcurl)

Posted by Nadir Amra <am...@us.ibm.com>.
Just trying to understand what the benefits are in using the HTTP 
transport based on libcurl vs. the native axis2/c HTTP transport?

Basically is there something that is not supported in the native 
implementation? 

Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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


Re: Axis2C - HTTP transports (native vs. libcurl)

Posted by Nadir Amra <am...@us.ibm.com>.
Just trying to understand what the benefits are in using the HTTP 
transport based on libcurl vs. the native axis2/c HTTP transport?

Basically is there something that is not supported in the native 
implementation? 

Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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


Re: Axis2C - XML parser

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> Is Axis2/C dependent on a pull parser implementation or can a parser such 
> as xerces be used?  Yes, I know that I would need to implement the XML 
> reader/writer interfaces. 
>   
And there is this expat wrapper [1]as well

Thanks,
Damitha

[1] http://wiki.apache.org/general/LasithHaputhanthiri
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Axis2C - XML parser

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> Is Axis2/C dependent on a pull parser implementation or can a parser such 
> as xerces be used?  Yes, I know that I would need to implement the XML 
> reader/writer interfaces. 
>   
And there is this expat wrapper [1]as well

Thanks,
Damitha

[1] http://wiki.apache.org/general/LasithHaputhanthiri
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Axis2C - XML parser

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> Is Axis2/C dependent on a pull parser implementation or can a parser such 
> as xerces be used?  Yes, I know that I would need to implement the XML 
> reader/writer interfaces. 
>   
Currently default parser is Guththila which is a StAX C Parser. Before 
that libxml2(implementing XML reader/writer) was the default parser. I 
think you can use xerces by implementing reader/writer appropriately

Thanks,
Damitha
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Axis2C - XML parser

Posted by Dinesh Weerapurage <xy...@gmail.com>.
On Fri, May 28, 2010 at 1:23 AM, Nadir Amra <am...@us.ibm.com> wrote:

> Is Axis2/C dependent on a pull parser implementation or can a parser such
> as xerces be used?  Yes, I know that I would need to implement the XML
> reader/writer interfaces.
>
>
I think , as long as you can implement XML reader/writer interfaces you can
use any parser.


thanks,
Dinesh.

Re: Axis2C - XML parser

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> Is Axis2/C dependent on a pull parser implementation or can a parser such 
> as xerces be used?  Yes, I know that I would need to implement the XML 
> reader/writer interfaces. 
>   
Currently default parser is Guththila which is a StAX C Parser. Before 
that libxml2(implementing XML reader/writer) was the default parser. I 
think you can use xerces by implementing reader/writer appropriately

Thanks,
Damitha
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Axis2C - XML parser

Posted by Dinesh Weerapurage <xy...@gmail.com>.
On Fri, May 28, 2010 at 1:23 AM, Nadir Amra <am...@us.ibm.com> wrote:

> Is Axis2/C dependent on a pull parser implementation or can a parser such
> as xerces be used?  Yes, I know that I would need to implement the XML
> reader/writer interfaces.
>
>
I think , as long as you can implement XML reader/writer interfaces you can
use any parser.


thanks,
Dinesh.

Axis2C - XML parser

Posted by Nadir Amra <am...@us.ibm.com>.
Is Axis2/C dependent on a pull parser implementation or can a parser such 
as xerces be used?  Yes, I know that I would need to implement the XML 
reader/writer interfaces. 



Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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


Axis2C - XML parser

Posted by Nadir Amra <am...@us.ibm.com>.
Is Axis2/C dependent on a pull parser implementation or can a parser such 
as xerces be used?  Yes, I know that I would need to implement the XML 
reader/writer interfaces. 



Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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


Re: Porting problems

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> Damitha,
>
> Where is it allocated?  str_line is not dynamic.   It is a pointer to a 
> character array that is not allocated.  So I am confused...am I missing 
> something?  Should we be doing a memcpy from str_line to svr_conn->buffer?
>   
Yes. Earlier I was under the impression that it is using axutil_strcat 
in which it allocate memory.


Thanks,
Damitha
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> Damitha Kumarage <da...@wso2.com> wrote on 05/20/2010 11:04:30 PM:
>
>   
>> [image removed] 
>>
>> Re: Porting problems
>>
>> Damitha Kumarage 
>>
>> to:
>>
>> Apache AXIS C Developers List
>>
>> 05/20/2010 11:05 PM
>>
>> Please respond to "Apache AXIS C Developers List"
>>
>> Nadir Amra wrote:
>>     
>>> While porting to IBM i (aka OS/400), found the following problem which 
>>>       
> I 
>   
>>> want to verify with developers since I really do not understand how 
>>>       
> this 
>   
>>> works...
>>>
>>> In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there 
>>>       
> is 
>   
>>> the routine at the bottom. 
>>>
>>> My compile fails due to the line 
>>>
>>> if(str_line > 0)
>>>
>>>       
>> I think this shoud be corrected to if(str_line[0] > 0)
>>     
>>> which I do not understand.  Can anyone explain?  The other thing I 
>>> question about this routine is the returning of a buffer that 
>>>       
> basically 
>   
>>> declared in automatic storage.   See statement:
>>>
>>> svr_conn->buffer = str_line;
>>>
>>>       
>> Since the content passed to svr_conn->buffer is allocated it wont' be a 
>> problem here.
>>
>> Thanks,
>> Damitha
>>     
>>> ====================
>>>
>>> AXIS2_EXTERN axis2_char_t *AXIS2_CALL
>>> axis2_simple_tcp_svr_conn_read_request(
>>>     axis2_simple_tcp_svr_conn_t * svr_conn,
>>>     const axutil_env_t * env)
>>> {
>>>     int size = 32000;
>>>     axis2_char_t str_line[32000];
>>>     axis2_char_t tmp_buf[32000];
>>>     int read = -1;
>>>
>>>     AXIS2_ENV_CHECK(env, NULL);
>>>
>>>     memset(str_line, 0, size);
>>>     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
>>> tmp_buf, size - 1)) > 0)
>>>     {
>>>         tmp_buf[read] = '\0';
>>>         if(read > 0)
>>>         {
>>>             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 
>>>       
> size 
>   
>>> - 1);
>>>             if(read > 0)
>>>             {
>>>                 tmp_buf[read] = '\0';
>>>                 strcat(str_line, tmp_buf);
>>>                 break;
>>>             }
>>>             else
>>>             {
>>>                 break;
>>>             }
>>>         }
>>>     }
>>>     if(str_line > 0)
>>>     {
>>>         svr_conn->buffer = str_line;
>>>     }
>>>     return svr_conn->buffer;
>>> }
>>>
>>>
>>>
>>>
>>> Nadir Amra
>>> Integrated Web Services for IBM i Operating System
>>> Internet: amra@us.ibm.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: c-dev-help@axis.apache.org
>>>
>>>
>>>
>>>       
>> -- 
>> __________________________________________________________________
>>
>> Damitha Kumarage
>> Technical Lead; WSO2 Inc.
>> "Oxygenating the Web Service Platform; " http://www.wso2.com/
>>
>> blog: " http://damithakumarage.wordpress.com/
>> __________________________________________________________________
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: c-dev-help@axis.apache.org
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Porting problems

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> Damitha,
>
> Where is it allocated?  str_line is not dynamic.   It is a pointer to a 
> character array that is not allocated.  So I am confused...am I missing 
> something?  Should we be doing a memcpy from str_line to svr_conn->buffer?
>   
Yes. Earlier I was under the impression that it is using axutil_strcat 
in which it allocate memory.


Thanks,
Damitha
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> Damitha Kumarage <da...@wso2.com> wrote on 05/20/2010 11:04:30 PM:
>
>   
>> [image removed] 
>>
>> Re: Porting problems
>>
>> Damitha Kumarage 
>>
>> to:
>>
>> Apache AXIS C Developers List
>>
>> 05/20/2010 11:05 PM
>>
>> Please respond to "Apache AXIS C Developers List"
>>
>> Nadir Amra wrote:
>>     
>>> While porting to IBM i (aka OS/400), found the following problem which 
>>>       
> I 
>   
>>> want to verify with developers since I really do not understand how 
>>>       
> this 
>   
>>> works...
>>>
>>> In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there 
>>>       
> is 
>   
>>> the routine at the bottom. 
>>>
>>> My compile fails due to the line 
>>>
>>> if(str_line > 0)
>>>
>>>       
>> I think this shoud be corrected to if(str_line[0] > 0)
>>     
>>> which I do not understand.  Can anyone explain?  The other thing I 
>>> question about this routine is the returning of a buffer that 
>>>       
> basically 
>   
>>> declared in automatic storage.   See statement:
>>>
>>> svr_conn->buffer = str_line;
>>>
>>>       
>> Since the content passed to svr_conn->buffer is allocated it wont' be a 
>> problem here.
>>
>> Thanks,
>> Damitha
>>     
>>> ====================
>>>
>>> AXIS2_EXTERN axis2_char_t *AXIS2_CALL
>>> axis2_simple_tcp_svr_conn_read_request(
>>>     axis2_simple_tcp_svr_conn_t * svr_conn,
>>>     const axutil_env_t * env)
>>> {
>>>     int size = 32000;
>>>     axis2_char_t str_line[32000];
>>>     axis2_char_t tmp_buf[32000];
>>>     int read = -1;
>>>
>>>     AXIS2_ENV_CHECK(env, NULL);
>>>
>>>     memset(str_line, 0, size);
>>>     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
>>> tmp_buf, size - 1)) > 0)
>>>     {
>>>         tmp_buf[read] = '\0';
>>>         if(read > 0)
>>>         {
>>>             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 
>>>       
> size 
>   
>>> - 1);
>>>             if(read > 0)
>>>             {
>>>                 tmp_buf[read] = '\0';
>>>                 strcat(str_line, tmp_buf);
>>>                 break;
>>>             }
>>>             else
>>>             {
>>>                 break;
>>>             }
>>>         }
>>>     }
>>>     if(str_line > 0)
>>>     {
>>>         svr_conn->buffer = str_line;
>>>     }
>>>     return svr_conn->buffer;
>>> }
>>>
>>>
>>>
>>>
>>> Nadir Amra
>>> Integrated Web Services for IBM i Operating System
>>> Internet: amra@us.ibm.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: c-dev-help@axis.apache.org
>>>
>>>
>>>
>>>       
>> -- 
>> __________________________________________________________________
>>
>> Damitha Kumarage
>> Technical Lead; WSO2 Inc.
>> "Oxygenating the Web Service Platform; " http://www.wso2.com/
>>
>> blog: " http://damithakumarage.wordpress.com/
>> __________________________________________________________________
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: c-dev-help@axis.apache.org
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Porting problems

Posted by Nadir Amra <am...@us.ibm.com>.
Damitha,

Where is it allocated?  str_line is not dynamic.   It is a pointer to a 
character array that is not allocated.  So I am confused...am I missing 
something?  Should we be doing a memcpy from str_line to svr_conn->buffer?

Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

Damitha Kumarage <da...@wso2.com> wrote on 05/20/2010 11:04:30 PM:

> [image removed] 
> 
> Re: Porting problems
> 
> Damitha Kumarage 
> 
> to:
> 
> Apache AXIS C Developers List
> 
> 05/20/2010 11:05 PM
> 
> Please respond to "Apache AXIS C Developers List"
> 
> Nadir Amra wrote:
> > While porting to IBM i (aka OS/400), found the following problem which 
I 
> > want to verify with developers since I really do not understand how 
this 
> > works...
> >
> > In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there 
is 
> > the routine at the bottom. 
> >
> > My compile fails due to the line 
> >
> > if(str_line > 0)
> > 
> I think this shoud be corrected to if(str_line[0] > 0)
> > which I do not understand.  Can anyone explain?  The other thing I 
> > question about this routine is the returning of a buffer that 
basically 
> > declared in automatic storage.   See statement:
> >
> > svr_conn->buffer = str_line;
> > 
> Since the content passed to svr_conn->buffer is allocated it wont' be a 
> problem here.
> 
> Thanks,
> Damitha
> > ====================
> >
> > AXIS2_EXTERN axis2_char_t *AXIS2_CALL
> > axis2_simple_tcp_svr_conn_read_request(
> >     axis2_simple_tcp_svr_conn_t * svr_conn,
> >     const axutil_env_t * env)
> > {
> >     int size = 32000;
> >     axis2_char_t str_line[32000];
> >     axis2_char_t tmp_buf[32000];
> >     int read = -1;
> >
> >     AXIS2_ENV_CHECK(env, NULL);
> >
> >     memset(str_line, 0, size);
> >     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
> > tmp_buf, size - 1)) > 0)
> >     {
> >         tmp_buf[read] = '\0';
> >         if(read > 0)
> >         {
> >             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 
size 
> > - 1);
> >             if(read > 0)
> >             {
> >                 tmp_buf[read] = '\0';
> >                 strcat(str_line, tmp_buf);
> >                 break;
> >             }
> >             else
> >             {
> >                 break;
> >             }
> >         }
> >     }
> >     if(str_line > 0)
> >     {
> >         svr_conn->buffer = str_line;
> >     }
> >     return svr_conn->buffer;
> > }
> >
> >
> >
> >
> > Nadir Amra
> > Integrated Web Services for IBM i Operating System
> > Internet: amra@us.ibm.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: c-dev-help@axis.apache.org
> >
> >
> > 
> 
> 
> -- 
> __________________________________________________________________
> 
> Damitha Kumarage
> Technical Lead; WSO2 Inc.
> "Oxygenating the Web Service Platform; " http://www.wso2.com/
> 
> blog: " http://damithakumarage.wordpress.com/
> __________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
> 


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


Re: Porting problems

Posted by Nadir Amra <am...@us.ibm.com>.
Damitha,

Where is it allocated?  str_line is not dynamic.   It is a pointer to a 
character array that is not allocated.  So I am confused...am I missing 
something?  Should we be doing a memcpy from str_line to svr_conn->buffer?

Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

Damitha Kumarage <da...@wso2.com> wrote on 05/20/2010 11:04:30 PM:

> [image removed] 
> 
> Re: Porting problems
> 
> Damitha Kumarage 
> 
> to:
> 
> Apache AXIS C Developers List
> 
> 05/20/2010 11:05 PM
> 
> Please respond to "Apache AXIS C Developers List"
> 
> Nadir Amra wrote:
> > While porting to IBM i (aka OS/400), found the following problem which 
I 
> > want to verify with developers since I really do not understand how 
this 
> > works...
> >
> > In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there 
is 
> > the routine at the bottom. 
> >
> > My compile fails due to the line 
> >
> > if(str_line > 0)
> > 
> I think this shoud be corrected to if(str_line[0] > 0)
> > which I do not understand.  Can anyone explain?  The other thing I 
> > question about this routine is the returning of a buffer that 
basically 
> > declared in automatic storage.   See statement:
> >
> > svr_conn->buffer = str_line;
> > 
> Since the content passed to svr_conn->buffer is allocated it wont' be a 
> problem here.
> 
> Thanks,
> Damitha
> > ====================
> >
> > AXIS2_EXTERN axis2_char_t *AXIS2_CALL
> > axis2_simple_tcp_svr_conn_read_request(
> >     axis2_simple_tcp_svr_conn_t * svr_conn,
> >     const axutil_env_t * env)
> > {
> >     int size = 32000;
> >     axis2_char_t str_line[32000];
> >     axis2_char_t tmp_buf[32000];
> >     int read = -1;
> >
> >     AXIS2_ENV_CHECK(env, NULL);
> >
> >     memset(str_line, 0, size);
> >     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
> > tmp_buf, size - 1)) > 0)
> >     {
> >         tmp_buf[read] = '\0';
> >         if(read > 0)
> >         {
> >             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, 
size 
> > - 1);
> >             if(read > 0)
> >             {
> >                 tmp_buf[read] = '\0';
> >                 strcat(str_line, tmp_buf);
> >                 break;
> >             }
> >             else
> >             {
> >                 break;
> >             }
> >         }
> >     }
> >     if(str_line > 0)
> >     {
> >         svr_conn->buffer = str_line;
> >     }
> >     return svr_conn->buffer;
> > }
> >
> >
> >
> >
> > Nadir Amra
> > Integrated Web Services for IBM i Operating System
> > Internet: amra@us.ibm.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: c-dev-help@axis.apache.org
> >
> >
> > 
> 
> 
> -- 
> __________________________________________________________________
> 
> Damitha Kumarage
> Technical Lead; WSO2 Inc.
> "Oxygenating the Web Service Platform; " http://www.wso2.com/
> 
> blog: " http://damithakumarage.wordpress.com/
> __________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
> 


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


Re: Porting problems

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> While porting to IBM i (aka OS/400), found the following problem which I 
> want to verify with developers since I really do not understand how this 
> works...
>
> In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there is 
> the routine at the bottom. 
>
> My compile fails due to the line 
>
> if(str_line > 0)
>   
I think this shoud be corrected to if(str_line[0] > 0)
> which I do not understand.  Can anyone explain?  The other thing I 
> question about this routine is the returning of a buffer that basically 
> declared in automatic storage.   See statement:
>
> svr_conn->buffer = str_line;
>   
Since the content passed to svr_conn->buffer is allocated it wont' be a 
problem here.

Thanks,
Damitha
> ====================
>
> AXIS2_EXTERN axis2_char_t *AXIS2_CALL
> axis2_simple_tcp_svr_conn_read_request(
>     axis2_simple_tcp_svr_conn_t * svr_conn,
>     const axutil_env_t * env)
> {
>     int size = 32000;
>     axis2_char_t str_line[32000];
>     axis2_char_t tmp_buf[32000];
>     int read = -1;
>
>     AXIS2_ENV_CHECK(env, NULL);
>
>     memset(str_line, 0, size);
>     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
> tmp_buf, size - 1)) > 0)
>     {
>         tmp_buf[read] = '\0';
>         if(read > 0)
>         {
>             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, size 
> - 1);
>             if(read > 0)
>             {
>                 tmp_buf[read] = '\0';
>                 strcat(str_line, tmp_buf);
>                 break;
>             }
>             else
>             {
>                 break;
>             }
>         }
>     }
>     if(str_line > 0)
>     {
>         svr_conn->buffer = str_line;
>     }
>     return svr_conn->buffer;
> }
>
>
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Re: Porting problems

Posted by Damitha Kumarage <da...@wso2.com>.
Nadir Amra wrote:
> While porting to IBM i (aka OS/400), found the following problem which I 
> want to verify with developers since I really do not understand how this 
> works...
>
> In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there is 
> the routine at the bottom. 
>
> My compile fails due to the line 
>
> if(str_line > 0)
>   
I think this shoud be corrected to if(str_line[0] > 0)
> which I do not understand.  Can anyone explain?  The other thing I 
> question about this routine is the returning of a buffer that basically 
> declared in automatic storage.   See statement:
>
> svr_conn->buffer = str_line;
>   
Since the content passed to svr_conn->buffer is allocated it wont' be a 
problem here.

Thanks,
Damitha
> ====================
>
> AXIS2_EXTERN axis2_char_t *AXIS2_CALL
> axis2_simple_tcp_svr_conn_read_request(
>     axis2_simple_tcp_svr_conn_t * svr_conn,
>     const axutil_env_t * env)
> {
>     int size = 32000;
>     axis2_char_t str_line[32000];
>     axis2_char_t tmp_buf[32000];
>     int read = -1;
>
>     AXIS2_ENV_CHECK(env, NULL);
>
>     memset(str_line, 0, size);
>     while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
> tmp_buf, size - 1)) > 0)
>     {
>         tmp_buf[read] = '\0';
>         if(read > 0)
>         {
>             read = axutil_stream_read(svr_conn->stream, env, tmp_buf, size 
> - 1);
>             if(read > 0)
>             {
>                 tmp_buf[read] = '\0';
>                 strcat(str_line, tmp_buf);
>                 break;
>             }
>             else
>             {
>                 break;
>             }
>         }
>     }
>     if(str_line > 0)
>     {
>         svr_conn->buffer = str_line;
>     }
>     return svr_conn->buffer;
> }
>
>
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-dev-help@axis.apache.org
>
>
>   


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

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


Porting problems

Posted by Nadir Amra <am...@us.ibm.com>.
While porting to IBM i (aka OS/400), found the following problem which I 
want to verify with developers since I really do not understand how this 
works...

In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there is 
the routine at the bottom. 

My compile fails due to the line 

if(str_line > 0)

which I do not understand.  Can anyone explain?  The other thing I 
question about this routine is the returning of a buffer that basically 
declared in automatic storage.   See statement:

svr_conn->buffer = str_line;

====================

AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axis2_simple_tcp_svr_conn_read_request(
    axis2_simple_tcp_svr_conn_t * svr_conn,
    const axutil_env_t * env)
{
    int size = 32000;
    axis2_char_t str_line[32000];
    axis2_char_t tmp_buf[32000];
    int read = -1;

    AXIS2_ENV_CHECK(env, NULL);

    memset(str_line, 0, size);
    while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
tmp_buf, size - 1)) > 0)
    {
        tmp_buf[read] = '\0';
        if(read > 0)
        {
            read = axutil_stream_read(svr_conn->stream, env, tmp_buf, size 
- 1);
            if(read > 0)
            {
                tmp_buf[read] = '\0';
                strcat(str_line, tmp_buf);
                break;
            }
            else
            {
                break;
            }
        }
    }
    if(str_line > 0)
    {
        svr_conn->buffer = str_line;
    }
    return svr_conn->buffer;
}




Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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


Porting problems

Posted by Nadir Amra <am...@us.ibm.com>.
While porting to IBM i (aka OS/400), found the following problem which I 
want to verify with developers since I really do not understand how this 
works...

In file src\core\transport\tcp\receiver\simple_tcp_svr_conn.c, there is 
the routine at the bottom. 

My compile fails due to the line 

if(str_line > 0)

which I do not understand.  Can anyone explain?  The other thing I 
question about this routine is the returning of a buffer that basically 
declared in automatic storage.   See statement:

svr_conn->buffer = str_line;

====================

AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axis2_simple_tcp_svr_conn_read_request(
    axis2_simple_tcp_svr_conn_t * svr_conn,
    const axutil_env_t * env)
{
    int size = 32000;
    axis2_char_t str_line[32000];
    axis2_char_t tmp_buf[32000];
    int read = -1;

    AXIS2_ENV_CHECK(env, NULL);

    memset(str_line, 0, size);
    while((read = axutil_stream_peek_socket(svr_conn->stream, env, 
tmp_buf, size - 1)) > 0)
    {
        tmp_buf[read] = '\0';
        if(read > 0)
        {
            read = axutil_stream_read(svr_conn->stream, env, tmp_buf, size 
- 1);
            if(read > 0)
            {
                tmp_buf[read] = '\0';
                strcat(str_line, tmp_buf);
                break;
            }
            else
            {
                break;
            }
        }
    }
    if(str_line > 0)
    {
        svr_conn->buffer = str_line;
    }
    return svr_conn->buffer;
}




Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com

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