Re: RE : How to free axutil environment?

2010-01-21 Thread Damitha Kumarage


Olivier Mengué wrote:


The problem seems to be that axutil_log_free() should call 
axutil_file_handler_close(), isn't it ?


No axutil_file_handler_close is called from axutil_log_impl_free() which 
is the function actully called when environment is freed.

BTW latest valgrind does not show any memory leaks here.
Thanks,
Damitha



 Message d'origine
De: Olivier Mengué [mailto:omen...@oxymel.com]

I've removed the axutil_env_free_masked() call, but I still have a leak.

Here is the full Insure++ report:

MEMORY LEAK SUMMARY
===

2 outstanding memory references for 140 bytes.

Outstanding allocated memory

   128 bytes 1 chunk allocated in pth_spinlock.c
  malloc()  (interface)
_lib_spinlock_create()  
../../../../../../../../src/bos/usr/ccs/lib/libpthreads/pth_spinlock.c
   _rec_mutex_init_19_13()  
../../../../../../../src/bos/usr/ccs/lib/libc/rec_mutex.c
_rec_mutex_alloc()  
../../../../../../../src/bos/usr/ccs/lib/libc/rec_mutex.c
_findiop()  
../../../../../../../src/bos/usr/ccs/lib/libc/findiop.c
   sbcra()  
../../../../../../../src/bos/usr/ccs/lib/libc/fopen.c

   fopen()  (interface)
axutil_file_handler_open()  file_handler.c
   axutil_log_create()  log.c
   axutil_env_create_all()  env.c
main()  env_leak.c

12 bytes 1 chunk allocated in rec_mutex.c
  malloc()  (interface)
_rec_mutex_alloc()  
../../../../../../../src/bos/usr/ccs/lib/libc/rec_mutex.c
_findiop()  
../../../../../../../src/bos/usr/ccs/lib/libc/findiop.c
   sbcra()  
../../../../../../../src/bos/usr/ccs/lib/libc/fopen.c

   fopen()  (interface)
axutil_file_handler_open()  file_handler.c
   axutil_log_create()  log.c
   axutil_env_create_all()  env.c
main()  env_leak.c




--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: looking for ideas

2010-01-09 Thread Damitha Kumarage

Steve Leland wrote:
I have Axis2/c 1.6.0 building and working nicely with the builtin http 
server on Win 2008.  Cool stuff - thanks!!
 
With this working environment now I get to extend the functionality in 
our web service code.  I would like to create an automated test 
environment to catch regressions introduced by changes in the business 
logic, which strikes me as something that others must also have done.
 
So to those who've already been down this road, would you please tell 
me if you think I'm heading in the wrong direction here, and maybe why?
 
I want to 'record' a test by pointing the client at a trace 
facility, and store the resulting http trace of the request 
and response in a database. 
 
To run a regression test would involve grabbing the request trace out 
of the database, programmaticly handing it to the Axis2c engine, then 
comparing the Axis2c generated response to the response in the database.
 
First question - is that the best approach?  (where best ==  work 
correctly and doable relatively fast)
 
If so, any foresee-able gotchas?
 
It looks to me like uing a messageReciever  targetting the 
raw_xml_in_out_msg_recv might work, but all the doc I can locate is 
for java's 
class=org.apache.axis2.receifers.RawXMLInOutMessageReceiver.  What 
syntax to use thttp://wso2.org/projects/wsf/cpphere?

You can write your own message receiver and use it in your service by adding
operation name=op
   messageReceiver class=your_msg_recv/
   /operation
in your services.xml
For example there is a custom message reciever written to load C++ 
services in WSF/C++ source [1] at src/msg_recv. Write a similar one and 
build the shared library and put it into the Axis2/C repository's lib 
directory.

Regards,
Damitha

[1] http://wso2.org/projects/wsf/cpp
 
tia!

Steve
 



--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: Localname of attribute value

2010-01-06 Thread Damitha Kumarage

Thomas Baier wrote:

Hi,

when using anyType as a parameter, type information about the value
passed is included as an attribute, e.g. in the soap message

   pData xsi:type=xsd:double3.1415/pData

I can get the type attribute using axiom_element_get_attribute(), but
the attribute's value is xsd:double. How can I get the localname
double (without simple string parsing). Is there any utility function
to split a qname into namespace and localname?

AFAIK no

 I have read through the
qname functions, but I don't know how to add the context (as I don't
really know that the namespace prefix is xsd). The namespace information
is somewhere (before or after) in the SOAP message.

E.g. an alternative for specification is

pData xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:type=xs:int mlns:xs=http://www.w3.org/2001/XMLSchema;100/pData

Or would the suggested solution be to just ignore the prefix and assume
that the namespace prefix of a type attribute is just ok?

Best,
Thomas


  



--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: Localname of attribute value

2010-01-06 Thread Damitha Kumarage

Thomas Baier wrote:

Damitha Kumarage schrieb:
  

Thomas Baier wrote:


Hi,

when using anyType as a parameter, type information about the value
passed is included as an attribute, e.g. in the soap message

   pData xsi:type=xsd:double3.1415/pData

I can get the type attribute using axiom_element_get_attribute(), but
the attribute's value is xsd:double. How can I get the localname
double (without simple string parsing). Is there any utility function
to split a qname into namespace and localname?
  

AFAIK no



What is the recommended way to find out the concrete data type of the
values for anyType?
  
There is a jira related to this [1]. Fixing this involve solving this 
problem


Thanks,
Damitha

[1] https://issues.apache.org/jira/browse/AXIS2C-1396

Best,
Thomas


  



--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: deploying axis2c with IBM http server

2009-12-22 Thread Damitha Kumarage

Pradeep Patel wrote:

Hi,

I have written a web service on windows using Axis2c and i have 
deployed it successfully in axis2_http_server. Then i deployed it with 
Apache http server by following the procedure described in Axis2c manual.


http://ws.apache.org/axis2/c/docs/axis2c_manual.html#mod_axis2

Now I want to deploy the same service with IBM http server and i 
searched a lot but i could not find any help. The reason is we have 
IBM http server on the system where the web service will be deployed 
finally.


IBM http server is based on Apache http server so i guess there should 
not be much difference. I tried to follow the same procedure from the 
manual but its not working.
What are the errors/problems you encounter?. If that server support 
Apache modules support in the same way as the original Apache server 
then it should work fine.


Thanks,
Damitha


Has anyone did the same? Can someone please suggest me any guidelines 
or any link?


--
Thanks  Regards
Pradeep Patel



--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: client side memory management

2009-12-13 Thread Damitha Kumarage

Sam Carleton wrote:
I am looking at the hello.c sample and seeing a lot of things that are 
never freed.  I am also not seeing any rules stated on who is 
responsible for freeing memory on things. 

See whether this would help [1]

Thanks,
Damitha
[1] 
http://damithakumarage.wordpress.com/2009/03/07/memory-handling-conventions-in-axis2c/


For example, in the hello.c code an axis2_options_t *options is 
created but at no point is it freed.  Is it automatically freed 
when axutil_env_free() is called or is that an oversight in the example?  

Another example is in the build_om_request method, it looks like 
axiom_element_create() creates both the axiom_node_t* greet_om_node 
and axiom_element_t * greet_om_ele, but at no point do I see either 
being freed.  Does the axis2_svc_client_send_receive() free them or is 
this also an oversight in the example?


Sam



--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: .Net client can call Axis2/C service, Axis2/C client cannot

2009-12-12 Thread Damitha Kumarage

Check your service name. Is it parataMgr or ParataMgr?
Damitha
Sam Carleton wrote:

Selvaratnam,

Thank you for your help  I was assuming the issue was related to 
the header in the request..  Here is the TCPMon log for the Axis2/C 
client to Axis2/C service that does not work:


## *** BEGIN *** ##

  POST /axis2/services/parataMgr HTTP/1.1
  User-Agent: Axis2C/1.6.0
  SOAPAction: urn:mmpp:parataMgr/getVersionCheck
  Content-Length: 472
  Content-Type: text/xml;charset=UTF-8
  Host: 127.0.0.1:8041 http://127.0.0.1:8041

  soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing;
  wsa:Tohttp://localhost:8041/axis2/services/parataMgr/wsa:To
  wsa:Actionurn:mmpp:parataMgr/getVersionCheck/wsa:Action
 
 wsa:MessageIDurn:uuid:a6418349-1d84-43d4-801f-98333d974be4/wsa:MessageID

/soapenv:Header
soapenv:Body
  n:getVersionCheck xmlns:n=urn:mmpp:parataMgr/n:getVersionCheck
/soapenv:Body
  /soapenv:Envelope

///

  HTTP/1.1 500 Internal Server Error
  Date: Sat, 12 Dec 2009 16:02:42 GMT
  Server: Apache/2.2.11 (Win32) Axis2C/1.6.0 PHP/5.2.5
  Content-Length: 425
  Connection: close
  Content-Type: text/xml

  soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

soapenv:Body
  soapenv:Fault
faultcodesoapenv:Server/faultcode
faultstringService Not Found/faultstring
detail
  ExceptionService Not Found, Endpoint referance address is 
http://localhost:8041/axis2/services/parataMgr and wsa actions is 
urn:mmpp:parataMgr/getVersionCheck/Exception

/detail
  /soapenv:Fault
/soapenv:Body
  /soapenv:Envelope

## *** END *** ##

Here is the TCPMon log for the .Net WCF client to Axis2/C service that 
works just fine


## *** BEGIN *** ##

  POST /axis2/services/ParataMgr HTTP/1.1
  Content-Type: text/xml; charset=utf-8
  VsDebuggerCausalityData: 
uIDPoxSBUrlHuNPN/pxDwgwA34KEJ2oVP0O6Dw1Dp8a2Sfbfz3XaB2ZDq08omNFFhx8ACQAA

  SOAPAction: urn:mmpp:parataMgr/getVersionCheck
  Host: 127.0.0.1:8041 http://127.0.0.1:8041
  Content-Length: 238
  Expect: 100-continue
  Connection: Keep-Alive

  s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/;
s:Body xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

  getVersionCheck xmlns=urn:mmpp:parataMgr/
/s:Body
  /s:Envelope

///

  HTTP/1.1 100 Continue

  HTTP/1.1 200 OK
  Date: Sat, 12 Dec 2009 15:58:09 GMT
  Server: Apache/2.2.11 (Win32) Axis2C/1.6.0 PHP/5.2.5
  Content-Length: 230
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: text/xml

  soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

soapenv:Body
  n:getVersionCheckResponse xmlns:n=urn:mmpp:parataMgr
version100/version
  /n:getVersionCheckResponse
/soapenv:Body
  /soapenv:Envelope




--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: Transport identified SOAP version does not match with SOAP message version

2009-11-04 Thread Damitha Kumarage

Dimitri Pararas wrote:
I seem to be having some difficulty creating the proper headers for my 
request using Axis2/c.  I am creating a simple request using the hello 
client as a base.  When I send my request to the simple server 
included with the axis2/c (after adding a dumb service) the request 
works properly.  When I send it to the actual server I receive this 
error Transport identified SOAP version does not match with SOAP 
message version (#195) the header created looks like this

POST /foobar/services/FoobarService HTTP/1.1
User-Agent: Axis2C/1.6.0
Content-Length: 420
Content-Type: application/soap+xml;charset=UTF-8
Host: mercury:21083

soapenv:Envelope 
xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;soapenv:BodygetTaskValidityacNum0001/acNumlayoverDate2009-11-1/layoverDatenewStationBOS/newStationorigStationLHR/origStationarrivalDateTime2009-11-1 
20:00/arrivalDateTimecallerID

POST /Foobar/services/foobarService HTTP/1.1
User-Agent: Axis2C/1.6.0
Content-Length: 420
Content-Type: application/soap+xml;charset=UTF-8
I think you have done a mistake here when copying the soap message to 
this mail message by copying the http headers again at the end. Are you 
sure your soap message have no mistakes.

I guess your actual service is a dot net service

thanks,
Damitha


I am using the axis2_svc_client_send_receive to send this request, and 
I have not been able to figure out what the problem is and how to 
manipulate the header even if I did. Thanks

Dimitri





--
__

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

blog:  http://damithakumarage.wordpress.com/
__


Re: Axis2/C and lighttpd

2009-07-19 Thread Damitha Kumarage

Hi,
See whether this [1] help. AFAIK someone started developing a lighttpd 
module for Axis2/C few months back. Don't know how far it went.


thanks,
Damitha

[1] http://mohanjith.net/blog/2008/01/wso2-wsfphp-with-lighttpd.html

Feltraco, Fabio (RD Brazil) wrote:

Hi,

 Looking at the axis/src/core/transport/http/server/ (for Axis2/C) we have:
   IIS/ (Microsoft IIS Server)
   apache2/ (Apache HTTP Server)
   simple_axis2_server/

 I would like to know if someone have already developed a Lighttpd module f=
or server side (or for any other light weight http server).

 As I have just started working with Axis2/C I also would like to know if t=
here is a cookbook explaining how to use Axis2/C with different http server=
s.

 In our case we intend to use Axis2/C in an embedded system (limited memory=
, rom, etc) and we cannot use Apache or IIS servers. And Simple Axis2 Serve=
r is not intended for production.

 Regards.

Fabio

  



--
__

Damitha Kumarage
http://people.apache.org/
__


[Axis2] [ANN] Apache Axis2/C 1.2.0 Released

2008-01-17 Thread Damitha Kumarage
Apache Axis2/C Team is pleased to announce the release of Apache Axis2/C
version 1.2.0
You can download this release from
http://ws.apache.org/axis2/c/download.cgi

Key Features

   1. Support for one-way messaging (In-Only) and request response
  messaging (In-Out)
   2. Client APIs: Easy to use service client API and more advanced
operation
  client API
   3. Transports supported: HTTP
  * Inbuilt HTTP server called simple axis server
  * Apache2 httpd module called mod_axis2 for server side
  * IIS module for server side
  * Client transport with ability to enable SSL support
  * Basic HTTP Authentication
  * libcurl based client transport
   4. Module architecture, mechanism to extend the SOAP processing model
   5. WS-Addressing support, both the submission (2004/08) and final
(2005/08)
  versions, implemented as a module
   6. MTOM/XOP support
   7. AXIOM, an XML object model optimized for SOAP 1.1/1.2 messages; This
has
  complete XML infoset support
   8. XML parser abstraction
  * Libxml2 wrapper
  * Guththila pull parser support
   9. Both directory based and archive based deployment models for deploying
  services and modules
  10. Description hierarchy providing access to static data of Axis2/C
runtime
  (configuration, service groups, services, operations and messages)
  11. Context hierarchy providing access to dynamic Axis2/C runtime
information
  (corresponding contexts to map to each level of description hierarchy)
  12. Message receiver abstraction
  * Inbuilt raw XML message receiver
  13. Code generation tool for stub and skeleton generation for a given WSDL
  (based on Java tool)
  * Axis Data Binding (ADB) support
  14. Transport proxy support
  15. REST support (more POX like) using both HTTP POST and GET
  16. Comprehensive documentation
  * Axis2/C Manual
  17. WS-Policy implementation called Neethi/C, with WS-SecurityPolicy
extension
  18. TCP Transport, for both client and server side

Major Changes Since Last Release

   1 Improvements to Java tool, WSDL2C, that generates C code
   2 Improvment to Apache2 module so that it
(1) Create a shared memory global pool
(11) create context hierarchy in the global pool
 enabling it to have true application level scope.
   3 Improved Policy
   4 Improvements to thread environment
   5 Improvements to error handling
   6 Memory leak fixes
   7 Many bug fixes

We welcome your early feedback on this implementation.
Thanks for your interest in Axis2/C

-- Apache Axis2/C Team --


Axis2C Milestone Release M0.4 Released

2006-02-16 Thread Damitha Kumarage
Hi All,



The fourth milestone release of Axis2 C, M0.4 has been released and could be downloaded at



http://www.apache.org/dyn/closer.cgi/ws/axis2/c/M0.4/



We have done considerable amount of improvements in the past two weeks since the M0.3 release.

Hence this release.



We have the following features added on top of the M0.3 release



1. Threading support and threaded simple axis server

2. Module loading support

3. Addressing module and addressing based dispatching

4. HTTP chunking support

5. Improved logging mechanism

6. Ability to build and run on Windows platform



By now, we have implemented all the core features except MTOM support.

The following are a list of TODOs to be handled in the next milestone.



1. Comprehensive testing for thread safety

2. Fixing memory leaks

3. Organize the source code and header structure

4. Encoding support with streams

5. Website and documentation



We welcome your early feedback on this implementation.



Best Regards

Damitha


Axis2C Milestone Release M0.2 Released

2005-12-08 Thread Damitha Kumarage
Hi All,

The second milestone release of Axis2C, M0.2 has been released and could be downloaded at

http://www.apache.org/dist/ws/axis2c/

We have been able to improve OM module since the last release and PHP binding for
OM module is in place.

Following features are included

1. Improved OM module
2. libxml2 parser support
3. PHP binding for OM module
4. Some test cases for PHP binding
5. Many memory leaks fixes

We welcome your early feedback on this implementation.


Best Regards
Damitha



Axis2C Milestone Release M0.1 Released

2005-11-24 Thread Damitha Kumarage
Hi All,

The first milestone release of Axis2C, M0.1 has been released and could be downloaded at

http://www.apache.org/dist/ws/axis2c/

This release includes the C implementation of AXIOM, an important part of Axis2C web service stack.

Following features are included

1. OM module
2. Guththila pull parser support
3. libxml2 parser support(only reader is supported as of now)
4. doxygen documentation support
5. A sample demonstrating how to use OM

We welcome your early feedback on this implementation.

Best Regards

Damitha



Re: Fw: Gnu Make files

2005-02-09 Thread Damitha Kumarage




+1 
On Wed, 9 Feb 2005 09:55:01 +, John Hawkins wrote
 Hello,

 
 does anyone out there use the 
-m 
function
(creation of makefiles) on WSDL2Ws ? If not then we are thnking of 
removing
it to increase 
stability.

 
 cheers,

 John.

 
 - Forwarded 
by 
John
Hawkins/UK/IBM on 09/02/2005 09:49 
-

 





Samisa Abeysinghe 
[EMAIL PROTECTED]


 09/02/2005 
06:19







 Please respond to
 

Apache AXIS C Developers 
List



 









 To
Apache AXIS C 
Developers
List 
axis-c-dev@ws.apache.org




 cc






 Subject
Re: Gnu Make 
files



 












 




 
 Given that we have problems with make file 
system
even with build on
 

L/Unix like platforms, I feel that it is not worth having it here.
 

 

Could document how to compile and link clients/servers using basic g++
 

commands to help users.
 
 

Thanks,
 

Samisa... 
 
 

On Tue, 8 Feb 2005 16:18:30 +, Andrew Perry2 
[EMAIL PROTECTED]
wrote:
 

 There is a test which checks -m option. but it only checks if 
the
makefile
 

 is generated or not and not the validity of the makefile.
 

 These WSDL2WS options tests will be added soon.
 

 
 

 Regards,
 

 
 

 Andrew Perry
 

 IBM Web Services Client for C/C++
 

 [EMAIL PROTECTED]
 

 Mail Point 127
 

 IBM UK Laboratories. Hursley Park, Winchester, Hants. SO21 2JN
 

 Tel. Internal 249828  External + 44 (0)1962 819828
 

 Fax. + 44(0)1962 818080
 

 
 

              John
 

              Hawkins/UK/[EMAIL PROTECTED]
 

              MGB    

                     

                     

       To
 

                    

                   
Apache
AXIS C Developers List
 

              08/02/2005 14:57  

       axis-c-dev@ws.apache.org
 

                    

                     

                     

        cc
 

 
 

              Please respond 
to
                     

              Subject
 

               Apache 
AXIS
C           Re: Gnu Make files
 

              Developers 
List
 

 
 

 
 

 It is an option currently on WSDL2Ws -
 

 -mnone|gnu           
generate
make files (none|gnu) - default is
 

 none\n);
 

 
 

  Nadir Amra
 

  [EMAIL PROTECTED]
 

                    

                     

                     

        To
 

                    

                Apache 
AXIS
C Developers List
 

  08/02/2005 14:44              

    axis-c-dev@ws.apache.org
 

                    

                     

                     

        cc
 

 
 

      Please respond to        

                     

              Subject
 

       Apache AXIS C        

       Re: Gnu Make files
 

      Developers List
 

 
 

 
 

 I prefer not to generate makefilesbut if people want this 
then
it
 

 should be on option on the command that you would need to set 
(i.e.
it
 

 should not be automatically generated).
 

 
 

 John Hawkins [EMAIL PROTECTED] wrote on 02/08/2005 
08:43:00
AM:
 

 
 

 
 

  Hi Folk,
 

 
 

  I remember a long time ago a small debate about having WSD2Ws
 

  generate Gnu make files? I think this is wierd and I 
remember
some
 

  people objecting previously. However, Do  we test this 
today?
If not
 

  then I suggest remove this function on the basis that we're 
just
 

  making more rope to hang ourselves with?
 

 
 

  I've certainly not seen anyone on the mailng list using this?
 

 
 

  thoughts?
 

 
 

  cheers
 

  John.
 

 
 


 





-- 


Damitha Kumarage 


hSenid Software International (PVT) Ltd(Web: www.hsenid.com) 


[EMAIL PROTECTED]([EMAIL PROTECTED]) 


 

Lanka Software Foundation (http://www.opensource.lk)