Can not commit to the trunk

2010-02-19 Thread Amila Suriarachchi
hi,

I am getting this error when try to commit to the trunk.

svn: Commit failed (details follow):
svn: Server sent unexpected return value (403 Forbidden) in response to
CHECKOUT request for
'/repos/asf/!svn/ver/909680/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/writer/MTOMAwareOMBuilder.java'
svn: Your commit message was left in a temporary file:

but seems that others can commit to the trunk. what could be the reason for
this?

thanks,
Amila.

-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Sandesha2 1.5 Release Candidate

2010-02-17 Thread Amila Suriarachchi
since rampart 1.5 has been released shall we do the sandesha release?

thanks,
Amila.

On Tue, Oct 6, 2009 at 9:07 PM, David Parsons1 parso...@uk.ibm.com wrote:


 Hi,

 I have created a Sandesha2 1.5 release candidate here:

 
 http://people.apache.org/~parsonsd/sandesha-1.5/RC1/dist/http://people.apache.org/%7Eparsonsd/sandesha-1.5/RC1/dist/

 and the M2 repository can be found here:

 
 http://people.apache.org/~parsonsd/sandesha-1.5/RC1/m2_repo/http://people.apache.org/%7Eparsonsd/sandesha-1.5/RC1/m2_repo/

 This release candidate is using the Rampart 1.5 release candidate which can
 be found:

  
 *http://people.apache.org/~nandana/rampart-1.5/RC1/dist/*http://people.apache.org/%7Enandana/rampart-1.5/RC1/dist/

 and the M2 repository for this can be found here:
 *

 **http://people.apache.org/~nandana/rampart-1.5/RC1/m2_repo/*http://people.apache.org/%7Enandana/rampart-1.5/RC1/m2_repo/


 I will leave this available for a short period of time.  If no one finds
 any issues I'll request a vote on whether to submit it as a release of
 Sandesha2.  The Rampart 1.5 release is going to have to be cut before I can
 officially cut the Sandesha2 release so does anyone know how close this is
 to being done?

 Regards,

 Dave

 Dave Parsons
 Web Services Development
 INTERNAL:  David Parsons1/UK/i...@ibmgb :: DE3F20 :: 246930
 EXTERNAL:  parso...@uk.ibm.com :: (01962) 816930
 Mail Point 211, IBM Hursley Park, Winchester. SO21 2JN



  --

 *
 *

 *Unless stated otherwise above:
 IBM United Kingdom Limited - Registered in England and Wales with number
 741598.
 Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
 *










  --

 *
 *

 *Unless stated otherwise above:
 IBM United Kingdom Limited - Registered in England and Wales with number
 741598.
 Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
 *









-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: HELP: Monitoring SOAP request

2010-02-11 Thread Amila Suriarachchi
On Thu, Feb 11, 2010 at 4:59 PM, Marco Indaco marco.ind...@gmail.comwrote:

 Hi at all,
 i'm working on Apache ODE, and my objective is to modify soap request
 an external web service of flow at run-time,
 ODE is based on framework axis 2.

 My idea is based on intercept SOAP request in XML format, modify it,
 and inject a new SOAP request to framework.

 I saw that MessageContext class manage a message to build a soap
 request but which module at transport level send a soap request as xml
 format string ?


see org.apache.axis2.transport.http.SOAPMessageFormatter

thanks,
Amila.


 Thanks in advance for any suggestion
 Best Regards

 Marco




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2/Rampart WS-Security performance

2010-02-11 Thread Amila Suriarachchi
hi Asankha,

how many messages you sent for one scenario test?
i.e for eg 500b message with 640 threads

In the very first scenario upto 640 concurrency level both have same through
put while for 1280
threads UE has a sudden increment and for 2560 other ESB has a relatively
high change. What could be
the reason for that? Are all these results repeatable?

thanks,
Amila.

On Thu, Feb 11, 2010 at 12:52 PM, Asankha C. Perera asan...@apache.orgwrote:

  Hi Dennis

 I looked at WSS4j as a foundation for providing WS-Security support for the
 UltraESB, http://adroitlogic.org and realized the fact that its not
 really optimized for use on an ESB; in addition to a few more issues I came
 across. Thus we developed a new library - which is functionally similar to
 WSS4J, which performs over 3 X times or better than WSS4J. However,
 currently it does not yet ship as a separate library - although we may
 decide to do that if there is user interest and demand.

 Here is a comparison of it in use against WS-Security based on
 WSS4J/Rampart


 http://adroitlogic.org/samples-articles-and-tutorials/15-tutorials/48-esb-performance.html

 cheers
 asankha


 Following up on some earlier discussions of Axis2/Rampart WS-Security
 performance, devWorks has now published my latest article in the Java Web
 Services series, comparing Axis2/Rampart with Metro WS-Security performance:
 http://www.ibm.com/developerworks/java/library/j-jws11/ The results are
 very bad for Axis2/Rampart, with Metro more than twice as fast overall in
 the WS-Security tests.

 As mentioned in the article, some timing tests with org.apache.rampart.TIME
 logging seemed to indicate that a lot of the overhead is actually occurring
 outside the Rampart handler. I suspect that Axis2 has fallen into the same
 performance pit as Axis in doing conversions to and from different forms of
 the message.

 If anyone is interested in investigating further, the full source code for
 the performance comparison is available as a download from the article.

  - Dennis

  --
 Asankha C. Perera
 AdroitLogic, http://adroitlogic.org
 http://esbmagic.blogspot.com





-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2/Rampart WS-Security performance

2010-02-11 Thread Amila Suriarachchi
On Thu, Feb 11, 2010 at 10:23 PM, Asankha C. Perera asan...@apache.orgwrote:

 Hi Amila
  how many messages you sent for one scenario test?
  i.e for eg 500b message with 640 threads
 This depends on the concurrency, and can be found exactly by looking at
 the script used to run the load test. For example, when 20 users were
 being used, the iterations were 1000, while for 2560 users, the
 iterations were 10 - this was to keep the overall test execution time
 limited.
  In the very first scenario upto 640 concurrency level both have same
  through put while for 1280
  threads UE has a sudden increment and for 2560 other ESB has a
  relatively high change. What could be
  the reason for that?
 Which set are you referring to - the WS-Security case? Sorry I do not
 see what you mean..

1. Direct Proxy Scenario 500b case.

And also
1. Direct Proxy Scenario 1K case
for 640 concurrency other ESB has performed well but 1280 and 2560 done
well.

I am just wondering reason for these anomalities.

thanks,
Amila.



  Are all these results repeatable?
 Yes, you could re-run the test very easily on an EC2 node as per the
 details given at the bottom of the article - it will ofcourse take a
 couple of hours to complete all scenarios - so ensure that your SSH
 client timeout is disabled :D

 cheers
 asankha

 --
 Asankha C. Perera
 AdroitLogic, http://adroitlogic.org

 http://esbmagic.blogspot.com







-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 Deployers doesn't support a directory within another directory under repository??

2010-02-10 Thread Amila Suriarachchi
On Thu, Feb 11, 2010 at 8:11 AM, Ruwan Linton ruwan.lin...@gmail.comwrote:

 Folks,

 Synapse has a requirement to have a directory called conf/synapse-config in
 the repository and have its own space for sequences, endpoints, proxy
 services so forth inside that.. So the expected deployer config within the
 axis2.xml is as follows;

 deployer extension=xml directory=conf/synapse-config/sequences
 class=org.apache.synapse.deployers.SequenceDeployer/

 but because of the following code fragment it takes only the last director
 specified in the directory declaration of the deployer. Is there any reason
 for us to restrict the deployer to only one level, even in that case we
 should be treating the directory as the top level direcotry so that the path
 is correct, but here we are calculating a directory path which is not
 existing. With the above case it computes the directory as
 $AXIS2_REPOSITORY/sequences which is completely wrong :-(

 org.apache.axis2.deployment.RepositoryListener [267, 280]

 //This will load the files from the directories
 // specified by axis2.xml (As deployer)
 private void loadOtherDirectories() {
 for (Map.EntryString, MapString, Deployer entry :
 deploymentEngine.getDeployers().entrySet()) {
 String directory = entry.getKey();
 MapString, Deployer extensionMap = entry.getValue();
 for (String extension : extensionMap.keySet()) {
 String[] strings = directory.split(/);
 File dirToSearch = new
 File(deploymentEngine.getRepositoryDir(),
 strings[strings.length - 1]);
 findFileForGivenDirectory(dirToSearch, extension,
 directory);

I think it may work if you specify only 'conf' and above method finds it
recursively.

+1 to remove spliting if there is no reason for that.

thanks,
Amila.

 }
 }
 }

 Can we get rid of the splitting and let the user declare inner directories
 for the artifacts to be deployed??

 Thanks,
 Ruwan

 --
 Ruwan Linton
 Technical Lead  Product Manager; WSO2 ESB; http://wso2.org/esb
 WSO2 Inc.; http://wso2.org
 email: ru...@wso2.com; cell: +94 77 341 3097
 blog: http://ruwansblog.blogspot.com




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


[Vote] Charith Wickramarachchi as Commiter

2010-01-24 Thread Amila Suriarachchi
hi,

Charith has done the whole SMS transport module for transport project as his
GSoc project.
And also is contributing for that even after that.

here is my +1.

thanks,
Amila.


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] making minOccurs=1 by default for wsdl generated with POJO

2010-01-08 Thread Amila Suriarachchi
On Fri, Jan 8, 2010 at 4:23 PM, Mauro Molinari
mauro.molin...@cardinis.comwrote:

 Michail Prusakov ha scritto:

  I am sorry I've missed the discussion, but why have you made minOccurs=1
 for null non-primitives? As far as I see it, if a value is null the wsdl
 should allow passing it as nill or not passing it at all because:
 1) two ways of saying something is null means better interoperability as
 if a client does not support one way, it can use the other. I believe .NET
 1.x clients are good example of this.
 2) by omitting a value we can make the soap message smaller and thus
 increase performance.


 Hi Mike,
 if you read the whole discussion and especially the related issue(*),
 you'll see that by specifying minOccurs=0 for null non-primitives will cause
 Axis2 to generate a WSDL from which .NET tools will have problems to
 generate clients. These are .NET bugs, but if they can be avoided it's
 better, otherwise .NET interoperability is severely affected.


There is a different between interoperability and the signature of the
generated method. Here the problem is having an inconvenient method
signature.


 IMHO the preferred way to solve this would have been to have a flag (false
 by default) to use a .NET friendly generation algorithm, but Amila
 preferred not to go this way.


I didn't agree on the parameter name. But we can add a parameter like
setMinOccursZero to make this compatible with clients which does not
support nillable true.

thanks,
Amila.


 (*) https://issues.apache.org/jira/browse/AXIS2-3300


 --
 Mauro Molinari
 Software Designer  Developer
 E-mail: mauro.molin...@cardinis.com




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] making minOccurs=1 by default for wsdl generated with POJO

2010-01-07 Thread Amila Suriarachchi
On Thu, Jan 7, 2010 at 3:35 PM, Mauro Molinari
mauro.molin...@cardinis.comwrote:

 Amila Suriarachchi ha scritto:

  ok then lets make minOccurs = 1 by default. As Sosnoski has said it is the
 the best solution. but that make everyone life easier.

 ohh. this should be 'As Sosnoski has said it is not the the best solution'
:) Sorry for mistake.

thanks,
Amila.


 Sorry, I can't find where Sosnoski says that minOccurs=1 by default for
 every kind of parameters is the best solution.
 He said that it's the best to use minOccurs=1 for primitives (as I said),
 while he preferred to keep on using minOccurs=0 for object types, while I
 was saying it was preferrable to use nillable=true because of .NET
 compatibility.

 Moreover, if you use minOccurs=1 always, generating a client with Axis2
 from the resulting WSDL, will then lead to the use of primitives that CANNOT
 let you specify a null value.

 So, the actual result is:

 = starting from public Integer methodA(Integer a);
 = Java2WSDL generates a WSDL with both the return type and the parameter
 type as mandatory (minOccurs=1, not specified but inherited as XML Schema
 default)
 = if you generate a client with WSDL2Java you'll get:

 public int methodA(int a);

 So, a client would not be able to call the service speciying null as the
 input parameter and could not handle null as the return type.

 That's not good at all!


 --
 Mauro Molinari
 Software Designer  Developer
 E-mail: mauro.molin...@cardinis.com
 ___
 CARDINIS Solutions
 Via San Crispino, 46
 35129 Padova - Italy
 Tel. +39 0498072095
 Fax +39 0497800824
 http://www.cardinis.com

 ---
 Questo messaggio è strettamente riservato ai destinatari specificati.
 Se è ricevuto per errore si prega di avvisare il mittente e di cancellarlo
 dal proprio sistema.
 -
 This message is specifically addressed to the recipient(s).
 Should you receive it by mistake, please notify the sender and delete it
 from your system.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] making minOccurs=1 by default for wsdl generated with POJO

2010-01-07 Thread Amila Suriarachchi
On Thu, Jan 7, 2010 at 4:39 PM, Mauro Molinari
mauro.molin...@cardinis.comwrote:

 Amila Suriarachchi ha scritto:

  On Thu, Jan 7, 2010 at 3:35 PM, Mauro Molinari 
 mauro.molin...@cardinis.com mailto:mauro.molin...@cardinis.com wrote:

Amila Suriarachchi ha scritto:

ok then lets make minOccurs = 1 by default. As Sosnoski has said
it is the the best solution. but that make everyone life easier.

 ohh. this should be 'As Sosnoski has said it is not the the best solution'
 :) Sorry for mistake.

 thanks,
 Amila.


 Ok, but... given my last comments on the bug report, what is your last
 committed solution then?

 Is it:
 a) nothing (= minOccurs=1, nillable=false) for primitives and
 nillable=true (= still minOccurs=1) for non-primitives

this should be the way.

Amila.


 - OR -
 b) nothing (= minOccurs=1, nillable=false) in any case

 Thanks.


 --
 Mauro Molinari
 Software Designer  Developer
 E-mail: mauro.molin...@cardinis.com




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Setting HTTP header fields for SOAP request in Axis2

2010-01-07 Thread Amila Suriarachchi
On Fri, Jan 8, 2010 at 4:17 AM, foampile amakare...@yahoo.com wrote:


 Apparently, Axis 2 does not specify the content-length field in the HTTP
 header.  The WS I am dealing with is requiring it, otherwise throwing a
 411
 Error: Length Required.

 Does anyone know how to set the HTTP header using Axis 2 ?


switch off chunching. there is a constant in HttpConstants to set this.

thanks,
Amila.


 Thanks
 --
 View this message in context:
 http://old.nabble.com/Setting-HTTP-header-fields-for-SOAP-request-in-Axis2-tp27068422p27068422.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Handling https request in server side

2010-01-06 Thread Amila Suriarachchi
On Thu, Jan 7, 2010 at 3:13 AM, SivaKumarl sivakum...@naradaproducts.comwrote:


 Hi Friends,
  I have deployed axis2 webservices using https protocol, my
 problem is server unable to recognise https request but it is working fine
 in localsystem and also working with HTTP protocol.


Normally https is handled at the application  server level. see whether you
talk to the correct port
and application server configured correctly.

thanks,
Amila.


 kindly help if any
 configuration needs in server and client to enable HTTPS protocol.


 Thanks in Advance
 
 Siva
 --
 View this message in context:
 http://old.nabble.com/Handling-https-request-in-server-side-tp27026970p27026970.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] making minOccurs=1 by default for wsdl generated with POJO

2010-01-05 Thread Amila Suriarachchi
On Tue, Jan 5, 2010 at 12:06 PM, Dennis Sosnoski d...@sosnoski.com wrote:

 Hi Amila,

 It's definitely best to use minOccurs=1 for primitives. nillable=true is
 *not* a good choice in general, and I'd recommend you instead go with
 minOccurs=0 for object types.

 Why is nillable=true bad? 1. It requires the element to still be present in
 the message, adding unnecessary bloat (including the xsi namespace
 definition and usage) and confusion for human viewers of the message. 2. If
 required attributes are defined for the element (not an issue for POJO
 deployment, since it doesn't use attributes, but applicable in terms of the
 general use of nillable=true) those attributes need to be present even with
 xsi:nil=true in the document. minOccurs=0 is a cleaner representation of
 optional values.


if we use minOccurs=0 instead of nillable=true does that fix the issue given
here[1]. Currently POJO gives preference to nillable=true when returning
null objects.

thanks,
Amila.

[1] https://issues.apache.org/jira/browse/AXIS2-3300


  - Dennis

 --
 Dennis M. Sosnoski
 Java XML and Web Services
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117




 Amila Suriarachchi wrote:

 this is related to issue[1]

 I think it is better to make minOccurs=1 considering the following points
 and the issue given here[1].

 1. if the type is a primitive type then anyway it get assigned a value and
 hence nillable=true and minOccurs=0 can not be supported.
 2. if not primitive always minOccurs=0 and nillable=true maps to null
 value. hence nillable=true is enough.

 WDYT?

 [1] https://issues.apache.org/jira/browse/AXIS2-3300

 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/





-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] making minOccurs=1 by default for wsdl generated with POJO

2010-01-05 Thread Amila Suriarachchi
On Tue, Jan 5, 2010 at 8:26 PM, Mauro Molinari
mauro.molin...@cardinis.comwrote:

 Mauro Molinari ha scritto:

  Please note that all my trials and researches were carried out on .NET 1.1
 and .NET 2.0 interoperability. I don't have details on the behaviours of 3.x
 .NET client generation tools. Maybe in the later versions all the issues
 have been solved (so that minOccurs=0 could actually be used with no harm),
 but there are many .NET 1.1/2.0 users still out there.


 Well, I should be more clear here. As I wrote in the issue:

 https://issues.apache.org/jira/browse/AXIS2-3300
 using nillable=true is actually the safest way to go if we talk about .NET
 = 2.0.
 In .NET 1.x, the client generation tools simply ignore nillable=true
 attribute, so minOccurs=0 would be in some way better (if we talk about
 operation input parameters, although the doubled-parameters issue) or worse
 (if we talk about output parameters, i.e.: the void return type problem).

 In the JIRA issue I explained what would be the best solution in my
 opinion, but Amila does not like the idea to have a compatibility flag
 just for .NET 1.x, so as a compromise he proposed the use of nillable=true
 at least to avoid the void return type bug and the doubled-parameter
 aesthetic issue.

 In this sense, the nillable=true seems to be the least problematic
 solution, given that .NET 1.x support would still be excluded.


ok then lets make minOccurs = 1 by default. As Sosnoski has said it is the
the best solution. but that make everyone life easier.

thanks,
Amila.



 --
 Mauro Molinari
 Software Designer  Developer
 E-mail: mauro.molin...@cardinis.com




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: wsdl:types are blank in generated WSDL with axis2

2010-01-04 Thread Amila Suriarachchi
On Wed, Dec 23, 2009 at 1:24 AM, Soumyajit Paul soumyajit...@yahoo.co.inwrote:

 Hi,
I am using TOMCAT 6.0.20 with axis2 1.5. After deploying the service
 with simple HelloWorld class like this

 *

 public
 * *class* HelloWorld {

 *public* String sayHello(String name){

 *return* Hello +name;

 }
 }

 and with Services.xml like this


 
 service

 description

 This is my first service, which says hello

 /description

 parameter name=HelloWorldServicecom.fujitsu.test.HelloWorld/parameter
 


this parameter should be ServiceClass try this.

parameter name=ServiceClasscom.fujitsu.test.HelloWorld/parameter

thanks,
Amila.

 operation name=sayHello

 messageReceiver mep=http://www.w3.org/ns/wsdl/in-out;

 class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/

 /operation

 /
 service

 I am getting the generated wsdl like the following after deploying 
 HelloWorldService.aar
 file in  /webapps/axis2/services

 ?xml version=1.0 encoding=UTF-8 ?
  *-* http://localhost:8080/axis2/services/HelloWorldService?wsdl# 
 wsdl:definitions xmlns:wsdl=*http://schemas.xmlsoap.org/wsdl/*xmlns:axis2
 =*http://ws.apache.org/axis2*; xmlns:soap12=*
 http://schemas.xmlsoap.org/wsdl/soap12/*; xmlns:http=*
 http://schemas.xmlsoap.org/wsdl/http/*; xmlns:mime=*
 http://schemas.xmlsoap.org/wsdl/mime/*; xmlns:wsaw=*
 http://www.w3.org/2006/05/addressing/wsdl*; xmlns:soap=*
 http://schemas.xmlsoap.org/wsdl/soap/*; targetNamespace=*
 http://ws.apache.org/axis2*;
  * * wsdl:types /
  * * wsdl:message name=*sayHelloRequest* /
  * * wsdl:message name=*sayHelloResponse* /
  *-* http://localhost:8080/axis2/services/HelloWorldService?wsdl# 
 wsdl:portType name=*HelloWorldServicePortType*
  *-* http://localhost:8080/axis2/services/HelloWorldService?wsdl# 
 wsdl:operation name=*sayHello*
  * * wsdl:input message=*axis2:sayHelloRequest* wsaw:Action=*
 urn:sayHello* /
  * * wsdl:output message=*axis2:sayHelloResponse* wsaw:Action=*
 urn:sayHelloResponse* /
 * * /wsdl:operation
 * * /wsdl:portType

 Please note that wsdl:type is blank.

 Accordingly it generates incorrect client stub class. Please confirm.

 Thanks
 Soumyajit

 --
 The INTERNET now has a personality. YOURS! See your Yahoo! 
 Homepagehttp://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/
 .




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


[Axis2] making minOccurs=1 by default for wsdl generated with POJO

2010-01-04 Thread Amila Suriarachchi
this is related to issue[1]

I think it is better to make minOccurs=1 considering the following points
and the issue given here[1].

1. if the type is a primitive type then anyway it get assigned a value and
hence nillable=true and minOccurs=0 can not be supported.
2. if not primitive always minOccurs=0 and nillable=true maps to null value.
hence nillable=true is enough.

WDYT?

[1] https://issues.apache.org/jira/browse/AXIS2-3300

-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Problem Invoking the Webservice hosted on Local Machine

2009-12-30 Thread Amila Suriarachchi
 from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Implementing Stomp transport for Axis2

2009-12-25 Thread Amila Suriarachchi
On Fri, Dec 25, 2009 at 11:14 PM, Dunith Dhanushka duni...@gmail.comwrote:

 Hi folks,

 Many thanks in advance for your feedback Dr. Sanjiva.

 This is regarding the *StompMessageReceiver. *Actually this not a kind of
 any ordinary *MessageReceivers* in the Axis2 core ( unlike
 RawXMLINOnlyMessageReceiver and  RPCMessageReceiver). StompMessageReceiver
 is a listener or a thread that is waiting for a incoming Stomp packet from
 the broker. I'll rename it as *StompPacketListener*.

 In order to facilitate multiple brokers, there can be several
 StompPacketListener instances and they all share a same worker thread pool
 which is initialized by the StompListener. When a packet is arrived from a
 particular broker, it will be dispatched by the appropriate *
 StompPacketListener*.

 I delegated the message formatting and building responsibility to the *
 StompPacketListener* so that I could eliminate the need of a message
 formatter and builder.

 For a understanding about this transport, I published a blog post
 illustrating the component architecture. You can visit there using 
 thishttp://wp.me/p9Njt-1plink.

 Currently, I've finished coding the transport and running tests on it. I
 like to contribute my code into Axis2 code base. But I have no idea about
 how to do it and what are the procedures I should follow.


Axis2 transports are actually at the commons transport[1] project. you can
create your transport as another
module and attach the code as a patch for here[2].

thanks,
Amila.

[1] http://ws.apache.org/commons/transport/
[2] https://issues.apache.org/jira/browse/WSCOMMONS




 I appreciate your feedback on this.

 Regards,
 Dunith Dhanuhska








-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r818290 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: context/ConfigurationContext.java engine/ListenerManager.java

2009-12-22 Thread Amila Suriarachchi
 and services shutdown.);
 +}
 }

 Why the service and module shutdown at the else part?
 Why it should not be done if a listener manager exists?

 thanks,
 Amila.


 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: 
 *http://amilachinthaka.blogspot.com/*http://amilachinthaka.blogspot.com/




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r818290 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: context/ConfigurationContext.java engine/ListenerManager.java

2009-12-14 Thread Amila Suriarachchi
On Thu, Sep 24, 2009 at 3:58 AM, ntha...@apache.org wrote:

 Author: nthaker
 Date: Wed Sep 23 22:28:27 2009
 New Revision: 818290

 URL: http://svn.apache.org/viewvc?rev=818290view=rev
 Log:
 AXIS2-4507

 Modified:

  
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java

  
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/ListenerManager.java

 Modified:
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 URL:
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?rev=818290r1=818289r2=818290view=diff

 ==
 ---
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 (original)
 +++
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 Wed Sep 23 22:28:27 2009
 @@ -27,14 +27,17 @@
  import org.apache.axis2.clustering.ClusteringConstants;
  import org.apache.axis2.clustering.management.NodeManager;
  import org.apache.axis2.clustering.state.StateManager;
 +import org.apache.axis2.description.AxisModule;
  import org.apache.axis2.description.AxisService;
  import org.apache.axis2.description.AxisServiceGroup;
  import org.apache.axis2.description.Parameter;
  import org.apache.axis2.engine.AxisConfiguration;
  import org.apache.axis2.engine.DependencyManager;
  import org.apache.axis2.engine.ListenerManager;
 +import org.apache.axis2.engine.ServiceLifeCycle;
  import org.apache.axis2.i18n.Messages;
  import org.apache.axis2.java.security.AccessController;
 +import org.apache.axis2.modules.Module;
  import org.apache.axis2.util.JavaUtils;
  import org.apache.axis2.util.threadpool.ThreadFactory;
  import org.apache.axis2.util.threadpool.ThreadPool;
 @@ -85,7 +88,8 @@

 private String cachedServicePath = null;
 protected ListContextListener contextListeners;
 -
 +private boolean stopped = false;
 +
 /**
  * Constructor
  *
 @@ -727,7 +731,43 @@
 serviceGroupContextMap.clear();
 }
 }
 -
 +/**
 + * Called during shutdown to clean up all Contexts
 + */
 +public void shutdownModulesAndServices() throws AxisFault{
 +if(stopped){
 +return;
 +}
 +/*Shut down the modules*/
 +if(log.isDebugEnabled()){
 +log.debug(Invoke modules shutdown.);
 +}
 +HashMap modules = axisConfiguration.getModules();
 +if (modules != null) {
 +Iterator moduleitr = modules.values().iterator();
 +while (moduleitr.hasNext()) {
 +AxisModule axisModule = (AxisModule) moduleitr.next();
 +Module module = axisModule.getModule();
 +if (module != null) {
 +module.shutdown(this);
 +}
 +}
 +}
 +cleanupContexts();
 +/*Shut down the services*/
 +if(log.isDebugEnabled()){
 +log.debug(Invoke services shutdown.);
 +}
 +for (Iterator services =
 axisConfiguration.getServices().values().iterator();
 +services.hasNext();) {
 +AxisService axisService = (AxisService) services.next();
 +ServiceLifeCycle serviceLifeCycle =
 axisService.getServiceLifeCycle();
 +if (serviceLifeCycle != null) {
 +serviceLifeCycle.shutDown(this, axisService);
 +}
 +}
 +stopped = true;
 +}
 /**
  * Invoked during shutdown to stop the ListenerManager and perform
 configuration cleanup
  *
 @@ -736,6 +776,14 @@
 public void terminate() throws AxisFault {
 if (listenerManager != null) {
 listenerManager.stop();
 +}else{
 +if(log.isDebugEnabled()){
 +log.debug(Start Invoke modules and services shutdown.);
 +}
 +shutdownModulesAndServices();
 +if(log.isDebugEnabled()){
 +log.debug(End Invoke modules and services shutdown.);
 +}
 }


Why the service and module shutdown at the else part?
Why it should not be done if a listener manager exists?

thanks,
Amila.


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [VOTE] Release Axis2 Transports 1.0.0

2009-12-14 Thread Amila Suriarachchi
+1

Amila.

On Mon, Dec 14, 2009 at 7:18 PM, Afkham Azeez afk...@gmail.com wrote:

 +1

 Azeez

 On Mon, Dec 14, 2009 at 10:27 AM, Ruwan Linton ruwan.lin...@gmail.comwrote:

 Folks,

 This is a call for votes to release Axis2 Transports 1.0.0

 Please review the signed
 artifacts:http://people.apache.org/%7Eruwan/synapse/1.2/dist/
 http://people.apache.org/~ruwan/transports-1.0.0/artifacts/http://people.apache.org/%7Eruwan/transports-1.0.0/artifacts/

 The m2 repository is available at:
 http://people.apache.org/~ruwan/transports-1.0.0/m2_repo/http://people.apache.org/%7Eruwan/transports-1.0.0/m2_repo/

 The transports site is temporarily hosted ar:
 http://people.apache.org/~ruwan/transports-1.0.0/site/http://people.apache.org/%7Eruwan/transports-1.0.0/site/

 SVN Info:
 Revision: 890178 on 
 https://svn.apache.org/repos/asf/synapse/branches/1.2

 https://svn.apache.org/repos/asf/webservices/commons/branches/modules/transport/1.0.0

 Here's my +1 to declaring the above dist as Axis2 Transports 1.0.0

 Thanks,
 Ruwan

 --
 Ruwan Linton
 Technical Lead  Product Manager; WSO2 ESB; http://wso2.org/esb
 WSO2 http://wso2.org/esbWSO2 Inc.; http://wso2.org
 email: ru...@wso2.com; cell: +94 77 341 3097
 blog: http://ruwansblog.blogspot.com




 --
 Thanks
 Afkham Azeez

 Blog: http://afkham.org
 Developer Portal: http://www.wso2.org
 WSAS Blog: http://wso2wsas.blogspot.com
 Company: http://wso2.com
 GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: SimpleTypeMapper xs:date convertion bug

2009-12-14 Thread Amila Suriarachchi
this is fixed already.

thanks,
Amila.

[1]
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?r1=783787r2=835823

2009/12/14 Dinçer Karaduman dincer.karadu...@hititcs.com

  Hi All,

 I think there is a bug in org\apache\axis2\databinding\typemapping.java in
 Axis2 1.5

 public static Object makeDate(String source) {
 return ConverterUtil.convertToDateTime(source).getTime();
 }

 this code requires convertToDateTime validation and raises an number format
 exception for 12.12.1987 for example.

 i think makeDate should be like

 public static Object makeDate(String source) {
 return ConverterUtil.convertToDate(source);
 }

 Am i right or is there anything i could not see?

 --

 *Dinçer Karaduman*

 *Analyst Programmer*
 *Hitit Bilgisayar Hizmetleri*
 Tel : 212 276 15 00 Ext. 124
 Fax: 212 276 15 17
 www.hititcs.com



 *Kişiye özel bu mesaj ve içeriğindeki bilgiler gizlidir. Hitit Bilgisayar
 Hizmetleri bu mesajın içeriği ve ekleri ile ilgili olarak hukuksal hiçbir
 sorumluluk kabul etmez. Yetkili alıcılardan biri değilseniz, bu mesajın
 herhangi bir şekilde ifşa edilmesi, kullanılması, kopyalanması, yayılması
 veya mesajda yeralan hususlarla ilgili olarak herhangi bir işlem
 yapılmasının kesinlikle yasak olduğunu bildiririz. Böyle bir durumda lütfen
 hemen mesajın göndericisini bilgilendiriniz ve mesajı sisteminizden siliniz.
 Internet ortamında gönderilen e-posta mesajlarındaki hata ve/veya
 eksikliklerden veya virüslerden dolayı mesajın göndericisi herhangi bir
 sorumluluk kabul etmemektedir. Teşekkür ederiz. *

 *The information contained in this communication may contain confidential
 or legally privileged information. Hitit Computer Services doesn't accept
 any legal responsibility for the contents and attachments of this message.
 If you are not the intended recipient you are hereby notified that any
 disclosure, use, copying, distribution or taking any action in reliance on
 the contents of this information is strictly prohibited. If you have
 received this communication in error, please notify the sender immediately
 by responding to this e-mail and then delete it from your system. The sender
 does not accept any liability for any errors or omissions or any viruses in
 the context of this message which arise as a result of internet
 transmission. Thank you. *






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Problems formatting SOAP header

2009-11-23 Thread Amila Suriarachchi
On Tue, Nov 24, 2009 at 2:56 AM, alandavidoff david...@real.com wrote:


 I am using Axis 1.4 to connect to web services provided by ClickTime, an
 outside vendor.   Their underlying technology is Microsoft .net and it is
 very picky about the format of the request.  It expects a SOAP header in
 this format:

 soapenv:HeaderCredentialsSoapHeader xsi:type=WebServiceKeyCredentials
 soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next;
 soapenv:mustUnderstand=0
 xmlns=http://clicktime.com/webservices/2.2/;ns1:Key
 xmlns:ns1=http://clicktime.com/webservices/2.2/
 xxx/ns1:Keyns2:Password
 xmlns:ns2=http://clicktime.com/webservices/2.2/
 yyy/ns2:Password/CredentialsSoapHeader/soapenv:Header

 The key issues are that the xsi:type must have the xsi: prefix and the
 xmlns=http://clicktime.com/webservices/2.2/; must not have a prefix.
  I've
 worked with Clicktime and confirmed with manually created requests that the
 request will fail if either of these is different.

 I am having difficulty getting Axis to generate a header that it will
 accept.

 Here is the simple code I am using to try to establish a connection.

  public void getinfo () throws Exception {
DataExchangeSoapStub ctBinding = (DataExchangeSoapStub) new
 DataExchangeLocator().getDataExchangeSoap();

// set credentials element in SOAP header
WebServiceKeyCredentials wskey = new
 WebServiceKeyCredentials(xxx,yyy);
String ctURI = new
 DataExchangeLocator().getServiceName().getNamespaceURI();
SOAPHeaderElement she = new SOAPHeaderElement(,
 CredentialsSoapHeader, wskey);

QName qn = new
 QName(Constants.URI_2001_SCHEMA_XSI,type,Constants.NS_PREFIX_SCHEMA_XSI);
PrefixedQName tn = new PrefixedQName(qn);
she.addAttribute(tn,WebServiceKeyCredentials);

ctBinding.setHeader(she);

String userid =  ctBinding.getUserID(c...@real.com);
return;
  }

 This generates the following request.

 ?xml version=1.0 encoding=UTF-8?soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:HeaderCredentialsSoapHeader type=WebServiceKeyCredentials
 soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next;
 soapenv:mustUnderstand=0ns1:Key
 xmlns:ns1=http://clicktime.com/webservices/2.2/
 xxx/ns1:Keyns2:Password
 xmlns:ns2=http://clicktime.com/webservices/2.2/
 yyy/ns2:Password/CredentialsSoapHeader/soapenv:Headersoapenv:BodyGetUserID
 xmlns=http://clicktime.com/webservices/2.2/;EmailAddressc...@real.com
 /EmailAddress/GetUserID/soapenv:Body/soapenv:Envelope

 If I change the creation of the SOAP header to this

SOAPHeaderElement she = new SOAPHeaderElement(ctURI,
 CredentialsSoapHeader, wskey);

 then I get this request.

 ?xml version=1.0 encoding=UTF-8?soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
 soapenv:Headerns1:CredentialsSoapHeader
 type=WebServiceKeyCredentials


I think the problem here is that type attribute is not belong to
http://www.w3.org/2001/XMLSchema-instance namespace. have a look at with
Axis2.

thanks,
Amila.


 soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next;
 soapenv:mustUnderstand=0
 xmlns:ns1=http://clicktime.com/webservices/2.2/
 ns1:Keyxxx/ns1:Keyns1:Passwordyyy/ns1:Password/ns1:CredentialsSoapHeader/soapenv:Headersoapenv:BodyGetUserID
 xmlns=http://clicktime.com/webservices/2.2/;EmailAddressc...@real.com
 /EmailAddress/GetUserID/soapenv:Body/soapenv:Envelope

 Any ideas on how to get this request formatted in the required form?  Will
 Axis2 work better?
 --
 View this message in context:
 http://old.nabble.com/Problems-formatting-SOAP-header-tp26485922p26485922.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] release process

2009-11-13 Thread Amila Suriarachchi
On Wed, Nov 4, 2009 at 1:05 PM, Michail Prusakov
michail.prusa...@jmsys.ltwrote:

 Hello Keith,

 Thank you for your answer. Could Amila also take a look at this bug:
 https://issues.apache.org/jira/browse/AXIS2-4544.


fixed the issue thanks for info.

Amila.


 He has posted in his blog (
 http://amilachinthaka.blogspot.com/2009/09/handling-date-and-datetime-with-axis2.html)
 that the java.util.Date interpretation has changed and apparently is not
 working properly at the moment. I've posted a fix, which solves the problem.

 Regards,
 Mike



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r835262 - in /webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2: context/ConfigurationContext.java dispatchers/AddressingBasedDispatcher.java

2009-11-13 Thread Amila Suriarachchi
revert the change sorry for the mistake.

thanks,
Amila.

On Fri, Nov 13, 2009 at 6:19 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 Amila,

 You are committing to the 1.5 tag! Please revert and apply the change
 to the right place.

 Andreas

 On Thu, Nov 12, 2009 at 07:49,  ami...@apache.org wrote:
  Author: amilas
  Date: Thu Nov 12 06:49:47 2009
  New Revision: 835262
 
  URL: http://svn.apache.org/viewvc?rev=835262view=rev
  Log:
  set the axis message for addressing based dispatcher and destroy the
 listner manager when terminating configuration context
 
  Modified:
 
  
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 
  
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/dispatchers/AddressingBasedDispatcher.java
 
  Modified:
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
  URL:
 http://svn.apache.org/viewvc/webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?rev=835262r1=835261r2=835262view=diff
 
 ==
  ---
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 (original)
  +++
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 Thu Nov 12 06:49:47 2009
  @@ -740,7 +740,7 @@
   */
  public void terminate() throws AxisFault {
  if (listenerManager != null) {
  -listenerManager.stop();
  +listenerManager.destroy();
  }
  axisConfiguration.cleanup();
  cleanupTemp();
 
  Modified:
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/dispatchers/AddressingBasedDispatcher.java
  URL:
 http://svn.apache.org/viewvc/webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/dispatchers/AddressingBasedDispatcher.java?rev=835262r1=835261r2=835262view=diff
 
 ==
  ---
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/dispatchers/AddressingBasedDispatcher.java
 (original)
  +++
 webservices/axis2/tags/java/v1.5/modules/kernel/src/org/apache/axis2/dispatchers/AddressingBasedDispatcher.java
 Thu Nov 12 06:49:47 2009
  @@ -20,6 +20,7 @@
   package org.apache.axis2.dispatchers;
 
   import org.apache.axis2.AxisFault;
  +import org.apache.axis2.wsdl.WSDLConstants;
   import org.apache.axis2.addressing.AddressingConstants;
   import org.apache.axis2.addressing.AddressingFaultsHelper;
   import org.apache.axis2.context.MessageContext;
  @@ -91,6 +92,8 @@
   //throw new
 AxisFault(Messages.getMessage(duplicaterelatesto,relatesTo));
   //}
 
 msgctx.setAxisOperation(operationContext.getAxisOperation());
  +
  msgctx.setAxisMessage(operationContext.getAxisOperation().getMessage(
  +
  WSDLConstants.MESSAGE_LABEL_IN_VALUE));
  msgctx.setOperationContext(operationContext);
  msgctx.setServiceContext((ServiceContext)
 operationContext.getParent());
  msgctx.setAxisService(
 
 
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: axis2 security bug?

2009-10-21 Thread Amila Suriarachchi
/ax23:apellidoMaternoax23:apellidoPaternoSAENZ/ax23:apellidoPaternoax23:direccion
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true
 /ax23:documentoIdentidad xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true
 /ax23:fechaAdmision xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:nil=true
 /ax23:fechaNacimiento1957-08-16T05:00:00.000Z/ax23:fechaNacimientoax23:identificador12/ax23:identificadorax23:nombresCARMEN
 ROSA/ax23:nombresax23:sexoF/ax23:sexoax23:telefono xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true
 /ax23:ubigeoNacimiento xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true
 /ax23:ubigeoResidencia xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true
 //ns:return/ns:getPatientDetailsResponse/soapenv:Body/soapenv:Envelope
 0


 Auchh, without user authentication neither SSL transport :S

 --
 Jaime Hablutzel

 (tildes omitidas intencionalmente) 9 8964 0369




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [VOTE] Axis2 1.5.1 - final vote (I hope :) )

2009-10-21 Thread Amila Suriarachchi
+1


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [VOTE] [axis2] Release Axis2 1.5.1 (take 2)

2009-10-07 Thread Amila Suriarachchi
+1, for release. lets finish with 1.5  :)

Regarding your change,
I think same thing can be done with the existing code in the trunk or
earlier code in the branch by setting a following properties.

MultiThreadedHttpConnectionManager multiThreadedHttpConnectionManager = new
MultiThreadedHttpConnectionManager();
HttpClient httpClient = new
HttpClient(multiThreadedHttpConnectionManager);


configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Constants.VALUE_TRUE);

configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);

With your change since only one Connection Manager have to use anyway,
Then effective number of parallel connections is 2.  Other threads can not
use the connection
manager until one thread release it calling
serviceClient.cleanupTransport(); (even for the dual channel case it has to
wait until 202 accepted returns)

Since anyway users can achieve this using the above method, IMHO this change
is unnecessary. So please have a proper discussion if you intended to do
this change to trunk.

thanks,
Amila.

On Wed, Oct 7, 2009 at 7:10 PM, Deepal jayasinghe deep...@gmail.com wrote

 +1 for the release.

 Thanks
 Deepal
  Hi Axis Developers,
 
  After fixing the documentation and a few other small issues since the
 last
  attempt at 1.5.1, I think we're ready to try again.  I've also addressed
 the
  forced build of Axiom issue with the CLOSE_WAIT fix - we now by default
  clean up the last operation context each time we build a new one inside
  ServiceClient.
 
  While there may still be a few things we need to address (still waiting
 for
  transports / Rampart / Sandesha for instance), I think it's important to
 get
  this out ASAP since there were clearly some serious issues with 1.5 -
  including the failed JavaDoc build and the persistent CLOSE_WAIT issues
 that
  are fixed in 1.5.1.
 
  As a reminder, fixes include:
 
  *  Fix for the dreaded CLOSE_WAIT problem (JIRA issues 935, 2883,
 etc).
  We now share an instance of HTTPClient across each ConfigurationContext
 (i.e.
  each Axis2 server or ServiceClient) - connection reuse is now automatic.
 This
  means the REUSE_HTTP_CLIENT flag is no longer necessary or useful, nor is
  creating your own MultithreadedHttpConnectionManager.
  * Transport deployer is now actually functional, and
 getListenerManager()
  in ConfigurationContext now creates a new LM if there isn't one already.
  * Fix for AXIS2-4034, module versions now support real versions like
 1.5.1
  * NPE problem (see AXIS2-4114) fixed in MessageContext while
 retrieving
  policy.
  * Fix for JavaDoc build problem.
 
  I'd like to kick off a VOTE for the release, with the usual 72-hour
 window
  for votes.
 
  You can find the distribution files in here:
 
 
 http://people.apache.org/~gdaniels/stagingRepo/org/apache/axis2/distribution/1.5.1/http://people.apache.org/%7Egdaniels/stagingRepo/org/apache/axis2/distribution/1.5.1/
 
  And the M2 repository with everything is at:
 
  http://people.apache.org/~gdaniels/stagingRepohttp://people.apache.org/%7Egdaniels/stagingRepo
 
  The SVN tag is:
 
  https://svn.apache.org/repos/asf/webservices/axis2/tags/java/v1.5.1RC2
 
  ...and I'll add a proper v1.5.1 tag as soon as this release goes final.
 
  Please offer your VOTE (and indicate binding/non-binding).
 
  Here's my +1 (binding).
 
  Many thanks,
  --Glen
 
 
 


 --
 Thank you!


 http://blogs.deepal.org
 http://deepal.org




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [jira] Commented: (AXIS2-4334) Cannot turn off stdout messages when using WSDL 2.0

2009-10-07 Thread Amila Suriarachchi
 
  Blog - http://ssagara.blogspot.com
  Web - http://people.apache.org/~sagara/http://people.apache.org/%7Esagara/
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Axis2 war deployment does not work in the current trunk

2009-10-04 Thread Amila Suriarachchi
On Mon, Oct 5, 2009 at 8:44 AM, Deepal jayasinghe deep...@gmail.com wrote:

 Hi Devs;

 I build the war from the trunk and try to deploy that, everything works
 fine. However when I try to list the services it gave me the following
 error. I think  this has something to do with the changes that Andreas
 did.


No this from the later change I did. Now it is fixed in the trunk.

For this fix we need to shift a separate axis2.xml
for web app with the new transports. Will do that as well.

thanks,
Amila.



 javax.servlet.ServletException: http is forbidden
at

 org.apache.axis2.transport.http.AxisServlet.preprocessRequest(AxisServlet.java:628)
at
 org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:246)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)


 As I can see this is a big issues (unless I have something done wrong).

 I just went though the source code and found few issues with that, so we
 need to fix those;  Following code in AxisServlet is not correct.


httpListener = getAxisServletListener(Constants.TRANSPORT_HTTP);
httpsListener =
 getAxisServletListener(Constants.TRANSPORT_HTTPS);

if (httpListener == null  httpsListener == null) {
log.warn(No transportReceiver for  +
 AxisServletListener.class.getName() +
 found. An instance for HTTP will be configured
 automatically.  +
Please update your axis2.xml file!);
httpListener = new AxisServletListener();
TransportInDescription transportInDescription = new
 TransportInDescription(
Constants.TRANSPORT_HTTP);
transportInDescription.setReceiver(httpListener);
axisConfiguration.addTransportIn(transportInDescription);
} else if (httpListener != null  httpsListener != null
 httpListener.getPort() == -1 
 httpsListener.getPort() == -1) {
log.warn(If more than one transportReceiver for  +
AxisServletListener.class.getName() +  exists,
 then all instances  +
must be configured with a port number. WSDL
 generation will be  +
unreliable.);
}


 Why do we need to call the following method for each request ?

 private void preprocessRequest(HttpServletRequest req) throws
 ServletException {
initContextRoot(req);

TransportInDescription transportInDescription =
req.isSecure()?
 this.axisConfiguration.getTransportIn(Constants.TRANSPORT_HTTP) :

 this.axisConfiguration.getTransportIn(Constants.TRANSPORT_HTTPS);

if (transportInDescription == null){
throw new ServletException(req.getScheme() +  is forbidden);
} else {
if (transportInDescription.getReceiver() instanceof
 AxisServletListener){
AxisServletListener listner = (AxisServletListener)
 transportInDescription.getReceiver();
// Autodetect the port number if necessary
if (listner.getPort() == -1){
listner.setPort(req.getServerPort());
}
}
}

}


 As I can see something is really broken, please fix it (or else I might
 have to revert to the original AxisServlet code).

 Thanks,
 Deepal




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r759488 - in /webservices/axis2/trunk/java/modules: jaxws-integration/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java parent/pom.xml saaj/pom.xml

2009-09-20 Thread Amila Suriarachchi
On Sat, Sep 19, 2009 at 4:43 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 The situation in Axis2 trunk is now as follows:
 - I added an integration test for code generation from WSDL 2.0. This
 tests indeed fails (with the current Woden 1.0-SNAPSHOT available from
 the snapshot repository) if xercesImpl is not available.
 - The dependencies are such that xercesImpl only comes in as a
 transitive dependency of woden-impl-dom.
 - There is a comment in the dependencyManagement entry for
 woden-impl-dom that refers to WODEN-152.


is this means I can pass all the tests if I build a woden SNAPSHOT locally
in may machine?

if so lets go with this change. But for next Axis2 release we need to add a
statement to release note
about this change.

thanks,
Amila.


 Andreas

 On Fri, Sep 18, 2009 at 23:04, Andreas Veithen
 andreas.veit...@gmail.com wrote:
  Interesting. It looks like we don't have test cases for WSDL 2.0. We
  have a couple of WSDL 2.0 files in
  modules/integration/test-resources/wsdl20, but they are never used
  during the tests...
 
  Andreas
 
  On Fri, Sep 18, 2009 at 22:12, Sagara Gunathunga
  sagara.gunathu...@gmail.com wrote:
  Hi Folks,
 
  I think Axis2 use Woden as a dependency. At the moment  current Woden
  1.0-SNAPSHOTs available on  [1] depends on xercesImpl  and
  xmlParserAPI ,because some classes directly call DomParser . So i
  guess  this will make run time issues for Axis2  WSDL 2.0  features,
  but the good news is recently i have ported Woden code based to use
  JAXP 1.2 [2] , still i need little time to port few test cases after
  that i will remove Xerces  dependencies from woden too.
 
 
  [1] -
 http://people.apache.org/maven-snapshot-repository/org/apache/woden/woden/1.0-SNAPSHOT/
 
  [2] - https://issues.apache.org/jira/browse/WODEN-152
 
  Thanks ,
 
 
  On Sat, Sep 19, 2009 at 12:19 AM, Andreas Veithen
  andreas.veit...@gmail.com wrote:
  I fixed the dependencies of axis2-jaxws, and as a side effect,
  xercesImpl is no longer packaged in the distribution. If somebody
  comes up with evidence that there is an issue with this, then we
  should add it back as an explicit dependency of the module that really
  depends on it.
 
  Andreas
 
  On Fri, Sep 18, 2009 at 15:00, Deepal jayasinghe deep...@gmail.com
 wrote:
  Amila and Andreas,
 
  I think Andreas's argument is valid so let's go with this changes. I
  also like to remove all the unwanted dependencies, because it is so
 hard
  to set up the project (w.o using maven), and we have so many
 dependencies.
 
  Thanks,
  Deepal
  Since Axis2 1.5 depends on Java 1.5, there is no need to include
  xercesImpl anymore and it works fine without it. Xerces still got
  packaged into Axis2 1.5 because of an incorrect dependency in
  axis2-jaxws: this module has a direct dependency on jaxen (which in
  turn depends on xercesImpl), while it doesn't use Jaxen. This also
  causes axis2-jaxws to have a transitive dependency on jdom, dom4j,
 XOM
  and some other unnecessary stuff. If we fix the dependencies of
  axis2-jaxws, xercesImpl will no longer be included in the dist and
 the
  users can add the version they want if they have a specific need for
  this.
 
  Note that up to now, there is no evidence that the xercesImpl version
  causes any issues. The post by Wim Goossens probably means that in
 his
  own code, he is using some feature that only exists in recent Xerces
  versions. Unfortunately he didn't reply to my request to provide
  additional information.
 
  Andreas
 
  On Fri, Sep 18, 2009 at 12:14, Amila Suriarachchi
  amilasuriarach...@gmail.com wrote:
 
  hi Andreas,
 
  was there any discussion on dev list regarding this change?
  was there any problem with the XercesImpl-2.8.1.jar?
  would there be any advantage if this fixed worked correctly?
 
  I think if we don't have clear answer for latter two cases better to
 revert
  this change since this seems to be causing problems for some people.
 
  thanks,
  Amila.
 
  On Sat, Mar 28, 2009 at 9:21 PM, veit...@apache.org wrote:
 
  Author: veithens
  Date: Sat Mar 28 15:51:08 2009
  New Revision: 759488
 
  URL: http://svn.apache.org/viewvc?rev=759488view=rev
  Log:
  Removed dependencies on xml-apis and xercesImpl since the target
 platform
  is now Java 5.
 
  Modified:
 
 
  
 webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java
 webservices/axis2/trunk/java/modules/parent/pom.xml
 webservices/axis2/trunk/java/modules/saaj/pom.xml
 
  Modified:
 
 webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java
  URL:
 
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java?rev=759488r1=759487r2=759488view=diff
 
 
 ==
  ---
 
 webservices/axis2/trunk/java/modules/jaxws

Re: Request for a Project

2009-09-20 Thread Amila Suriarachchi
On Sun, Sep 20, 2009 at 11:10 AM, ishara karunarathna isharaar...@gmail.com
 wrote:

 Dear sir,
 I'm a undergraduate student from University of Maoratywa, Sri Lanka. I'm
 studying my 3rd academic year (it is a 4year degree program on computer
 Science and Engineering ). in this academic year i have to join to an open
 source project and contribute to it for 12 weeks. I can choose any open
 source project based on my interest. My instructors will evaluate my work
 at
 the end.


 I like to join Axis2 project but I need some help to know how can I join to
 Axis 2 and what can I do.
 I'm  experienced in java language. So please  send me some help me with
 some
 starting points to start with.


As Andreas has told it depends on your interest. Here is a idea I had in my
mind.

With Axis2 1.5 Axis2 supports only jdk 1.5 or later where we have generics.
ADB code generation
which is written to support even jdk 1.4 uses arrays.
Therefore now we can replace array with lists with generics. However there
are a lot of code written using arrays and we don't won't to change the
existing ADBBeanTemplate-bean.xsl. So what you can do is to introduce a new
parameter to enable this feature.
When implementing you can create a new template using a copy of existing
ADBBeanTemplate-bean.xsl and include that template to ADBBeanTemplate.xsl if
user has specified the new parameter. Most importantly you need to write a
whole set of new tests cases which is there for older version.

This altimately improve some ADB performance as well since when parsing
request messaes we do some list to array conversions.

thanks,
Amila.




   Thank you.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Request for a Project

2009-09-20 Thread Amila Suriarachchi
On Sun, Sep 20, 2009 at 8:55 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 It really depends on your interests and the kind of contribution your
 instructor is expecting. One idea that comes to my mind is helping us
 optimizing the performance of Axis2. There are several reasons why
 this would be interesting to us:


hi Andreas,
Actually I had some investigations on Axis2 performance and possible ways to
improve them some times back.
please see my comments below.


 - There have been reports [1] that the performance of Axis2 1.5 is not
 as good as expected.

For this I asked him to test with ADB generated code but there was no reply.


When it comes to this kind of performance issue I think most of the problem
relates to the way Data binding framework work.
For an example ADB generated code directly get the underline stax parser to
build the java object and serialise the response directly to stream writer.
Therefore Axiom serilization deserilalization only relates to soap envelop
parsing. But if some intermidiate handler builds the soap envelop (eg
rampart) then it depends on the Axiom performance.

This direct serialization and deserialization happens for jaxbri and
xmlbeans as well.

But for the POJO it does not read from the underline stax parser and always
creates an intermediate Axiom object. And also it parses the whole bean
class structure using reflection for each and every request. So I think
these two factors contribute most for POJO inefficiency compared to
generated code.

I hadsome performance testing with a wsdl which has many types with a
request around 4kb
 As I remember

axis2-ADB performs better
then cxf-jaxbri performs slightly better than axis2-jaxbri
then axis2-xmlbeans

but I haven't done the jaxws (axis2, cxf) and POJO.

thanks,
Amila.


 - To my knowledge, we don't do systematic performance tests. On the
 other hand, performance is an important quality attribute for a Web
 service framework.
 - I did some profiling on Axiom (the XML object model used by Axis2)
 and there is definitely room for improvement.

 Depending on your available time, this could involve the following tasks:

 - Define a set of typical use cases for which we want to test/compare
 performance.
 - Define a test methodology and select appropriate tools.
 - Implement the use cases using Axis2 and some other SOAP stacks (CXF,
 JAX-WS reference implementation, etc.).
 - Measure the performance and compare the results obtained from
 different Axis2 versions and different SOAP stacks.
 - Investigate what changes (between different Axis2 versions) or
 architectural differences (between different SOAP stacks) can explain
 the observed results.
 - Investigate where and how Axis2 performance can be improved.

 Of course, for all these tasks, you would interact with the developer
 community to get the required input.

 Regards,

 Andreas

 [1] http://markmail.org/thread/vkxfbebh7opwo46d

 On Sun, Sep 20, 2009 at 07:40, ishara karunarathna
 isharaar...@gmail.com wrote:
  Dear sir,
  I'm a undergraduate student from University of Maoratywa, Sri Lanka. I'm
  studying my 3rd academic year (it is a 4year degree program on computer
  Science and Engineering ). in this academic year i have to join to an
 open
  source project and contribute to it for 12 weeks. I can choose any open
  source project based on my interest. My instructors will evaluate my work
 at
  the end.
 
  I like to join Axis2 project but I need some help to know how can I join
 to
  Axis 2 and what can I do.
  I'm  experienced in java language. So please  send me some help me with
 some
  starting points to start with.
Thank you.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r759488 - in /webservices/axis2/trunk/java/modules: jaxws-integration/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java parent/pom.xml saaj/pom.xml

2009-09-18 Thread Amila Suriarachchi
 groupIdorg.apache.ws.commons.axiom/groupId
 @@ -830,6 +839,10 @@
 groupIdorg.codehaus.woodstox/groupId
 artifactIdwstx-asl/artifactId
 /exclusion
 +exclusion
 +groupIdxerces/groupId
 +artifactIdxmlParserAPIs/artifactId
 +/exclusion
 /exclusions
 /dependency
 dependency
 @@ -841,6 +854,10 @@
 groupIdorg.codehaus.woodstox/groupId
 artifactIdwstx-asl/artifactId
 /exclusion
 +exclusion
 +groupIdxerces/groupId
 +artifactIdxmlParserAPIs/artifactId
 +/exclusion
 /exclusions
 /dependency
 dependency
 @@ -999,11 +1016,6 @@
 version${jalopy.version}/version
 /dependency
 dependency
 -groupIdxerces/groupId
 -artifactIdxercesImpl/artifactId
 -version${xerces.version}/version
 -/dependency
 -dependency
 groupIdorg.igniterealtime/groupId
 artifactIdsmack/artifactId
 version${smack.version}/version
 @@ -1072,10 +1084,6 @@
 artifactIdgeronimo-stax-api_1.0_spec/artifactId
 /dependency
 dependency
 -groupIdxerces/groupId
 -artifactIdxercesImpl/artifactId
 -/dependency
 -dependency
 groupIdorg.apache.httpcomponents/groupId
 artifactIdhttpcore/artifactId
 scopetest/scope

 Modified: webservices/axis2/trunk/java/modules/saaj/pom.xml
 URL:
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/pom.xml?rev=759488r1=759487r2=759488view=diff

 ==
 --- webservices/axis2/trunk/java/modules/saaj/pom.xml (original)
 +++ webservices/axis2/trunk/java/modules/saaj/pom.xml Sat Mar 28 15:51:08
 2009
 @@ -163,6 +163,8 @@
 skipfalse/skip
 forkModeonce/forkMode

 argLine-Djava.endorsed.dirs=${m2Repository}/org/apache/geronimo/specs/geronimo-saaj_1.3_spec/${geronimo.spec.saaj.version}//argLine
 +!-- This fixes an issue on Sun JDKs caused by the
 presence of jaxp-ri on the classpath --
 +
  
 argLine-Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration/argLine
 /configuration
 /plugin
 /plugins





-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r759488 - in /webservices/axis2/trunk/java/modules: jaxws-integration/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java parent/pom.xml saaj/pom.xml

2009-09-15 Thread Amila Suriarachchi
 +exclusion
 +groupIdxerces/groupId
 +artifactIdxmlParserAPIs/artifactId
 +/exclusion
 /exclusions
 /dependency
 dependency
 @@ -841,6 +854,10 @@
 groupIdorg.codehaus.woodstox/groupId
 artifactIdwstx-asl/artifactId
 /exclusion
 +exclusion
 +groupIdxerces/groupId
 +artifactIdxmlParserAPIs/artifactId
 +/exclusion
 /exclusions
 /dependency
 dependency
 @@ -999,11 +1016,6 @@
 version${jalopy.version}/version
 /dependency
 dependency
 -groupIdxerces/groupId
 -artifactIdxercesImpl/artifactId
 -version${xerces.version}/version
 -/dependency
 -dependency
 groupIdorg.igniterealtime/groupId
 artifactIdsmack/artifactId
 version${smack.version}/version
 @@ -1072,10 +1084,6 @@
 artifactIdgeronimo-stax-api_1.0_spec/artifactId
 /dependency
 dependency
 -groupIdxerces/groupId
 -artifactIdxercesImpl/artifactId
 -/dependency
 -dependency
 groupIdorg.apache.httpcomponents/groupId
 artifactIdhttpcore/artifactId
 scopetest/scope

 Modified: webservices/axis2/trunk/java/modules/saaj/pom.xml
 URL:
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/pom.xml?rev=759488r1=759487r2=759488view=diff

 ==
 --- webservices/axis2/trunk/java/modules/saaj/pom.xml (original)
 +++ webservices/axis2/trunk/java/modules/saaj/pom.xml Sat Mar 28 15:51:08
 2009
 @@ -163,6 +163,8 @@
 skipfalse/skip
 forkModeonce/forkMode

 argLine-Djava.endorsed.dirs=${m2Repository}/org/apache/geronimo/specs/geronimo-saaj_1.3_spec/${geronimo.spec.saaj.version}//argLine
 +!-- This fixes an issue on Sun JDKs caused by the
 presence of jaxp-ri on the classpath --
 +
  
 argLine-Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration/argLine
 /configuration
 /plugin
 /plugins





-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Supporting hierarchical service deployment

2009-09-04 Thread Amila Suriarachchi
On Fri, Sep 4, 2009 at 11:32 AM, Chinmoy Chakraborty cch...@gmail.comwrote:



 On Fri, Sep 4, 2009 at 10:22 AM, Amila Suriarachchi 
 amilasuriarach...@gmail.com wrote:



  On Fri, Sep 4, 2009 at 10:05 AM, Chinmoy Chakraborty 
 cch...@gmail.comwrote:

 Paul,

 May be I dropped in from nowhere but I like to understand the idea. What
 is the purpose of maintaining duplicate data by allowing exact same AAR to
 be deployed in two different parts of hierarchy?

  It is not exact AAR file. It is basically organise your AAR file in a
 directory structure without putting all of the in the root directory.

 eg.
 repository/services/admin/AdminService.aar
 repository/services/management/Management.aar
 repository/services/tech/v1.1/Tech.aar
 repository/services/tech/v1.0/Tech.aar

 if you take latter two cases, it may be two versions of same .aar file
 which user wants to active at the same time.


 CHINMOY OK.




 I guess Axis2 should also support same service name with different
 namespaces. I have this kind of requirement in our project but right now
 it's a limitation.

 if you can describe your requirement then we can see how it can be
 supported.

 As I understood what you want to have is same service name with different
 name spaces to distinguish the version.
 (I assume version depends on the namespace in your case)


 CHINMOY Not exactly. I have two different services with same service name
 and they do absolutely two different tasks. let me explain: I have one
 function called ABS (returns absolute value, generally long) and a 
 routinecalled ABS (does some other work than ABS function). Let's say the 
 namespace
 for ABS function is abc.function.ABS and the namespace for ABS routine is
 abc.routine.ABS.

 So we can have two different services for the same service name. In AXIS
 1.x we could do that since there was concept of jws deployment and the
 directory structure was part of the url.


This is what now we going to add to Axis2 :)

Once we add this, in your case you can have to ABS services like this

repository/services/abc/function/ABS.aar
repository/services/abc/routine/ABS.aar

Then two services maps to the urls (epr) like this

services/abc/function/ABS
services/abc/routine/ABS

I think this is the proper solution for your problem.

I think, you tend to think in the way you think because Axis2 currently does
not have this concept. This is why this concept is important.

thanks,
Amila.


 Now the problem is what is the epr for these two services. In the above
 solution epr is mapped to the folder structure. So people can invoke two
 services with different eprs.

 In your solution how to determine the service to invoke once a request
 receive?


 CHINMOY If we have a parameter in services.xml like
 serviceNameSpaceabc.function/routine/serviceNameSpace then in the url
 the service name should be appened with namespace. e.g

 ../services/ABS (now)
 ../service/abc.function.ABS

 The logic should be just add namespace along with the servicename and the
 namespace is available from the services.xml.

 Chinmoy


 thanks,
 Amila.


 Chinmoy

   On Thu, Sep 3, 2009 at 4:46 PM, Paul Fremantle pzf...@gmail.comwrote:

 Chinmoy

 I think that is cool, but I guess the aim of Isuru's initial proposal
 was to allow the exact same AAR to be deployed independently in two
 parts of the hierarchy. To me that is a good objective.

 Paul

 On Thu, Sep 3, 2009 at 11:59 AM, Chinmoy Chakrabortycch...@gmail.com
 wrote:
  Guys,
 
  How about introducing a new parameter (e.g ServiceClassNameSpace) in
 the
  services.xml to support directory hierarchy in the service?
 
  Chinmoy
 
  On Thu, Sep 3, 2009 at 3:47 PM, Isuru Suriarachchi isur...@gmail.com
 
  wrote:
 
  Hi all,
 
  As using '/' character may cause problems in dispatching, I just used
 a
  separate character ('!') to represent the directory hierarchy in the
  service. This allows all types of services to be deployed
 hierarchically
  without any problems (Including RESTful services).
 
  Ex: if we deploy the Echo service at
  /repository/services/foo/bar/1.0.0/echo.aar, service name will be
  foo!bar!1.0.0!Echo and the EPR will be like
  ../axis2/services/foo!bar!1.0.0!Echo/echoString
 
  I've attached a new patch to the JIRA
  (https://issues.apache.org/jira/browse/AXIS2-4479). This patch
 doesn't
  contain any changes in dispatching logics. And also I've implemented
 the
  ability to deploy JAXWS, Pojo etc.. (which are coming from the
 axis2.xml)
  services hierarchically to make this effort complete. In addition to
 that,
  I've written some deployment tests for hierarchical services.
 
  Thanks,
  ~Isuru
 
  On Sun, Aug 30, 2009 at 2:48 AM, keith chapman 
 keithgchap...@gmail.com
  wrote:
 
  I've been out of touch with the Axis2 list for some time. Took a
 while to
  read this thread. Just a few thouths on it.
 
  I don't think that this patch would effect the RESTfull behaviour in
 any
  way. Its just that the user needs to be extra carefull if he wants

Re: Supporting hierarchical service deployment

2009-09-03 Thread Amila Suriarachchi
 a new deployer  to handle the they want, even in you case we
 can
 do the same. Let's create a new deployer and manage anyway you like,
 and
 then if you think it is ok, then commit the new deployer to Axis2.

 However I am not ok with introducing new URL pattern, I think Isuru
 already agreed to replace / with -
 
  Deepal,
  I feel you have given over weight to the versioning support which is
 a
  use case of this. In the way to have told
  people can have versioning without any support of axis2, by just
  naming service in the way they need.
 Yes. At the end of the day whether it is / or - would become a
 unique name. So it is the service name.
 
  Comming into the other point of probable break of existing
  functionality Can you please come up with the
  set of use case scenarios for this? Then we can ask Isuru to provide
  integration test for all these scenarios. This may test the existing
  functionality as well :)
 I am sorry I do not have time to comeup with scenarios when someone
 add
 new features, specially even without going through the existing JIRA.
 
  I think we should not be pessimistic and think deployment engine is
  done for ever and any change will break it.
 Not at all, how many changes we made, in this case my concern is not
 the
 deployment engine it is the URL pattern.
 
  Isuru,
  Please provide a set of integration tests for the scenarios
 mentioned.
 :)

 Thanks,
 Deepal




 --
 Sanjiva Weerawarana, Ph.D.
 Founder, Director  Chief Scientist; Lanka Software Foundation;
 http://www.opensource.lk/
 Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
 Member; Apache Software Foundation; http://www.apache.org/
 Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

 Blog: http://sanjiva.weerawarana.org/




 --
 Sanjiva Weerawarana, Ph.D.
 Founder, Director  Chief Scientist; Lanka Software Foundation;
 http://www.opensource.lk/
 Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
 Member; Apache Software Foundation; http://www.apache.org/
 Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

 Blog: http://sanjiva.weerawarana.org/




 --
 Keith Chapman

 blog: http://www.keith-chapman.org




 --
 Senior Software Engineer,
 WSO2 Inc. http://wso2.org/
 Blog : http://isurues.wordpress.com/




 --
 Sanjiva Weerawarana, Ph.D.
 Founder, Director  Chief Scientist; Lanka Software Foundation;
 http://www.opensource.lk/
 Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
 Member; Apache Software Foundation; http://www.apache.org/
 Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

 Blog: http://sanjiva.weerawarana.org/




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Supporting hierarchical service deployment

2009-09-03 Thread Amila Suriarachchi
  files. So even in Web Service we have package hierarchy.
   I can hardly think of any reason for opposing to introduce such
   feature to axis2 service deployment provided
   that it *does not break existing functionality*.
  If you look at the directory structure (as I told you before)
  information repeat it self. It is analogous to Shop is closed
 because
  it is not open.
  Just because feature X is good in project Y, we should not
 introduce
  that to Axis2.
  If you or someone want to do such a feature of course they can do
  that,
  just ad a new deployer  to handle the they want, even in you case
 we
  can
  do the same. Let's create a new deployer and manage anyway you
 like,
  and
  then if you think it is ok, then commit the new deployer to Axis2.
 
  However I am not ok with introducing new URL pattern, I think Isuru
  already agreed to replace / with -
  
   Deepal,
   I feel you have given over weight to the versioning support which
 is
   a
   use case of this. In the way to have told
   people can have versioning without any support of axis2, by just
   naming service in the way they need.
  Yes. At the end of the day whether it is / or - would become a
  unique name. So it is the service name.
  
   Comming into the other point of probable break of existing
   functionality Can you please come up with the
   set of use case scenarios for this? Then we can ask Isuru to
 provide
   integration test for all these scenarios. This may test the
 existing
   functionality as well :)
  I am sorry I do not have time to comeup with scenarios when someone
  add
  new features, specially even without going through the existing
 JIRA.
  
   I think we should not be pessimistic and think deployment engine
 is
   done for ever and any change will break it.
  Not at all, how many changes we made, in this case my concern is
 not
  the
  deployment engine it is the URL pattern.
  
   Isuru,
   Please provide a set of integration tests for the scenarios
   mentioned.
  :)
 
  Thanks,
  Deepal
 
 
 
  --
  Sanjiva Weerawarana, Ph.D.
  Founder, Director  Chief Scientist; Lanka Software Foundation;
  http://www.opensource.lk/
  Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
  Member; Apache Software Foundation; http://www.apache.org/
  Visiting Lecturer; University of Moratuwa;
 http://www.cse.mrt.ac.lk/
 
  Blog: http://sanjiva.weerawarana.org/
 
 
 
  --
  Sanjiva Weerawarana, Ph.D.
  Founder, Director  Chief Scientist; Lanka Software Foundation;
  http://www.opensource.lk/
  Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
  Member; Apache Software Foundation; http://www.apache.org/
  Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
 
  Blog: http://sanjiva.weerawarana.org/
 
 
 
  --
  Keith Chapman
 
  blog: http://www.keith-chapman.org
 
 
 
  --
  Senior Software Engineer,
  WSO2 Inc. http://wso2.org/
  Blog : http://isurues.wordpress.com/
 
 



 --
 Paul Fremantle
 Co-Founder and CTO, WSO2
 Apache Synapse PMC Chair
 OASIS WS-RX TC Co-chair

 blog: http://pzf.fremantle.org
 p...@wso2.com

 Oxygenating the Web Service Platform, www.wso2.com





-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Supporting hierarchical service deployment

2009-08-29 Thread Amila Suriarachchi
  name
  unique)
  
   Therefore, I've improved our deployment engine to deploy services
 by
   looking at the hierarchical path of the service. For example this
   allows us to deploy a service
  repository/services/foo/bar/version.aar.
   And also this allows us to deploy any number of services as
 follows.
   repository/services/versionService/1.0.0/version.aar
   repository/services/versionService/1.0.1/version.aar
  Don't you think this is complex ? what is different between
  services/versionService/1.0.1/version.aar and
  services/version-1.0.1.aar ?. As far as I know second one is
 better
  than the first one (and you do not need much modification to handle
  that). Which is the commonly used approach for all sort of version
  management. (am I missing something?)
  
   In the implementation, I've attached the hierarchical part of the
   service (versionService/1.0.1/) in front of the service name
  which is
   read from the services.xml. And also I've fixed the URI based
   dispatching logics to dispatch the services correctly.
  Then how about addressing based dispatching ?
  I remember the mess we had when someone introduce portName into
  the URL,
  I think we still have issues with that (though no one uses the
  feature).
  
   This improvement doesn't affect any of the existing
 functionalities.
  Of course it does? how do you make sure when you change the
 dispatcher
  it does not break any of the existing features ? (we do not have
  enough
  test cases to cover all the cases) I think I have enough experience
 in
  Axis2, what when someone change something hoping that does not break
  something.
   The only limitation of this is we can't deploy a RESTful service
 in
   this manner.
  This is a problem right?
  When the system move from one version to other, client will notice
  that
  the service does not work any more?
   Those can only be supported at repository/service level. That is
   because, incoming URL of a RESTful service can contain '/'
 separated
   parameters to the service.
  oh boy, you are making system tooo, complicated.
 
  I am sorry I am -1 on this approach,  we need to discuss this
  before we
  implement.
  In fact I remember we had some discussion on this at one of the
  apachecon, there also we did not come to a conclusion.
 
  Thanks,
  Deepal
 
 
 
 
  --
  Thanks
  Afkham Azeez
 
  Blog: http://afkham.org
  Developer Portal: http://www.wso2.org
  WSAS Blog: http://wso2wsas.blogspot.com
  Company: http://wso2.com
  GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Supporting hierarchical service deployment

2009-08-29 Thread Amila Suriarachchi
On Fri, Aug 28, 2009 at 7:04 PM, Deepal jayasinghe deep...@gmail.comwrote:

 Hi Isuru,

 Thank you for taking your time and looking to this issues, but I do not
 agree the way you have address it, please see my comments below. The
 reason I am telling this is, as I can see this has so many issues, and
 you have made it complicated too :) . I believe you might know that we
 have version support for modules and we do not handle that like this. So
 this simply break the consistency, and this introduce new URL patterns ,
 though you have not encounter now, I am sure you are going to face a
 number of issues (when it come to dispatching).

  Currently Axis2 can only deploy services at the repository/services
  level. This makes it impossible to deploy several versions of the same
  service.
 I do not agree, you can have the version name in the aar file, for
 example foo-1.0.aar and foo-1.1.aar. Then at the deployment time just
 append the version number to the service name (to make the service name
 unique)


This may be a possible way of doing versioning. But IMHO not the best way.
Please have a look at here[1]. If we follow what you have mentioned here
then we need to add
all files of axis2 versions into one folder and rename them as pom-1.5.xml,
pom-1.4.xml etc. No need to say this is a mess.
Consider a situation where you have 10 services and 5 versions. you can ask
the question why
can't you keep all in one folder. But the practical way is to have them in
separate folders with the version numbers.

So if we have the hierarchical deployment we can have directory based
versioning.

thanks,
Amila.

[1]https://svn.apache.org/repos/asf/webservices/axis2/branches/java/


 
  Therefore, I've improved our deployment engine to deploy services by
  looking at the hierarchical path of the service. For example this
  allows us to deploy a service repository/services/foo/bar/version.aar.
  And also this allows us to deploy any number of services as follows.
  repository/services/versionService/1.0.0/version.aar
  repository/services/versionService/1.0.1/version.aar
 Don't you think this is complex ? what is different between
 services/versionService/1.0.1/version.aar and
 services/version-1.0.1.aar ?. As far as I know second one is better
 than the first one (and you do not need much modification to handle
 that). Which is the commonly used approach for all sort of version
 management. (am I missing something?)
 
  In the implementation, I've attached the hierarchical part of the
  service (versionService/1.0.1/) in front of the service name which is
  read from the services.xml. And also I've fixed the URI based
  dispatching logics to dispatch the services correctly.
 Then how about addressing based dispatching ?
 I remember the mess we had when someone introduce portName into the URL,
 I think we still have issues with that (though no one uses the feature).
 
  This improvement doesn't affect any of the existing functionalities.
 Of course it does? how do you make sure when you change the dispatcher
 it does not break any of the existing features ? (we do not have enough
 test cases to cover all the cases) I think I have enough experience in
 Axis2, what when someone change something hoping that does not break
 something.
  The only limitation of this is we can't deploy a RESTful service in
  this manner.
 This is a problem right?
 When the system move from one version to other, client will notice that
 the service does not work any more?
  Those can only be supported at repository/service level. That is
  because, incoming URL of a RESTful service can contain '/' separated
  parameters to the service.
 oh boy, you are making system tooo, complicated.

 I am sorry I am -1 on this approach,  we need to discuss this before we
 implement.
 In fact I remember we had some discussion on this at one of the
 apachecon, there also we did not come to a conclusion.

 Thanks,
 Deepal




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-29 Thread Amila Suriarachchi
On Sat, Aug 29, 2009 at 4:24 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 I would like to inform all of you that I decided to significantly
 reduce my activity in the Axis2 project. Over the last months I have
 worked primarily on JIRA issues and on improving the test suites of
 SAAJ and ADB [1]. This work has put me in the line of fire of people
 who are not willing or not able to let a discussion occur in a
 constructive way. Considering that I dedicate some of my free time to
 do this and that my professional life is already stressful enough, I
 can live very well without this. Doing the dirty job of fixing bugs is
 simply not worth it under these conditions.

 The fact is that in AXIS2-4465, I have implemented a fix that
 inadvertently removed a public method and causing a subtle issue in a
 dependent project. I have been immediately accused of drastic and
 deliberate changes to public APIs and these accusations went as far as
 talking about merrily chang[ing] APIs and things are going to
 become a big mess. In addition these accusations have been put
 forward while being vague on the exact issue that the fix caused (the
 complete information about this was only disclosed in the 35th post in
 this thread). This caused the discussion to quickly degrade instead of
 remaining focused on the facts and drawing the conclusions after
 analyzing those facts. Furthermore, in another thread, my fix in
 AXIS2-4465 has been implicitly put on a level with a proposed
 modification that would change the deployment subsystem, dispatchers
 and transports. I think that all this goes way beyond legitimate
 criticism and also way beyond what one would expect in a constructive
 discussion.


First of all I should thank you for your good work in Axis2 specially for
ADB. I think it is a coinside that all three people worked with ADB codegen
has the name starting with A (Ajith, Amila, Andreas) :)

I feel sorry for the first reason you have mentioned. But I think this is
not the first time of that. If you see the
Deepals comments on what Isuru has done I can't see any positiveness. I am
not saying it is correct but I would like to ask you not to take them
personal. I think at least you got an agreeable solution at the end. Anyway
disscussing things in dev list always is a good idea.

The second reason you have mention I think is a complete misunderstanding.
There is no connection between those two.

I my point of view there is no point in contributing an open source project
in a stress. But try to do for the fun :).

Hope you use your free time and contribute to axis2 as you were, in furture
as well.


thanks,
Amila.




 Note that I am not resigning from the Axis2 project; I will just shift
 priorities.

 Andreas

 [1]
 http://svnsearch.org/svnsearch/repos/ASF/search?path=%2Fwebservices%2Faxis2%2Ftrunk%2Fjavaauthor=veithen




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-29 Thread Amila Suriarachchi
On Sat, Aug 29, 2009 at 7:30 PM, Deepal Jayasinghe deep...@gmail.comwrote:

  think my suggestion would do this.
 
  This discussion should involve Axis2-dev, carbon-dev, synapse-dev. So
 please
  start a discussion by engaging all these communities in a different
 thread
  with the correct heading.
 

 Amila, I did not see this in the first place could you please tell me
 why we need to engage people from carbon-dev. What is the point of
 trying to get outside apache mailing lists into Apache discussion.

Good point. Lets only discuss in Axis2-dev.

thanks,
Amila.



 Thanks,
 Deepal




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-29 Thread Amila Suriarachchi
On Sat, Aug 29, 2009 at 8:35 PM, Deepal jayasinghe deep...@gmail.comwrote:


 
 
  On Sat, Aug 29, 2009 at 7:49 PM, Deepal jayasinghe deep...@gmail.com
  mailto:deep...@gmail.com wrote:
 
  If you feel so I am so sorry, it was not intensional, I really like
  Axis2 not because I have contributed to it but because it is a useful
  project. When I see someone try to break something in the project
  it is
  hard for me to keep silent.
 
 
  But 40 minutes prior to that in reply to Andreas' mail you wrote:
 
  =
  It is so sad to hear this, I know you contributed a lot and helped to
  move the project forward. When we implement a feature we can not
  consider all the projects using it. Just think one more time, we really
  need your help ., I really value your contribution.
  =
 I am sorry . I think my bad English made you misunderstand what I meant .

 As I mentioned Axis2 is a very useful project and we can not make the
 changes as we wish (since the project is matured).  If I had  a chance
 to go though Andreas's  patch I would have argued the same way as I did
 with Isuru.

Andreas,
If Deepal saw your patch, I am sure it is not get commited anyway :).



 Having said that  when I implement a feature we can not consider all the
 projects using it (For example I do not know what kind of features of
 Axis2 that Tuscany uses), however if I know I am going to break some of
 the existing stuff in Axis2 I will not do that or will not let others to
 do it (like in Isuru's case). But if I got to know that I have break
 something on other dependent project (though JIRA or emails) , then I
 would consider fixing the issue to solve their problem too.
 
  So its ok for one person to break things (Andreas, which is what
  started this thread)
 I hope you can understand it is hard for me to find time to go though
 Axis2 mails, when Andreas's patch mailing thread taking place I was so
 busy with my assignments so did not have  time. Unfortunately I had a
 chance to go though Isuru's mail yesterday, that wasted my whole day for
 nothing.
  but not the other (Isuru, on the hierarchical service stuff)? Why the
  double standard?
 
 It is not double stand, I already mentioned the rational behind that. It
 about time...,Otherwise I do not care who the person is if he trying to
 break anything, I have done that to Dims, Glen, Amila and few others (of
 course when I had time).

Andreas,

Now you can understand what I tried to say. Please try to go through the
this
deployment thread and take your own judgement of warring about Axis2
breaking and stopping
some one doing a new thing.
Hope you realise there is no reason you to resign from Axis2 because of the
discussion
you have mentioned :).

thanks,
Amila.




 I think this will be the last time I am going to say NO to any new
 feature adding or existing stuff breaking, I will simply do not care it
 anymore (I do not have time to waste). But will still to reply to mails
 in axis-user list.

 Thanks,
 Deepal
  (I haven't read thru the hierarchical service thread yet; I will and I
  will reply to it - my belief is that it doesn't need to break anything
  that works now but maybe the way its been done is not that way. Anyway
  I will read thru that thread and reply later.
 
  Sanjiva.
  --
  Sanjiva Weerawarana, Ph.D.
  Founder, Director  Chief Scientist; Lanka Software Foundation;
  http://www.opensource.lk/
  Founder, Chairman  CEO; WSO2, Inc.; http://www.wso2.com/
  Member; Apache Software Foundation; http://www.apache.org/
  Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
 
  Blog: http://sanjiva.weerawarana.org/


 --
 Thank you!


 http://blogs.deepal.org
 http://deepal.org




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [PROPOSAL] Axis2 Deployer behaviour on hot update

2009-08-27 Thread Amila Suriarachchi
On Thu, Aug 27, 2009 at 10:06 AM, Ruwan Linton ruwan.lin...@gmail.comwrote:

 Hi devs,

 I am trying to implement the Hot deployment and Hot update of the synapse
 artifacts, and realized that there are some issues; I first thought of
 writing our own deployment behaviour because we wanted some conditions to be
 checked on the hot update case undeployment of the artifacts.

 Let me first describe how Hot update works in axis2, correct me if I am
 wrong but from what I have figured out so far, axis2 repository listener
 task calls unDeploy method of the deployer implementation first and then
 calls the deploy method again to deploy the artifact with the changes.

 So this approach has two issues,

1. There is a considerable downtime of the artifact which is being hot
updated
2. There is no means of knowing the case where the undeploy method
being called, for example synapse needs to have a main sequence for it to
operate properly, so synapse has to force the user to not to undeploy the
main sequence while it should allow the user to hot update it.

 I propose adding a update method to the Deployer interface or passing the
 state as an argument, we could use the DeploymentFileData class to provide
 the operation, but that doesn't resolve the issue because the undeploy
 method has a String file name as its argument, so this canot be fixed
 without an API change in the deployer implementation.

 Being said the above I can implement this in Synapse, but since we had huge
 debates earlier on writing stuff on synapse replacing axis2 stuff just
 because they do not fit into synapse without letting the axis2 community
 know about those, I thought of proposing this to the axis2 as well.

 WDYT?

 Or may be I am missign something which can resolve the above 2 issues, in
 which case please be kind enough to point me to the behaviour that I should
 be using.. :-)


I went through the deployment engine code and it seems bit complicated and
can not solve without changing Deployer interface.

Let me put this suggestion if it works for you :).

At the undeploy method you get the file name. Then you can check whether
this file exists.
if not exist this is only an undeployment so you do the undeployment
if exists then this is a update, you keep this entry in your deployer. Now
at the deploy method if there is an entry you do an update and if not do a
fresh deployments.

Anyway I think, writing a synapse deployer would be a correct long term
solution since you can customise it purely for synapse needs.

thanks,
Amila.



 Thanks,
 Ruwan

 --
 Ruwan Linton
 Technical Lead  Product Manager; WSO2 ESB; http://wso2.org/esb
 WSO2 Inc.; http://wso2.org
 email: ru...@wso2.com; cell: +94 77 341 3097
 blog: http://ruwansblog.blogspot.com




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Unable to get Header tags in custom module's inflow handler

2009-08-26 Thread Amila Suriarachchi
On Wed, Aug 19, 2009 at 9:44 PM, Senthil Sona sws...@cisco.com wrote:


 Hi Rampart team,

In a client class we have our custom module and rampart engaged. While
 sending the request, we are setting some header tags in outflow handler of
 custom module. while request going out, first custom module's outflow
 handler is executing then rampart module's outflow handler is executing.
 When request goes til webservice, (webservice is also having rampart and
 custom module engage), then webservice custom module's inflow handler is
 executing. We have a code to extract custom header tags in inflow handler.
 But the custom header tags we have set in outflow handler is not coming
 till
 inflow handler. And in inflow handler the envelope is in encrypt form.
 Could
 you please tell me how to get these header values in inflow handler.


If you look at the axis2.xml phases you can see the Out flow handler order
is the reverse of inflow handler order.
so when you add handlers you need to think like that. If custom out handler
is before security phase in out flow then
custom in handler should be after security phase in inflow.

thanks,
Amila.



Please reply as soon as possible. This is very urgent.

 Thanks,
 Swapna Soni.
 --
 View this message in context:
 http://www.nabble.com/Unable-to-get-Header-tags-in-custom-module%27s-inflow-handler-tp25047272p25047272.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-25 Thread Amila Suriarachchi
On Tue, Aug 25, 2009 at 5:45 PM, Davanum Srinivas dava...@gmail.com wrote:

 Amila,

 you said:

 You have not put any comment in my suggestion to  resolve the issue
 keeping
 your change and with out breaking carbon. We will test it and commit if you
 don't have any suggestions to fix this issue.

 Do you have proposed patch on how to fix this break?


yes. Please see my first mail on Monday.
This does not change any functionality but do it in a slightly different
way.

here is the commit[1].

thanks,
Amila.

[1] http://svn.apache.org/viewvc?view=revrevision=807512



 thanks,
 dims


 On 08/25/2009 01:02 AM, Amila Suriarachchi wrote:

 You have not put any comment in my suggestion to  resolve the issue
 keeping
 your change and with out breaking carbon. We will test it and commit if
 you
 don't have any suggestions to fix this issue.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-24 Thread Amila Suriarachchi
hi,

I had time to go through your comment and I think what you suggest is the
correct way to address the problem.
So +1 for that.

Then I looked into the our code and found that we have also done the same
technique with separate two
Transport listeners :).

Because we have our own two transport listeners this code gives us problems,

// This method should not be part of the public API. In particular we must
not allow subclasses
// to override this method because we don't make any guarantees as to
when exactly this method
// is called.
private void preprocessRequest(HttpServletRequest req) throws
ServletException {
initContextRoot(req);

AxisServletListener listener = req.isSecure() ? httpsListener :
httpListener;
if (listener == null) {
throw new ServletException(req.getScheme() +  is forbidden);
} else {
// Autodetect the port number if necessary
if (listener.getPort() == -1) {
listener.setPort(req.getServerPort());
}
}
}

Here you assume anyone use Axis2 as a library has used AxisServletListner
and kept it as a private variable in Axis2Servlet.

Instead of I would like to implement this method like this,


// This method should not be part of the public API. In particular we must
not allow subclasses
// to override this method because we don't make any guarantees as to
when exactly this method
// is called.
private void preprocessRequest(HttpServletRequest req) throws
ServletException {
initContextRoot(req);

TransportInDescription transportInDescription =
req.isSecure() ?
this.axisConfiguration.getTransportIn(Constants.TRANSPORT_HTTPS) :

this.axisConfiguration.getTransportIn(Constants.TRANSPORT_HTTP);
if (transportInDescription == null) {
throw new ServletException(req.getScheme() +  is forbidden);
} else {
if (transportInDescription.getReceiver() instanceof
AxisServletListener) {
AxisServletListener listener = (AxisServletListener)
transportInDescription.getReceiver();
if (listener.getPort() == -1) {
listener.setPort(req.getServerPort());
}
}
}
}

In this way we do not keep the Axis2Specific listener and take it from the
axis configuration and check for port only if it is an Axis2Servlet
listener.

WDYT?

thanks,
Amila.



On Sat, Aug 22, 2009 at 12:45 PM, Srinath Perera hemap...@gmail.com wrote:

  I am not sure whether clearly understand the difference between how
  AxisServelet works and how SimpleHTTPServer works. In the case of
  AxisServlet, we first start AxisServlet and then we start Axis2, so when
  we start Axis2 we already have HTTP listener running (and hence
  TransportInDec). So once the system start we just create a
  TransportInDec using servlet and set that as the HTTP TransportDec (and
  of course we replace what is in axis2.xml for HTTP with this
  transportInDec, and we must do that). Whereas in SimpleHTTPServer, we
  first start Axis2 and then we use transport in axis2.xml to configure
  the system, so we use the tarnporInDec to configure the SimpleHTTPServer.

 Yep, this is right. One reason it is there is that to allow both
 simple HTTP server and servlet share the same axis2.xml which is not
 required, rather a convenience. In a servlet case transport receiver
 is not initialized at all (I do not think it has changed).

 Thanks
 Srinath

 --
 
 Srinath Perera, Ph.D.
   WSO2 Inc. http://wso2.com
   Blog: http://srinathsview.blogspot.com/




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-24 Thread Amila Suriarachchi
 if it is an Axis2Servlet
  listener.
 
  WDYT?
 
  thanks,
  Amila.
 
 
 
  On Sat, Aug 22, 2009 at 12:45 PM, Srinath Perera hemap...@gmail.com
 wrote:
 
   I am not sure whether clearly understand the difference between how
   AxisServelet works and how SimpleHTTPServer works. In the case of
   AxisServlet, we first start AxisServlet and then we start Axis2, so
 when
   we start Axis2 we already have HTTP listener running (and hence
   TransportInDec). So once the system start we just create a
   TransportInDec using servlet and set that as the HTTP TransportDec
 (and
   of course we replace what is in axis2.xml for HTTP with this
   transportInDec, and we must do that). Whereas in SimpleHTTPServer, we
   first start Axis2 and then we use transport in axis2.xml to configure
   the system, so we use the tarnporInDec to configure the
   SimpleHTTPServer.
 
  Yep, this is right. One reason it is there is that to allow both
  simple HTTP server and servlet share the same axis2.xml which is not
  required, rather a convenience. In a servlet case transport receiver
  is not initialized at all (I do not think it has changed).
 
  Thanks
  Srinath
 
  --
  
  Srinath Perera, Ph.D.
WSO2 Inc. http://wso2.com
Blog: http://srinathsview.blogspot.com/
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Adding the Apache tomcat tribes and juli jars to axis2 distributions

2009-08-24 Thread Amila Suriarachchi
hi,

Currently Apache tomcat tribes and juli jars are excluded from the axis2
distributions
see (modules/distribution/src/main/assembly/bin-assembly.xml). These jars
are required to run the
axis2 clustering. Is there any reason not to exclude them I'll add them.

thanks,
Amila.

-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-24 Thread Amila Suriarachchi
 start Axis2 we already have HTTP listener running (and hence
TransportInDec). So once the system start we just create a
TransportInDec using servlet and set that as the HTTP TransportDec
(and
of course we replace what is in axis2.xml for HTTP with this
transportInDec, and we must do that). Whereas in SimpleHTTPServer,
 we
first start Axis2 and then we use transport in axis2.xml to
 configure
the system, so we use the tarnporInDec to configure the
SimpleHTTPServer.
  
   Yep, this is right. One reason it is there is that to allow both
   simple HTTP server and servlet share the same axis2.xml which is not
   required, rather a convenience. In a servlet case transport receiver
   is not initialized at all (I do not think it has changed).
  
   Thanks
   Srinath
  
   --
   
   Srinath Perera, Ph.D.
 WSO2 Inc. http://wso2.com
 Blog: http://srinathsview.blogspot.com/
  
  
  
   --
   Amila Suriarachchi
   WSO2 Inc.
   blog: http://amilachinthaka.blogspot.com/
  
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


ADB test failure

2009-08-21 Thread Amila Suriarachchi
.databinding.utils.ConverterUtilTest)

Tests run: 60, Failures: 8, Errors: 52, Skipped: 0

[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] There are test failures.

Has anyone got it working?

thanks,
Amila.

-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please revert API changes done as per AXIS2-4465

2009-08-21 Thread Amila Suriarachchi
, you may have
   to live with it for a long time.
  
   Azeez
  
   On Thu, Aug 20, 2009 at 11:38 AM, Davanum Srinivasdava...@gmail.com
 
   wrote:
   Azeez,
  
   We are still following, commit-then-review right?
  
   thanks,
   dims
  
   On 08/20/2009 07:33 AM, Afkham Azeez wrote:
  
   Hi Andreas,
   The changes you've done to the APIs as per
   https://issues.apache.org/jira/browse/AXIS2-4465 badly breaks some
 of
   the projects that depend on Axis2. Please revert this, and please
   engage the community before making such drastic changes in the
   future.
  
  
  
  
  
   --
   Thanks
   Afkham Azeez
  
   Blog: http://afkham.org
   Developer Portal: http://www.wso2.org
   WSAS Blog: http://wso2wsas.blogspot.com
   Company: http://wso2.com
   GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
  
 
 
 
  --
  Hiranya Jayathilaka
  Software Engineer;
  WSO2 Inc.;  http://wso2.org
  E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
  Blog: http://techfeast-hiranya.blogspot.com
 
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: ADB test failure

2009-08-21 Thread Amila Suriarachchi
I get rid of the first exception after building Axiom. But now getting this
exception

---
 T E S T S
---
Running org.apache.axis2.databinding.ADBSOAPModelBuilderTest
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.11 sec 
FAILURE!
Running org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderTest
Tests run: 15, Failures: 0, Errors: 15, Skipped: 0, Time elapsed: 0.074 sec
 FAILURE!
Running org.apache.axis2.databinding.utils.MultirefHelperTest
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.02 sec 
FAILURE!
Running org.apache.axis2.databinding.utils.SimpleArrayReaderStateMachineTest
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.022 sec
 FAILURE!
Running org.apache.axis2.databinding.types.xsd.ArrayTest
OMElement == ns1:Array xmlns:ns1=
http://schemas.xmlsoap.org/soap/encoding/; xmlns:s1=
http://www.w3.org/2001/XMLSchema;
   ns1:arrayType=s1:ur-type[5]
s1:int1/s1:int
s1:int2/s1:int
s1:int3/s1:int
s1:int4/s1:int
s1:int5/s1:int
/ns1:Array
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.024 sec
 FAILURE!
Running org.apache.axis2.databinding.utils.NamedStaxOMBuilderTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.006 sec
 FAILURE!
Running
org.apache.axis2.databinding.utils.SimpleElementReaderStateMachineTest
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.008 sec
 FAILURE!
Running org.apache.axis2.databinding.utils.writer.MTOMAwareOMBuilderTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec
 FAILURE!



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/
---
Test set: org.apache.axis2.databinding.ADBSOAPModelBuilderTest
---
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.111 sec  
FAILURE!
testSimpleArrayList(org.apache.axis2.databinding.ADBSOAPModelBuilderTest)  Time 
elapsed: 0.036 sec   ERROR!
java.lang.ExceptionInInitializerError
at 
org.apache.axis2.databinding.ADBSOAPModelBuilderTest.testSimpleArrayList(ADBSOAPModelBuilderTest.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Caused by: org.apache.commons.logging.LogConfigurationException: User-specified 
log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is 
not useable.
at 
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:874)
at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
at 
org.apache.axiom.om.impl.builder.StAXBuilder.clinit(StAXBuilder.java:58)
... 24 more

testPrintEvents(org.apache.axis2

Re: Please revert API changes done as per AXIS2-4465

2009-08-21 Thread Amila Suriarachchi
On Fri, Aug 21, 2009 at 12:58 AM, Andreas Veithen andreas.veit...@gmail.com
 wrote:

 If the user registered a transport receiver for http or https that is
 not of type AxisServletListener, then this would obviously mean that
 he doesn't want to use the servlet based transport for these
 protocols, but some other implementation. So the question in principle
 doesn't apply. However, in Axis2 1.5 it is necessary to register the
 SimpleHTTPServer as http transport even when AxisServlet is used,
 because otherwise the generated WSDLs don't contain any endpoints. For
 compatibility this is still supported and AxisServlet will replace the
 transport receiver by AxisServletListener (and print a warning).


Can someone like Deepal (or any one who is with the Axis2 from day 0 )
explain why servlet transport is written in this way? I mean adding a
transport receiver for SimpleHttpTransport in axis2.xml and use servlet?

thanks,
Amila.



 Andreas

 On Thu, Aug 20, 2009 at 14:44, Hiranya Jayathilakahiranya...@gmail.com
 wrote:
  Hi Andreas,
 
  By looking at the code I got the impression that HTTP transport receivers
  should extend the AxisServletListener class for your logic of port auto
  detection to work. Is that correct? What happens if the transport
 receivers
  used do not extend this class? All request handler methods call the
  preprocessRequest method which in turns run port auto detection. If the
  transport receivers do not extend AxisServlerListener how is that
 handled?
 
  Thanks,
  Hiranya
 
 
  On Thu, Aug 20, 2009 at 6:05 PM, Andreas Veithen 
 andreas.veit...@gmail.com
  wrote:
 
  Afkham,
 
  The only change I see in the public APIs is the disappearance of the
  initContextRoot method. We can easily fix this be restoring the
  original initContextRoot method and let the preprocessRequest method
  call initContextRoot. Do you see any other things to change?
 
  Andreas
 
  On Thu, Aug 20, 2009 at 13:45, Afkham Azeezafk...@gmail.com wrote:
   Yes Dims. However, if everybody continues to merrily change APIs,
   making public methods private  so on, things are going to become a
   big mess. Axis2 provides public APIs, and those may be having
   problems, but still they are public APIs. This is why you have to be
   very careful when defining APIs; if you get them wrong, you may have
   to live with it for a long time.
  
   Azeez
  
   On Thu, Aug 20, 2009 at 11:38 AM, Davanum Srinivasdava...@gmail.com
   wrote:
   Azeez,
  
   We are still following, commit-then-review right?
  
   thanks,
   dims
  
   On 08/20/2009 07:33 AM, Afkham Azeez wrote:
  
   Hi Andreas,
   The changes you've done to the APIs as per
   https://issues.apache.org/jira/browse/AXIS2-4465 badly breaks some
 of
   the projects that depend on Axis2. Please revert this, and please
   engage the community before making such drastic changes in the
 future.
  
  
  
  
  
   --
   Thanks
   Afkham Azeez
  
   Blog: http://afkham.org
   Developer Portal: http://www.wso2.org
   WSAS Blog: http://wso2wsas.blogspot.com
   Company: http://wso2.com
   GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
  
 
 
 
  --
  Hiranya Jayathilaka
  Software Engineer;
  WSO2 Inc.;  http://wso2.org
  E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
  Blog: http://techfeast-hiranya.blogspot.com
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: ADB test failure

2009-08-21 Thread Amila Suriarachchi
I could run all the tests sucessfully by adding log4j dependency to parent
pom.xml.

I am wondering why it is not the case otherwise.

thanks,
Amila.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: ADB test failure

2009-08-21 Thread Amila Suriarachchi
yes, there was a commons-logging.properties file.

thanks Andreas.

Amila.


On 8/21/09, Andreas Veithen andreas.veit...@gmail.com wrote:
 That is strange, because normally commons-logging should fall back to
 JDK1.4 logging if log4j is not found. Maybe there is a
 commons-logging.properties that slipped in somehow. Did you test the
 build on a fresh working copy of Axis2?

 Andreas

 On Fri, Aug 21, 2009 at 12:04, Amila
 Suriarachchiamilasuriarach...@gmail.com wrote:
 I could run all the tests sucessfully by adding log4j dependency to parent
 pom.xml.

 I am wondering why it is not the case otherwise.

 thanks,
 Amila.




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 1.5.1 and the default HttpClient reuse

2009-08-19 Thread Amila Suriarachchi
hi Glen,

A quick question, will go through this change properly tomorrow.

Lets say I want to invoke a service using service client with multiple
threads as follows,

Thread Class.

public class InvokeService implements Runnable{

private ConfigurationContext configurationContext = null;

public InvokeService(ConfigurationContext configurationContext) {
this.configurationContext = configurationContext;
}

public void run() {
try {
ServiceClient serviceClient = new
ServiceClient(configurationContext,null);
serviceClient.setTargetEPR(new EndpointReference(
http://localhost:8088/axis2/services/Version;));
serviceClient.getOptions().setAction(urn:getVersion);
OMElement omElement = serviceClient.sendReceive(null);
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
}
}
}

Invocation class

try {
ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,null);
for (int i=1;i5;i++){
InvokeService invokeService = new
InvokeService(configurationContext);
Thread thread = new Thread(invokeService);
thread.start();
}
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
}

1. In this case with your new change how many
MultiThreadedHttpConnectionManager
instances created?

2. In your test case you have use  options.setCallTransportCleanup(true); is
this manadatory?

As you know this builds the OMElement before returning the response. Which
is not what every one needs.

thanks,
Amila.





-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r804860 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java

2009-08-17 Thread Amila Suriarachchi
hi,

the service create here,

axisService = createAnonymousService();

does not have a service Group.

So
AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup();
ServiceGroupContext sgc =
configContext.createServiceGroupContext(axisServiceGroup);
serviceContext = sgc.getServiceContext(axisService);

there will be an NullpointerException at the third statement.

AxisService axisService = axisServiceGroup.getService(service.getName());

see inside the sgc.getServiceContext(axisService) method.

So basically this code does not work if an AxisService already exists in the
AxisConfiguration.

Anyway if we take your scenario, I think the idea of using the same name is
that user wants to use the same existing service. And also I think there are
no changes happen to AxisService during a service invocation.

thanks,
Amila.



On Mon, Aug 17, 2009 at 10:33 AM, Deepal Jayasinghe dee...@opensource.lkwrote:

 Amila,

 Let's say we are trying to invoke a service called Echo inside an
 application server (like tomcat), and further assume that we have a
 service called Echo in the server as well. Then what happen is you are
 going to change the server's service. I think that is not right.

 Deepal

 ami...@apache.org wrote:
  Author: amilas
  Date: Mon Aug 17 04:37:13 2009
  New Revision: 804860
 
  URL: http://svn.apache.org/viewvc?rev=804860view=rev
  Log:
  if the axisService already exists in the axisconfiguration we need to use
 that inside the service client as well.
 
  Modified:
 
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
 
  Modified:
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
  URL:
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?rev=804860r1=804859r2=804860view=diff
 
 ==
  ---
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
 (original)
  +++
 webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
 Mon Aug 17 04:37:13 2009
  @@ -167,20 +167,22 @@
   if (axisService == null) {
   axisService = createAnonymousService();
   }
  -this.axisService = axisService;
  +
   // axis service is removed from the configuration context
   // only if user has not added it to configuration context.
   if (axisConfig.getService(axisService.getName()) == null) {
   axisService.setClientSide(true);
   axisConfig.addService(axisService);
   removeAxisService = true;
  +this.axisService = axisService;
   } else {
   axisService.setClientSide(true);
   removeAxisService = false;
  +this.axisService =
 axisConfig.getService(axisService.getName());
   }
  -AxisServiceGroup axisServiceGroup =
 axisService.getAxisServiceGroup();
  +AxisServiceGroup axisServiceGroup =
 this.axisService.getAxisServiceGroup();
   ServiceGroupContext sgc =
 configContext.createServiceGroupContext(axisServiceGroup);
  -serviceContext = sgc.getServiceContext(axisService);
  +serviceContext = sgc.getServiceContext(this.axisService);
   }
 
 
 
 
 
 

 --
 Thank you!


 http://blogs.deepal.org
 http://deepal.org




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [axis2] Releasing 1.5.1

2009-08-06 Thread Amila Suriarachchi
On Tue, Aug 4, 2009 at 2:04 AM, Glen Daniels g...@thoughtcraft.com wrote:

 Hi folks:

 So, there are currently no JIRAs left targeted for 1.5.1, and there were at
 least a few major fixes (in particular the CLOSE_WAIT issues, transport
 deployer fix, and the module versioning stuff) since 1.5 that I for one
 would
 really like to get out into the world ASAP.


Hope that GUI problem also fixed by now.



 What needs to happen before we release 1.5.1?  We need to do a transports
 release for sure, but that doesn't absolutely need to block 1.5.1, right?
 Ditto with Rampart / Sandesha - we should get those out ASAP (and the teams
 are working on it IIRC) but again putting out 1.5.1 shouldn't be gated on
 that.

 I'll clean up the docs a bit, but aside from that are people OK if I get
 the
 release train rolling to get these fixes out?


+1

thanks,
Amila.



 Thanks,
 --Glen




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Apache CFX

2009-08-06 Thread Amila Suriarachchi
On Fri, Aug 7, 2009 at 2:58 AM, D G demet...@ece.neu.edu wrote:

 Sagara apologies for the extra email in you inboxes - even though if you
 have been on this list long enough you would find that people even ask where
 their list cat is. First the CFX list didn't respond positively in a bit now
 and second the WSDL2EverythingAndAnything tools are fairly relevant here as
 well don't you think?
 In any case within one response I got what I needed


 if you just googled Apache CFX you would have got what you need as the
first hit :).

(thus this list help) and my next email I promise will be all about Axising
 ;)

 Cheers



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Vote] Charith Dhanushka Wickramarachchi as a commiter

2009-07-22 Thread Amila Suriarachchi
On Thu, Jul 23, 2009 at 4:19 AM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 0. Since I don't know Charith personally, I can only base my decision
 on the contributions and discussions on the public mailing lists. The
 contributions other than the SMS transport don't give a clear enough
 picture to evaluate if he is ready to commit code without prior
 review. With regard to the SMS transport, what I notice is that there
 have been almost no discussions,

which either means that no review has
 been done or that these discussions have happened in private. In both
 cases there is no basis for me to give an objective opinion. Finally,
 the fact that the normal voting period is 3 days doesn't give me the
 opportunity to do a review myself.


I think this work as started some time ago and you have enough time to put
any feedback.

Anyway. Please have a look at that code and raise any issues you have. This
will help him to get evaluated his work from another person as well.

What my point is we need to help people to get in. Rather than just
neglecting their work.

I think there is no hard rule to finish a discussion within 3 days. So Lets
wait to resolve any
issues regarding his work and continue with this.

thanks,
Amila.



 I'm not voting -1 because there is also no reason to believe that
 Charith's contribution will not be valuable. My personal opinion is
 simply that Amila's initiative to propose him as a committer comes too
 early.

 Regards,

 Andreas

 On Wed, Jul 22, 2009 at 07:17, Afkham Azeezafk...@gmail.com wrote:
  +1 for Charith. I've worked with him closely  know that he is a very
  capable developer, and that the community will benefit overall by
  granting commitership to him, and that he will be a great value
  addition to axis-dev. He is a brilliant University student with good
  industry exposure.
 
  Thanks
  Azeez
 
  On Mon, Jul 20, 2009 at 10:13 AM, Amila
  Suriarachchiamilasuriarach...@gmail.com wrote:
  hi,
 
  Charith is currently active  in SMS transport module for ws commons
  transport and he has done a lot of
  contributions for both Axis2 and ws commons project in addition to
  that[1][2][3].
 
  So I would like to propose him as a commiter.
  Here is my +1.
 
  thanks,
  Amila.
 
 
  [1]http://marc.info/?a=12253556013r=1w=2
  [2]http://marc.info/?a=12347793915r=1w=2
  [3]http://marc.info/?a=12304390995r=1w=2
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 
 
 
 
  --
  Thanks
  Afkham Azeez
 
  Blog: http://afkham.org
  Developer Portal: http://www.wso2.org
  WSAS Blog: http://wso2wsas.blogspot.com
  Company: http://wso2.com
  GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: getting list of webservices

2009-07-21 Thread Amila Suriarachchi
On Tue, Jul 21, 2009 at 7:02 PM, Sasan sasanp...@yahoo.com wrote:

 Hi,

 given a war file, is it possible to get the list of web services in that
 war? I'm not trying to do this jmx way, I was wondering if this
 functionality is in axis  / axis2


you can get the available servers from the Axisconfiguration.
AxisConfiguration is available in the configuration context.

thanks,
Amila.



 Thanks,
 S.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Vote] Charith Dhanushka Wickramarachchi as a commiter

2009-07-21 Thread Amila Suriarachchi
On Wed, Jul 22, 2009 at 10:11 AM, nickar nicka...@yahoo.com wrote:


 I'm a Axis2 user, I'm wonder with this mail and  getting doubt about
 quality
 of the project ? AFAIK Apache always keep good quality with high
 performance
 with their projects but I'm not sure Axis2 try to keep that policy or try
 to
 loose it ?

 It seems like Axis2 becoming a project maintaining by set of people elected
 based on some other criteria instead of the Apache way.If a student can be
 a
 commiter by providing patches for one issue plus very few number of mailing
 list hits like this  what it will implies to us ?


I think it doesn't matter who the person is. (a university student, software
engineer). What matters his
contribution and allow him to continue with his work.

thanks,
Amila.



 BTW fortunately there are some other WS projects to move , like CXF with
 the
 Apcahe brand also that maintained by good professionals :)


 Amila Suriarachchi wrote:
 
  hi,
 
  Charith is currently active  in SMS transport module for ws commons
  transport and he has done a lot of
  contributions for both Axis2 and ws commons project in addition to
  that[1][2][3].
 
  So I would like to propose him as a commiter.
  Here is my +1.
 
  thanks,
  Amila.
 
 
  [1]http://marc.info/?a=12253556013r=1w=2
  [2]http://marc.info/?a=12347793915r=1w=2
  [3]http://marc.info/?a=12304390995r=1w=2
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 
 

 --
 View this message in context:
 http://www.nabble.com/-Vote--Charith-Dhanushka-Wickramarachchi-as-a-commiter-tp24567118p24599977.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


[Vote] Charith Dhanushka Wickramarachchi as a commiter

2009-07-20 Thread Amila Suriarachchi
hi,

Charith is currently active  in SMS transport module for ws commons
transport and he has done a lot of
contributions for both Axis2 and ws commons project in addition to
that[1][2][3].

So I would like to propose him as a commiter.
Here is my +1.

thanks,
Amila.


[1]http://marc.info/?a=12253556013r=1w=2
[2]http://marc.info/?a=12347793915r=1w=2
[3]http://marc.info/?a=12304390995r=1w=2

-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Status of ADB SOAP encoding and helper mode

2009-07-20 Thread Amila Suriarachchi
On Mon, Jul 20, 2009 at 8:08 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 On Tue, Jun 30, 2009 at 07:05, Amila
 Suriarachchiamilasuriarach...@gmail.com wrote:
 
 
  On Sat, Jun 27, 2009 at 1:15 AM, Andreas Veithen 
 andreas.veit...@gmail.com
  wrote:
 
  Hi devs,
 
  I would like to have more information about the status of two
  components of adb(-codegen):
 
  1) SOAP encoding support for ADB (see [1]). Last status that I see is
  that it is incomplete [2] or unsupported [3]. Can somebody clarify
  this? Note that the code that implements this is largely based on
  generated code that has been modified by hand afterwards. There seems
  to be no information on how one would regenerate these classes, making
  them almost unmaintainable.
 
  yes. It is not complete.
  The generated code is for the data types in the soap encoding schema.  I
 had
  to manually change some code since soap encoding does not necessarily
 follow
  the xml schemas. So it is not mean to regenerate.

 Amilas,

 Does not complete mean not usable, or are there people using it for
 some particular cases?

I don't think anyone using it.

 In other words, is it something that we should
 maintain or is it a candidate for removal (in case the burden of
 maintaining it gets too high)?

What the the maintaining cost you see?
I think it is better to keep it unless you have a better idea to implement
it and implements it. I can
complete it whenever I get time (although not sure when it happens :)).

thanks,
Amila.



 
  2) Helper mode for ADB. In this mode, the schema compiler splits the
  bean and the parser/serializer code into different classes. While this
  is a nice feature, it seems to be obsolete [4] or deprecated [5]. At
  least the corresponding part of the template is not up to date. The
  specific problem here is that the test coverage of this feature is
  zero, again making it unmaintainable. So we should either update this
  feature and have an appropriate level of test coverage or scrap it.
 
  As I see no one currently use this feature and it is obsolete.

 Actually, I kind of like this feature (except for the fact that it has
 been implemented by copy  paste...). I took some action to safeguard
 the current implementation, i.e. to avoid further degradation.

 Regards,

 Andreas

  thanks,
  Amila.
 
 
 
  Regards,
 
  Andreas
 
  [1] http://markmail.org/thread/htchm4nsbywlnzi4
  [2] http://markmail.org/message/xkzefcaxrfio5zsm
  [3] http://markmail.org/message/vhayn365l6hrgvmo
  [4] http://markmail.org/message/wfoynhc6i6k5r76u
  [5] http://markmail.org/message/rcvtjvrelwncv7a6
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Any plans for WSDL2Java to generate services.xml including WS-Policy?

2009-07-09 Thread Amila Suriarachchi
On Fri, Jul 10, 2009 at 5:20 AM, Dennis Sosnoski d...@sosnoski.com wrote:

 The WSDL2Java codegen for server-side deployment appears to ignore any
 WS-Policy information in the WSDL (unlike the client-side code generation,
 which builds code to attach the policy information to the appropriate
 description components). Are there any plans to include WS-Policy
 information in the generated services.xml so that users starting from WSDL
 won't need to add this manually?


When generating the code for server side it adds the wsdl to the service
archive. Therefore at the deployment time Axis2 builds the Axis object
structure using the given wsdl and hence Axis2 object structure contains the
polices.
Isn't this work for you? But I think you need to add the rampart specific
polices (keystore, passwords) to service.xml.

thanks,
Amila.


  - Dennis

 --
 Dennis M. Sosnoski
 Java XML and Web Services
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Status of ADB SOAP encoding and helper mode

2009-06-29 Thread Amila Suriarachchi
On Sat, Jun 27, 2009 at 1:15 AM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 Hi devs,

 I would like to have more information about the status of two
 components of adb(-codegen):

 1) SOAP encoding support for ADB (see [1]). Last status that I see is
 that it is incomplete [2] or unsupported [3]. Can somebody clarify
 this? Note that the code that implements this is largely based on
 generated code that has been modified by hand afterwards. There seems
 to be no information on how one would regenerate these classes, making
 them almost unmaintainable.


yes. It is not complete.
The generated code is for the data types in the soap encoding schema.  I had
to manually change some code since soap encoding does not necessarily follow
the xml schemas. So it is not mean to regenerate.



 2) Helper mode for ADB. In this mode, the schema compiler splits the
 bean and the parser/serializer code into different classes. While this
 is a nice feature, it seems to be obsolete [4] or deprecated [5]. At
 least the corresponding part of the template is not up to date. The
 specific problem here is that the test coverage of this feature is
 zero, again making it unmaintainable. So we should either update this
 feature and have an appropriate level of test coverage or scrap it.


As I see no one currently use this feature and it is obsolete.

thanks,
Amila.





 Regards,

 Andreas

 [1] http://markmail.org/thread/htchm4nsbywlnzi4
 [2] http://markmail.org/message/xkzefcaxrfio5zsm
 [3] http://markmail.org/message/vhayn365l6hrgvmo
 [4] http://markmail.org/message/wfoynhc6i6k5r76u
 [5] http://markmail.org/message/rcvtjvrelwncv7a6




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Question on CLOSE_WAIT

2009-06-11 Thread Amila Suriarachchi
On Wed, Jun 10, 2009 at 8:17 PM, John, Joel Muthuraj (LNG-CON) 
joel.muthu...@lexisnexis.com wrote:

  Hi,

 This is related to https://issues.apache.org/jira/browse/AXIS2-935. I am
 having the same problem. I have a number of connections in CLOSE_WAIT state
 which leads to “Too many files” error. As per the notes/comments in
 https://issues.apache.org/jira/browse/AXIS2-935, this defect has been
 fixed. Could you please confirm if it is fixed in axis2 v1.5?


yes. I did some tests and I could solve this issue reusing the httpClient.
Please have a look at here[1].

thanks,
Amila.

[1]
http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-transport.html



 Regards,

 *Joel Muthuraj John*

 937-865-6800 x55096

 joel.muthu...@lexisnexis.com






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Planning for release 1.5.1

2009-06-11 Thread Amila Suriarachchi
hi,

I think GUI issues are not highly critical issues since those features
anyway can be done by using configuration files.
But if we have CLOSE_WAIT issue it is a good enough reason to go for a new
release. Actually I sent a mail regarding this before the release and there
was no any response.

What about doing a 1.6 release after 2-3 months time. As I remember we cut
the 1.5 branch last year. And there may be more this kind of issues being
reported by that time.

thanks,
Amila.


On Thu, Jun 11, 2009 at 3:25 AM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 [Switching to dev list; first part of the discussion is in AXIS2-4371]
  +1, Andreas.  Can you merge your fixes over to the branch and I'll update
 the version number over there?

 Does it mean that we continue to use the existing 1.5 branch? Do we
 have a tool (Maven release plugin?) to change the version numbers or
 can this only be done manually?

 There is also another decision to take: if we start to work on 1.5.1,
 we will run again into the module version mess: we will have to use
 1.51 instead of 1.5.1 for the version number of all modules. I fixed
 this issue on the trunk (see AXIS2-4034), so we need to decide if we
 merge these changes to the 1.5 branch. Note that the price to pay is a
 minor API change in the AxisModule class (the version attribute is no
 longer a String, but a Version object).

 Andreas




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Bring back hours, minutes, seconds when Date is formatted in SimpleTypeMapper

2009-06-11 Thread Amila Suriarachchi
On Thu, Jun 11, 2009 at 8:02 PM, Pétur Runólfsson pe...@betware.com wrote:

 Hi,

 It seems that the schema type for java.util.Date has changed from
 xs:dateTime to xs:date in Axis2 1.5. This is preventing me from upgrading,
 since the application depends on having both the date and time available for
 many operations.


Now the convention is to map java.util.Date to xs:date and
java.util.Calendar to xs:datetime
is it possible you to convert your app to use Calendar instead of date where
you need to have datetime.
here the reason is that if you represent something like birthday which
represent in java as java.util.date and should map to a xs:date.

thanks,
Amila.




 The attached patch adds a configuration option to change the schema type
 back to xs:dateTime. When the service parameter JavaDateSchemaType is set to
 xs:dateTime, the format used by SimpleTypeMapper is
 -MM-dd'T'HH:mm:ss.SSSZ, otherwise it is -MM-dd like before. Note
 that the format is different from Axis2 1.4.1 because of the TimeZone
 parameter that was added in 1.5. Setting the TimeZone to GMT restores the
 old behavior completely.

 This patch only modifies the formatting in SimpleTypeMapper. Java2WSDL
 still treats Date as xs:date. This doesn't matter for me, since the schema
 is easy to fix using a custom SchemaGenerator or by running the wsdl through
 sed. Still, it doesn't seem hard to add the corresponding support to
 Java2WSDL.

 This fixes issues AXIS2-4329 and AXIS2-4370.

 Regards,

 Pétur Runólfsson
 Betware

 The content of this e-mail, together with any of its attachments, is for
 the exclusive and confidential use of the named addressee(s) and it may
 contain legally privileged and confidential information and/or copyrighted
 material. Any other distribution, use or reproduction without the sender's
 prior consent is unauthorized and strictly prohibited. If you have by
 coincidence, mistake or without specific authorization received this e-mail
 in error, please notify the sender by e-mail immediately, uphold strict
 confidentiality and neither read, copy, transfer, disseminate, disclose nor
 otherwise make use of its content in any way and delete the material from
 your computer.

 The content of the e-mail and its attachments is the liability of the
 individual sender, if it does not relate to the affairs of Betware.
 Betware does not assume any civil or criminal liability should the e-mail
 or it´s attachments be virus infected.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


[Axis2] Difference between mex-xxx.jar file and mex-xxx.mar file.

2009-06-09 Thread Amila Suriarachchi
hi,

It seems like both mex-xxx.jar and mex-xxx.mar files have the same content.

Since mex-xxx.jar file contains a module.xml file it tries to deploy as a
module when the server starts up.
I think we need to remove module.xml part from the jar file.

thanks,
Amila.

-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Difference between mex-xxx.jar file and mex-xxx.mar file.

2009-06-09 Thread Amila Suriarachchi
On Tue, Jun 9, 2009 at 2:38 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 Amila,

 I would also like to point out that:
 - there is a mex-xxx-impl.jar;
 - the MAR file is not deployed to the (local|snapshot) Maven repository;
 - the Maven build (and the type of artifacts) is not consistent
 between mex, addressing, mtompolicy, etc.

 So we should agree on a consistent way to build the MARs and apply
 that to all of them.

+1



 One additional question: in which circumstances do you need the
 mex-xxx.jar in the classpath without deploying it as a module?


Generally any mar file can put to the class path and use it. This is useful
in client side.
Users can engage modules with out  creating a configuration context object
and a repository.

thanks,
Amila.



 Regards,

 Andreas

 On Tue, Jun 9, 2009 at 08:31, Amila
 Suriarachchiamilasuriarach...@gmail.com wrote:
  hi,
 
  It seems like both mex-xxx.jar and mex-xxx.mar files have the same
 content.
 
  Since mex-xxx.jar file contains a module.xml file it tries to deploy as a
  module when the server starts up.
  I think we need to remove module.xml part from the jar file.
 
  thanks,
  Amila.
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: svn commit: r779507 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: description/AxisDescription.java description/AxisServiceGroup.java engine/AxisConfiguration.java engin

2009-05-28 Thread Amila Suriarachchi
() {
  +   return axisDiscription;
  +}
 
   }
 
 
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: How to build new soap envelope and send to the client as a response from the OutFlow handler

2009-05-19 Thread Amila Suriarachchi
On Tue, May 19, 2009 at 12:10 PM, Senthil Sona sws...@cisco.com wrote:


 Hi team,

   In my client program, I have Sandesha and rampart engaged. I want to
 create a new response and send to the client from the outflow handler .
 Could you please tell me how can u do this.


Try to change the soapEnvelop of the message context.

thanks,
Amila.



 Thanks,
 Swapna Soni.
 --
 View this message in context:
 http://www.nabble.com/How-to-build-new-soap-envelope-and-send-to-the-client-as-a-response-from-the-OutFlow-handler-tp23610560p23610560.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [VOTE] Release Axis2 1.5

2009-05-18 Thread Amila Suriarachchi
+1 (binding)

thanks,
Amila.

On Sun, May 17, 2009 at 10:40 PM, Deepal jayasinghe deep...@gmail.comwrote:

 +1 (binding) for the release.

 Thanks,
 Deepal
  Hi Axis Developers:
 
  The 1.5 release candidate has been stable for a couple of weeks now, and
 thus
  I'd like to kick off a VOTE to officially release 1.5.  The usual 72 hour
  window applies.
 
  You can find the distribution files in here:
 
 
 http://people.apache.org/~gdaniels/stagingRepo/org/apache/axis2/distribution/1.5/http://people.apache.org/%7Egdaniels/stagingRepo/org/apache/axis2/distribution/1.5/
 
  And the M2 repository with everything is at:
 
  http://people.apache.org/~gdaniels/stagingRepohttp://people.apache.org/%7Egdaniels/stagingRepo
 
  The SVN tag is:
 
  https://svn.apache.org/repos/asf/webservices/axis2/tags/java/v1.5RC
 
  ...and I'll add a proper v1.5 tag as soon as this release goes final.
 
  Please offer your VOTE (and indicate binding/non-binding).
 
  Here's my +1 (binding).
 
  Many thanks,
  --Glen
 
 


 --
 Thank you!


 http://blogs.deepal.org
 http://deepal.org




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Child first class loading

2009-05-18 Thread Amila Suriarachchi
On Mon, May 18, 2009 at 8:36 PM, Jason Fager jason.fa...@riskmetrics.comwrote:

 A better analogy for this would be Tomcat, wouldn't it?

 http://tomcat.apache.org/tomcat-5.5-doc/printer/class-loader-howto.html

 I think the key point here is that simple child-first/parent-last isn't
 quite right:  Bootstrap and System (in that order) should come first, so
 that critical classes can't be overridden and so that the user has a chance
 to change things at startup by setting the CLASSPATH variable.


the child first class loading only effect at the service or module level.

Although it is a possibility I think it is a rear case some one need to
change the axis2-kernal
class in his service or module. On the other hand if some one really needs
it, why we need to stop it.

I agree with you that Tomcat has a much better class loading hierarchy. But
IMHO in this stage we should not try to make it complicated specially with
class loading.

thanks,
Amila.




 - Jason





  I think that if somebody places a class in a MAR/AAR, his  expectation
  is that the particular class in concern will be loaded from the
  MAR/AAR. If he places that class somewhere up in the classloader
  hierarchy (and not in the MAR/AAR), his expectation is that the class
  will be loaded from the parent. So it is basically up to the user to
  decide where to place the class. So I think having child first
  classloading should be OK, and that we do not require a parameter to
  control this. If a user is placing the class in the MAR/AAR as well as
  higher up in the hierarchy, it may indicate bad design on the user's
  part, which he needs to be fixed anyway.
 
  Taking OSGi as an analogy, one bundle may get wired to one other
  bundle which exports a particular package, even though there are
  multiple bundles exporting the same package (different versions of it
  possibly), which forces the user to think through the wiring, which is
  a good thing.
 
  Azeez
 
  On Fri, May 15, 2009 at 8:05 PM, Andreas Veithen
  andreas.veit...@gmail.com wrote:
  +1 for allowing parent last class loading, but -1 for making it the
  default. The reason is that I once worked on a larger project where we
  had to use parent last class loading (because we needed a newer
  version of some library that was exposed by the app server), and from
  that experience I know that using this policy leads to issues that are
  very hard to debug. If we make it the default, I expect that it will
  break many existing services that users have built.
 
  We should really make it configurable, with the parent first policy as
  default. The interesting question is at what level this should be
  configured. I would say that it should be an option in
  service.xml/module.xml, but that makes it probably a bit more
  difficult to implement.
 
  Andreas
 
  On Fri, May 15, 2009 at 16:14, Amila Suriarachchi
  amilasuriarach...@gmail.com wrote:
  hi all,
 
  Currently Axis2 follows the parent first class loading for service and
  module loading.
 
  The reason for this is it uses DeploymentClassLoader loader which is
  extended from the ClassLoader class.
 
  The loadClass method of the ClassLoader class looks like this.
 
  protected synchronized Class? loadClass(String name, boolean resolve)
  throws ClassNotFoundException
  {
  // First, check if the class has already been loaded
  Class c = findLoadedClass(name);
  if (c == null) {
  try {
  if (parent != null) {
  c = parent.loadClass(name, false);
  } else {
  c = findBootstrapClass0(name);
  }
  } catch (ClassNotFoundException e) {
  // If still not found, then invoke findClass in order
  // to find the class.
  c = findClass(name);
  }
  }
  if (resolve) {
  resolveClass(c);
  }
  return c;
  }
 
  it first check for parent class loader classes and then for its
 classes. So
  we can add child first class loading simply reversing this order in a
  override loadClass method as follows.
 
  protected synchronized Class? loadClass(String name, boolean resolve)
  throws ClassNotFoundException {
 
  Class c = findLoadedClass(name);
  if (c == null) {
  try {
  c = findClass(name);
  } catch (Exception e) {
  c = super.loadClass(name, resolve);
  }
  }
  return c;
  }
 
  I have attach the patch here[1].
 
  I tested this with a sample service and it worked fine. Will do some
 tests
  with the modules as well.
 
  I think this should be the default behaviour to axis2 since it allows
 people
  to use their own classes at the service/module level.
 
  Any thoughts?
 
  thanks,
  Amila.
 
 
  [1] https://issues.apache.org/jira/browse/AXIS2-4349
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 
 
 
 
 
  --
  Thanks
  Afkham Azeez
 
  Blog: http

[Axis2] Child first class loading

2009-05-15 Thread Amila Suriarachchi
hi all,

Currently Axis2 follows the parent first class loading for service and
module loading.

The reason for this is it uses DeploymentClassLoader loader which is
extended from the ClassLoader class.

The loadClass method of the ClassLoader class looks like this.

protected synchronized Class? loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
// First, check if the class has already been loaded
Class c = findLoadedClass(name);
if (c == null) {
try {
if (parent != null) {
c = parent.loadClass(name, false);
} else {
c = findBootstrapClass0(name);
}
} catch (ClassNotFoundException e) {
// If still not found, then invoke findClass in order
// to find the class.
c = findClass(name);
}
}
if (resolve) {
resolveClass(c);
}
return c;
}

it first check for parent class loader classes and then for its classes. So
we can add child first class loading simply reversing this order in a
override loadClass method as follows.

protected synchronized Class? loadClass(String name, boolean resolve)
throws ClassNotFoundException {

Class c = findLoadedClass(name);
if (c == null) {
try {
c = findClass(name);
} catch (Exception e) {
c = super.loadClass(name, resolve);
}
}
return c;
}

I have attach the patch here[1].

I tested this with a sample service and it worked fine. Will do some tests
with the modules as well.

I think this should be the default behaviour to axis2 since it allows people
to use their own classes at the service/module level.

Any thoughts?

thanks,
Amila.


[1] https://issues.apache.org/jira/browse/AXIS2-4349



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Child first class loading

2009-05-15 Thread Amila Suriarachchi
On Fri, May 15, 2009 at 8:05 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 +1 for allowing parent last class loading, but -1 for making it the
 default. The reason is that I once worked on a larger project where we
 had to use parent last class loading (because we needed a newer
 version of some library that was exposed by the app server), and from
 that experience I know that using this policy leads to issues that are
 very hard to debug. If we make it the default, I expect that it will
 break many existing services that users have built.


I agree with you. Lets keep it as an option to configure since that may
cause
unexpected problems for existing systems.



 We should really make it configurable, with the parent first policy as
 default. The interesting question is at what level this should be
 configured. I would say that it should be an option in
 service.xml/module.xml, but that makes it probably a bit more
 difficult to implement.

Good suggestion.  I'll try to put it at service.xml/module.xml level. If it
really hard
then can only allow at axis2.xml

thanks,
Amila.



 Andreas

 On Fri, May 15, 2009 at 16:14, Amila Suriarachchi
 amilasuriarach...@gmail.com wrote:
  hi all,
 
  Currently Axis2 follows the parent first class loading for service and
  module loading.
 
  The reason for this is it uses DeploymentClassLoader loader which is
  extended from the ClassLoader class.
 
  The loadClass method of the ClassLoader class looks like this.
 
  protected synchronized Class? loadClass(String name, boolean resolve)
  throws ClassNotFoundException
  {
  // First, check if the class has already been loaded
  Class c = findLoadedClass(name);
  if (c == null) {
  try {
  if (parent != null) {
  c = parent.loadClass(name, false);
  } else {
  c = findBootstrapClass0(name);
  }
  } catch (ClassNotFoundException e) {
  // If still not found, then invoke findClass in order
  // to find the class.
  c = findClass(name);
  }
  }
  if (resolve) {
  resolveClass(c);
  }
  return c;
  }
 
  it first check for parent class loader classes and then for its classes.
 So
  we can add child first class loading simply reversing this order in a
  override loadClass method as follows.
 
  protected synchronized Class? loadClass(String name, boolean resolve)
  throws ClassNotFoundException {
 
  Class c = findLoadedClass(name);
  if (c == null) {
  try {
  c = findClass(name);
  } catch (Exception e) {
  c = super.loadClass(name, resolve);
  }
  }
  return c;
  }
 
  I have attach the patch here[1].
 
  I tested this with a sample service and it worked fine. Will do some
 tests
  with the modules as well.
 
  I think this should be the default behaviour to axis2 since it allows
 people
  to use their own classes at the service/module level.
 
  Any thoughts?
 
  thanks,
  Amila.
 
 
  [1] https://issues.apache.org/jira/browse/AXIS2-4349
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Improving Axis Observer behaviour

2009-05-15 Thread Amila Suriarachchi
On Fri, May 15, 2009 at 3:21 AM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 Deepal,

 I think that simply adding a new method to AxisObserver is still a
 valid alternative, especially because this would not break binary
 compatibility.

 Another solution is to take the point of view that AxisObserver should
 be strictly limited to lifecycle events (deploy, undeploy, start,
 stop) of various AxisDescription implementations and that therefore
 the proposed extension has no place there. One would then define a new
 listener type and add methods to AxisConfiguration to
 register/unregister these listeners. This has the additional advantage
 that it would be much easier to document (which is an aspect not yet
 fully taken into account in the current version of the patch).


hi Andreas,

Could you please attach a patch for you suggestion?
Since anyway we have agreed to do some API changes to next Axis2 release it
is better to
do this change in a nice way in the expense of API changes.

thanks,
Amila.



 Andreas

 On Thu, May 14, 2009 at 15:56, Deepal jayasinghe deep...@gmail.com
 wrote:
  I know  :'( , do you have anything else in your mind ?
 
  Deepal
  Looks quite ugly :-)
 
  Andreas
 
  On Wed, May 13, 2009 at 22:07, Deepal jayasinghe deep...@gmail.com
 wrote:
 
  You are correct, how about the following (I know which is not 100%
 correct)
 
  Let's change AxisEvent to hold the reference to an AxisDescription. We
  can set that only if the even type is engage of disengage, for example
  if we engage to a service then description would be an AxisService.
 
  What do you think?
 
  Deepal
 
  Then you don't get the information about the service or operation on
  which the module has been engaged...
 
  Andreas
 
  On Wed, May 13, 2009 at 21:51, Deepal jayasinghe deep...@gmail.com
 wrote:
 
 
  Andreas,
 
  Great you brought this,
 
  how about changing the AxisEvent to have moduleEngage and disEngage
  events, and then use the following existing method
 
  void moduleUpdate(AxisEvent event, AxisModule module);
 
  If you do so we have enough information, and no changes to API.
 
  Deepal
 
 
  Deepal,
 
  The question is how to best implement this (see AXIS2-4347). There
 are
  two options:
 
  1. Use an existing method of the AxisObserver interface and only
  define a new event type. Disadvantage: We can only provide limited
  information to the observer. Advantage: No modification of the API
  required.
 
  2. Define a new method in AxisObserver. Advantage: We can pass the
  AxisModule and AxisDescription object to the method. Disadvantage:
  This will break existing AxisObserver implementations (at build
 time,
  not at runtime).
 
  What is your opinion?
 
  I recently worked with AxisObserver in the context of the transports
  and I think that anyway we should add an AbstractAxisObserver (with
  empty default implementations for the methods defined in
 AxisObserver)
  and change the Javadoc of AxisObserver to recommend extending
  AbstractAxisObserver instead of implementing AxisObserver directly.
  This pattern makes sure that in the future we can add new methods to
  AxisObserver without breaking anything.
 
  Andreas
 
  On Wed, May 13, 2009 at 15:28, Deepal jayasinghe deep...@gmail.com
 wrote:
 
 
 
  go for it.
 
  Deepal
 
 
 
  Hi ,
 
  Currently AxisObserver does not get notified when a Module engaged
 or
  disengaged in the Runtime.
  So to have that behaviour i would like purpose to add  two Axis
 events
  Named MODULE_ENGAGED , MODULE_DISENGAGED
 
  and in the new behaviour  when a module get engaged/disengaged to
 a
  Service or to an Operation AxisObserver will get notified with
  above Events.
  So if there is no issues regarding this improvement i would like
 to
  provide a patch to Axis2 trunk
 
  thank you,
 
  Charith Dhanushka Wickramarachchi
  http://charithwiki.blogspot.com/
 
 
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 
 
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 
 
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 
 
 
 
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: How to terminate InFlow and start OutFlow in the custom handler of axis2

2009-05-14 Thread Amila Suriarachchi
On Thu, May 14, 2009 at 11:47 AM, Senthil Sona sws...@cisco.com wrote:


 Hi Amila,

I have set the written the below code in my custom module.

 public InvocationResponse invoke(MessageContext msgContext) throws
 AxisFault {
if(msgContext.getFLOW()==1)
  {
 MessageContext faultContext =

 MessageContextBuilder.createFaultMessageContext(msgContext, new
 AxisFault(validation failed error, new QName(validation error,
 wsa)));
 AxisEngine.sendFault(faultContext);


here as I told you earlier try to throw the AxisFault()

i.e throw new AxisFault(validation error);

then the fault sending part is done at the transport level.

thanks,
Amila.


  }
  return InvocationResponse.ABORT;
}

 But when running the client program i am getting error at client console
 like

 org.apache.axis2.AxisFault: The input stream for an incoming message is
 null.
at

 org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72)
at

 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
 at

 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at

 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
at
 org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:127)
at
 org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:486)
at
 org.apache.rampart.util.RampartUtil.getSecConvToken(RampartUtil.java:396)
at

 org.apache.rampart.builder.SymmetricBindingBuilder.initializeTokens(SymmetricBindingBuilder.java:670)

 For outFaultFlow i am calling same handler and wrote the code like

   if(msgContext.getFLOW()==4) {
System.out.println(This is OutFaultFlow);
System.out.println(
 messagecontext==+msgContext.getEnvelope());
   }
 So its printing the fault soap resonse

 ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:s
 oapenv=http://www.w3.org/2003/05/soap-envelope
 soapenv:Bodysoapenv:Fault
 xm
 lns:axis2ns5=validation
 errorsoapenv:Codesoapenv:Valueaxis2ns5:wsa/soape
 nv:Value/soapenv:Codesoapenv:Reasonsoapenv:Text
 xml:lang=en-USvalidatio
 n failed error/soapenv:Text/soapenv:Reasonsoapenv:Detail
 //soapenv:Fault
 /soapenv:Body/soapenv:Envelope

 I want this response should be printed at client console. How can i do
 this,
 please help me. Its stopping our  productivity.

 I have uploaded the Handler class and client class. Could you please have a
 webex session with us. So that we can show you our complete code and how
 the
 program is behaving when we run the client. It will help us to resolve the
 problem soon.

 Thanks,
 Swapna Soni.


 Amila Suriarachchi wrote:
 
  On Wed, May 13, 2009 at 8:48 PM, Senthil Sona sws...@cisco.com wrote:
 
 
  Hi Deepal,
 
 I have added the code in the handler class like
 
 if(msgContext.getFLOW()==1)
 {
  logger.info(This is inFlow);
   System.out.println(This is inFlow);
  MessageContext faultContext =
 
  MessageContextBuilder.createFaultMessageContext(msgContext, new
  AxisFault(validation failed error, new QName(validation error,
  wsa)));
  AxisEngine.sendFault(faultContext);
 
 
  it is bit difficult to answer your question without looking all your
 code.
  But try this.
 
 
  if you want to send a soap fault to client side, throw an AxisFault here.
  When you throw an AxisFault it is caught at the transport level and it
  sends
  the fault message by calling to fault flow.
 
  if you want to send a normal soap message do this,
 
  MessageContext outMsgContext =
  MessageContextBuilder.createOutMessageContext(msgContext);
  AxisEngine.send(outMsgContext);
  return InvocationResponse.ABORT
 
  here it is important to return InvocationResponse.ABORT to terminate the
  inFlow.
 
  thanks,
  Amila.
 
 
 
 }
 
   I am using the same handler class for inflow and outfault flow thats
 why
  i
  am checking if(msgContext.getFLOW()==1). At client console i am getting
  error like
 
  org.apache.axis2.AxisFault: validation failed error
 at
 
 
 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
 at
 
 
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
 at
 
 
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
 at
 
 
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
 at
 
 org.apache.axis2.client.OperationClient.execute(OperationClient.java

Re: How to terminate InFlow and start OutFlow in the custom handler of axis2

2009-05-14 Thread Amila Suriarachchi
On Thu, May 14, 2009 at 7:20 PM, Senthil Sona sws...@cisco.com wrote:


 Hi Deepal,

  I am having a if condition in my handler class. I have uploaded the
 handler class and client class to this forum. Could you please look in to
 those and let me me know if i am doing anything wrong? As i mentioned in my
 last reply i am getting AxisFault error saying first element must contain
 localname Envelope but found html.


Can you check your response with a tcpmon. Then you can see the actual
problem. I think you send the message to wrong epr.


I want client should get fault response.
 Sandesha


I think it is better to test step by step. first test with out sandesa if
you get the correct error message without sandesha then you can sure about
it. Then try with sandesha.

thanks,
Amila.

 is also keep on sending the request because its not getting
 acknowledgement.
   Could you please have a webex session with us if possible. So that we can
 explain you our problem very clearly. I have been trying this functionality
 from past 20 days. Its consuming lot of time. Please hlep me out.
   In axis2.xml file also i am calling custom module phase first and then
 RMphase bothin INFlow and OutFaultFlow.

 Thanks,
 Swapna Soni.



 Deepal Jayasinghe-2 wrote:
 
  Hi,
 
  I think what Amila suggested is correct too (and easy as well), just
  throw the exception from the handler then transport receiver will handle
  the sending part. I think that is the easiest way.  If you are using
  same handler for both in-flow and in-fault flow then just have a if
  condition and handle the logic.
 
  Deepal
  Hi Deepal/Amila,
 
   Could you please reply me, how to resolve this exception. This task
  is
  very urgent for me.
 
  Thanks,
  Swapna Soni.
 
  Amila Suriarachchi wrote:
 
  On Thu, May 14, 2009 at 11:47 AM, Senthil Sona sws...@cisco.com
 wrote:
 
 
  Hi Amila,
 
 I have set the written the below code in my custom module.
 
  public InvocationResponse invoke(MessageContext msgContext)
  throws
  AxisFault {
 if(msgContext.getFLOW()==1)
   {
  MessageContext faultContext =
 
  MessageContextBuilder.createFaultMessageContext(msgContext, new
  AxisFault(validation failed error, new QName(validation error,
  wsa)));
  AxisEngine.sendFault(faultContext);
 
 
  here as I told you earlier try to throw the AxisFault()
 
  i.e throw new AxisFault(validation error);
 
  then the fault sending part is done at the transport level.
 
  thanks,
  Amila.
 
 
   }
   return InvocationResponse.ABORT;
 }
 
  But when running the client program i am getting error at client
  console
  like
 
  org.apache.axis2.AxisFault: The input stream for an incoming message
 is
  null.
 at
 
 
 org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72)
 at
 
 
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
  at
 
 
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
 at
 
 
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
 at
 
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
 at
 
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
 at
 
 org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:127)
 at
  org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:486)
 at
 
 org.apache.rampart.util.RampartUtil.getSecConvToken(RampartUtil.java:396)
 at
 
 
 org.apache.rampart.builder.SymmetricBindingBuilder.initializeTokens(SymmetricBindingBuilder.java:670)
 
  For outFaultFlow i am calling same handler and wrote the code like
 
if(msgContext.getFLOW()==4) {
 System.out.println(This is OutFaultFlow);
 System.out.println(
  messagecontext==+msgContext.getEnvelope());
}
  So its printing the fault soap resonse
 
  ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:s
  oapenv=http://www.w3.org/2003/05/soap-envelope
  soapenv:Bodysoapenv:Fault
  xm
  lns:axis2ns5=validation
  errorsoapenv:Codesoapenv:Valueaxis2ns5:wsa/soape
  nv:Value/soapenv:Codesoapenv:Reasonsoapenv:Text
  xml:lang=en-USvalidatio
  n failed error/soapenv:Text/soapenv:Reasonsoapenv:Detail
  //soapenv:Fault
  /soapenv:Body/soapenv:Envelope
 
  I want this response should be printed at client console. How can i do
  this,
  please help me. Its stopping our  productivity.
 
  I have uploaded the Handler class and client class. Could you please
  have
  a
  webex session with us. So that we can show you our complete code and
  how
  the
  program is behaving when we run the client. It will help us to resolve
  the
  problem soon.
 
  Thanks,
  Swapna Soni.
 
 
  Amila Suriarachchi wrote:
 
  On Wed, May 13

Re: How to terminate InFlow and start OutFlow in the custom handler of axis2

2009-05-13 Thread Amila Suriarachchi
 there client
  should
  get response via outFlow or outFaultFlow.
 
 We are engaging the sandesha and rampart from in the client program
  only.
 
   sender.engageModule(addressing);
   sender.engageModule(sandesha2);
 
  options.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,
  Yash_Seq);
   sender.engageModule(rampart);
 
 
  options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
 
 loadPolicy(C:/WS-X/misc/20090427/WTPTestRM2Client/WebContent/WEB-INF/conf/policy.xml));
 
  Could you please let us know how to achieve this functionality.
 
  Thanks,
  Swapna Soni.
 
  Deepal Jayasinghe-2 wrote:
 
  Behavior will be different based on the dispatch status, but you can
  simply call.
 
  AxisEngine.sendFault(messageContext)
 
  Then it will send  the fault
 
  -  Deepal
 
  Hi Axis Team,
 
  I have one very urgent requirement. One client program invokes the
  service in which sandesha, rampart and one custom module is engaged.
 In
  custom Inflow handler we do some validation. If something is wrong in
  that
  validation, then we want it to start the outFlow and send the custom
  response to client back without executing further engaged modules and
  without invoking service.
 
 Could anyone please tell me how can i do this using axis2 api. Its
  very
  very urgent requirement for us.
 
  Thanks,
  swapna soni
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 
 
 
 
 
 
 
  --
  Thank you!
 
 
  http://blogs.deepal.org
  http://deepal.org
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-terminate-InFlow-and-start-OutFlow-in-the-custom-handler-of-axis2-tp23521710p23523940.html
 Sent from the Axis - Dev mailing list archive at Nabble.com.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 API design issue, Should we fix it?

2009-05-11 Thread Amila Suriarachchi
On Mon, May 11, 2009 at 1:45 PM, Andreas Veithen
andreas.veit...@gmail.comwrote:

 +1, but we need to agree on the target release for this change.


I think this should not go to 1.5 and only apply to axis2 trunk (i.e 1.6).

thanks,
Amila.



 Andreas

 On Mon, May 11, 2009 at 09:57, keith chapman keithgchap...@gmail.com
 wrote:
  Shall we go ahead with this change then?
 
  Thanks,
  Keith.
 
  On Wed, May 6, 2009 at 7:11 PM, Amila Suriarachchi
  amilasuriarach...@gmail.com wrote:
 
 
  On Wed, May 6, 2009 at 4:33 PM, Glen Daniels g...@thoughtcraft.com
  wrote:
 
  Amila Suriarachchi wrote:
   Hm - it seems like you didn't actually get my point.  We CAN'T
   return the
   actual allServices map because that would be breaking the
   abstraction
   boundary provided by the class.
  
   As I remember this change was done to avoid concurrent modifications
 to
   service map[1].
 
  Right - before this change we were doing something actively bad/wrong,
  i.e.
  returning the internal map.  After the change we were returning a
 cloned
  copy
  of the map (though not using clone() for some reason), which is good in
  that
  it prevented people from misusing it.
 
   At that time services map was a HashMap and could not fix the issue
 by
   changing it to a ConcurrentHashMap since API method returns a
 HashMap.
  
   Currently anyone can get a copy of internal map (I think we can not
 use
   clone() method since internal implementation is ConcurrentHashMap and
   we
   need to return a HashMap). And if they want to add or remove service
   they have to use addService and removeService respectively.
  
   Keith, if you really need the internal map IMHO best way is to add a
   new
   API method.
 
  Ah, no.  The best way is NOT TO OFFER ACCESS TO THE INTERNAL MAP.
 
  Keith's suggestion is to change the API so that it returns a Map - this
  would
  be much more correct since it increases the level of abstraction for
 the
  method, and would therefore let us, the implementors, freely decide how
  this
  should work internally.  Right now we have problems because someone
 made
  this
  method overly specific, and this is what we should fix.  (I was
 incorrect
  earlier when I said this wouldn't break people, btw - I was thinking
  about
  stuff like getServices().get(MyService), but of course HashMap foo =
  getServices() would fail.  I still think we should fix it.)
 
  My comment is that we should not only return a Map, we should change
 the
  implementation to make sure the Map is immutable, and make sure the
  JavaDoc
  explains what is going on.
 
  +1. Here the real problem is this API contains a hashMap instead of Map.
 
  What I got from the Keiths' first mail is that he need the API change to
  return the internal map without copying. I suggested to add a new method
 if
  he really need it so that only he use that method. I agree with you that
  this is not a good change.
 
  thanks,
  Amila.
 
 
  Make sense?
 
  --Glen
 
 
 
  --
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/
 
 
 
  --
  Keith Chapman
  Senior Software Engineer
  WSO2 Inc.
  Oxygenating the Web Service Platform.
  http://wso2.org/
 
  blog: http://www.keith-chapman.org
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 API design issue, Should we fix it?

2009-05-06 Thread Amila Suriarachchi
On Wed, May 6, 2009 at 9:49 AM, Glen Daniels g...@thoughtcraft.com wrote:

 keith chapman wrote:
  Um - we aren't currently returning the actual Map, we're returning a
  clone of
  it (just done manually instead of using clone()).  You had suggested
  returning the actual Map itself, which is what I was reacting to
  above.  I'm
  not saying the API should go away.
 
  The reason we have implemented a clone is the limitation in the API. If
  the return type was Map we could have returned the allServices map.
  Wouldn't this clone be expensive when there are lots of services
 deployed?

 Hm - it seems like you didn't actually get my point.  We CAN'T return the
 actual allServices map because that would be breaking the abstraction
 boundary provided by the class.  There is (and should be) a contract about
 how you add and remove services - if you don't follow the contract, then
 stuff like engaging global modules doesn't happen.  In our case this stuff
 lives in the code in addServiceGroup() (whether or not that's where it
 should
 live is debatable, but the point is that it exists).  If someone were to
 mess
 around with the actual contents of allServices, that would produce
 undefined
 results.

 This is basic OOP - don't expose the inner workings of your class by
 offering
 mutable references to private data.

 Instead of cloning, we could just use Collections.unmodifiableMap() for
 speed, but we'd need to be clear (in the code and the JavaDoc) whether
 we're
 returning a moment in time (i.e. a clone()) or a live view (which is I
 think what unmodifiableMap() gives you) - i.e. if some other thread deploys
 a
 service while I have the reference, can I see the new service or not?


As I remember this change was done to avoid concurrent modifications to
service map[1].
At that time services map was a HashMap and could not fix the issue by
changing it to a ConcurrentHashMap since API method returns a HashMap.

Currently anyone can get a copy of internal map (I think we can not use
clone() method since internal implementation is ConcurrentHashMap and we
need to return a HashMap). And if they want to add or remove service they
have to use addService and removeService respectively.

Keith, if you really need the internal map IMHO best way is to add a new API
method.

thanks,
Amila.

[1]
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?r1=679658r2=684775



 --Glen




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 API design issue, Should we fix it?

2009-05-06 Thread Amila Suriarachchi
On Wed, May 6, 2009 at 4:33 PM, Glen Daniels g...@thoughtcraft.com wrote:

 Amila Suriarachchi wrote:
  Hm - it seems like you didn't actually get my point.  We CAN'T
  return the
  actual allServices map because that would be breaking the abstraction
  boundary provided by the class.
 
  As I remember this change was done to avoid concurrent modifications to
  service map[1].

 Right - before this change we were doing something actively bad/wrong, i.e.
 returning the internal map.  After the change we were returning a cloned
 copy
 of the map (though not using clone() for some reason), which is good in
 that
 it prevented people from misusing it.

  At that time services map was a HashMap and could not fix the issue by
  changing it to a ConcurrentHashMap since API method returns a HashMap.
 
  Currently anyone can get a copy of internal map (I think we can not use
  clone() method since internal implementation is ConcurrentHashMap and we
  need to return a HashMap). And if they want to add or remove service
  they have to use addService and removeService respectively.
 
  Keith, if you really need the internal map IMHO best way is to add a new
  API method.

 Ah, no.  The best way is NOT TO OFFER ACCESS TO THE INTERNAL MAP.

 Keith's suggestion is to change the API so that it returns a Map - this
 would
 be much more correct since it increases the level of abstraction for the
 method, and would therefore let us, the implementors, freely decide how
 this
 should work internally.  Right now we have problems because someone made
 this
 method overly specific, and this is what we should fix.  (I was incorrect
 earlier when I said this wouldn't break people, btw - I was thinking about
 stuff like getServices().get(MyService), but of course HashMap foo =
 getServices() would fail.  I still think we should fix it.)

 My comment is that we should not only return a Map, we should change the
 implementation to make sure the Map is immutable, and make sure the JavaDoc
 explains what is going on.

+1. Here the real problem is this API contains a hashMap instead of Map.

What I got from the Keiths' first mail is that he need the API change to
return the internal map without copying. I suggested to add a new method if
he really need it so that only he use that method. I agree with you that
this is not a good change.

thanks,
Amila.



 Make sense?

 --Glen




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [ANNOUNCE] Axis2 1.5 Release Candidate refreshed and ready for testing

2009-05-05 Thread Amila Suriarachchi
On Fri, May 1, 2009 at 9:18 AM, Glen Daniels g...@thoughtcraft.com wrote:

 Hi all!

 New version of Axis2 1.5 Release Candidate is ready, including a)
 NOTICE/LICENSE files in the jars, b) some JiBX fixes from Dennis, c) some
 fixes from Amila, d) a README which is more clear about building from
 scratch.  Please check it out if you get a chance, and let me know if there
 are any issues.  If I don't hear anything back I'll start a VOTE early next
 week to accept these bits as 1.5 proper.

+1. I did some load testing to check for memory leaks and CLOSE_WAIT issues.
There seems to be no problems.

thanks,
Amila.



 You can find the distribution files in here:


 http://people.apache.org/~gdaniels/stagingRepo/org/apache/axis2/distribution/1.5/http://people.apache.org/%7Egdaniels/stagingRepo/org/apache/axis2/distribution/1.5/

 And the M2 repository with everything is of course:

 http://people.apache.org/~gdaniels/stagingRepohttp://people.apache.org/%7Egdaniels/stagingRepo

 Thanks,
 --Glen




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Httpclient close wait issues

2009-05-02 Thread Amila Suriarachchi
 hi all,


 I noticed a set of issues related to http client issues[1]-[5]. Some of
these are resolved but as I saw there is no any confirmation from the people
who have reported the issue. So I think it is better to resolve these issues
for Axis2 1.5 if they still get these issues.


 Having some investigation I understood the number of connections made by
the client can be set to 1 by switching on the keep alive (with http 1.1)
with the following code.


 MultiThreadedHttpConnectionManager httpConnectionManager = new
MultiThreadedHttpConnectionManager();

HttpConnectionManagerParams params = new HttpConnectionManagerParams();

HostConfiguration hostConfiguration = new HostConfiguration();

hostConfiguration.setHost(localhost, 8085);

params.setMaxTotalConnections(10);

params.setMaxConnectionsPerHost(hostConfiguration, 2);

httpConnectionManager.setParams(params);


 HttpClient httpClient = new HttpClient(httpConnectionManager);


 while (true) {


 try {


 client = new ServiceClient(null, null);

Options opts = new Options();

client.setOptions(opts);

opts.setTo(new EndpointReference(
http://localhost:8085/axis2/services/TestInOutService;));

opts.setAction(urn:TestInOutService);


 OMElement payload = buildSoapObject(

ns1:getPrice xmlns:ns1=\http://quickstart.samples/xsd\; +

ns1:symbolIBM/ns1:symbol +

/ns1:getPrice

);

System.out.println(Sending the request ... + System.currentTimeMillis());


 client.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Constants.VALUE_TRUE);

client.getOptions().setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);

client.sendReceive(payload);



 } catch (Exception e) {

e.printStackTrace();

}

finally {

if (client != null) {

try {

client.cleanupTransport();

} catch (Exception e) {

e.printStackTrace();

}


 try {

client.cleanup();

} catch (Exception e) {

e.printStackTrace();

}

}


 }

try {

Thread.sleep(1000);

} catch (Exception e) {// do nothing}

}

}


 Here are the some of the observations I have made

Although http 1.1 by default use keep alive axis2 does not.

   The reason for this is axis2 by default creates a new httpClient and
   hence a Connection manager for each request. Http 1.1 keep alive works only
   when all the request uses same Connection manager and they use the same
   thread to invoke the execute method. We can satisfy the first requirement by
   reusing the http client object. The second requirement is automatically
   satisfied when using sendReceive() ( but this is not the case with
   sendReceiveNonBlocking() ) method unless client application starts new
   threads for different invocations.


 setting AUTO_RELEASE_CONNECTION is a wrong way to handle this scenario.

  this works with the out only operations but not synchronous
out in operations since it close the connection before reading the input
stream.

 the correct way is to use the serviceClient.cleanupTransport()
after the method invocations.

IMHO the first step in debugging this issue is to verify whether the client
uses one tcp connection or many using tcpmon. if it use only one tcp
connection then we need to figure out why the CLOSE_WAIT count goes up.


 Can some one reported this issue verify that whether they still getting
this with the above code.


 thanks,

Amila.


 [1] https://issues.apache.org/jira/browse/AXIS2-3670

[2] https://issues.apache.org/jira/browse/AXIS2-2883

[3] https://issues.apache.org/jira/browse/AXIS2-935

[4] https://issues.apache.org/jira/browse/AXIS2-2593

[5] https://issues.apache.org/jira/browse/AXIS2-2724

[6] https://issues.apache.org/jira/browse/AXIS2-2441


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [ANNOUNCE] Axis2 1.5 Release Candidate ready for testing

2009-04-29 Thread Amila Suriarachchi
On Fri, Apr 17, 2009 at 10:24 AM, Raymond Feng enjoyj...@gmail.com wrote:

  Do you guys deploy SNAPSHOT versions of the transport modules to maven?
 It would be nice that we can get a release of the JMS/TCP/HTTP transports
 together with Axis2 1.5.


Http and local transports are shipped with Axis2 1.5. Since other transports
are commonly used in synapse they will be released as a separate transports
release soon.

thanks,
Amila.


 Thanks,
 Raymond

  *From:* Anthony Elder ant.el...@uk.ibm.com
 *Sent:* Thursday, April 16, 2009 10:53 AM
 *To:* axis-dev@ws.apache.org
 *Cc:* axis-dev@ws.apache.org
 *Subject:* Re: [ANNOUNCE] Axis2 1.5 Release Candidate ready for testing


 The JMS transport has been moved out into the commons transport modules -
 https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/transport/modules/jms/

 I understand thats planned to be released separately.

...ant



   *Raymond Feng enjoyj...@gmail.com*

 16/04/2009 18:20
   Please respond to
 axis-dev@ws.apache.org

To
 axis-dev@ws.apache.org  cc
   Subject
 Re: [ANNOUNCE] Axis2 1.5 Release Candidate ready for testing




 I cannot find the following classes (we use them in 1.4.1) any more:

 import org.apache.axis2.transport.jms.JMSConstants;
 import org.apache.axis2.transport.jms.JMSListener;
 import org.apache.axis2.transport.jms.JMSSender;
 import org.apache.axis2.transport.jms.JMSUtils;

 Where are they now?

 Thanks,
 Raymond

 --
 From: Glen Daniels g...@thoughtcraft.com
 Sent: Wednesday, April 15, 2009 9:32 AM
 To: Axis-Dev axis-dev@ws.apache.org; axis-u...@ws.apache.org
 Subject: [ANNOUNCE] Axis2 1.5 Release Candidate ready for testing

  Hi all!
 
  After a failed set of attempts to use the Maven release plugin, I've
 built
  and uploaded a Release Candidate for Axis2 1.5.  Please check it out,
 kick
  the tires, etc.  If I don't hear anything back in the next day or so I'll
  start a VOTE to release these bits as 1.5.
 
  You can find the distribution files in here:
 
 
 http://people.apache.org/~gdaniels/stagingRepo/org/apache/axis2/distribution/1.5/http://people.apache.org/%7Egdaniels/stagingRepo/org/apache/axis2/distribution/1.5/
 
  And the M2 repository with everything is of course:
 
  http://people.apache.org/~gdaniels/stagingRepohttp://people.apache.org/%7Egdaniels/stagingRepo
 
  Thanks,
  --Glen





 --

 *
 *

 *Unless stated otherwise above:
 IBM United Kingdom Limited - Registered in England and Wales with number
 741598.
 Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
 *









-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [ANNOUNCE] Axis2 1.5 Release Candidate ready for testing

2009-04-29 Thread Amila Suriarachchi
 unauthorized forwarding or
  manufacturing of a copy is inadmissible. This message serves only for
 the
  exchange of information and has no legal binding effect. Due to the easy
  manipulation of emails we cannot take responsibility over the the
 contents.
  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
  Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
 unbefugte
  Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
 Nachricht
  dient lediglich dem Austausch von Informationen und entfaltet keine
  rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
  E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
  Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
 le
  destinataire prévu, nous te demandons avec bonté que pour satisfaire
  informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
 copie
  de ceci est interdite. Ce message sert à l'information seulement et
 n'aura
  pas n'importe quel effet légalement obligatoire. Étant donné que les
 email
  peuvent facilement être sujets à la manipulation, nous ne pouvons
 accepter
  aucune responsabilité pour le contenu fourni.
 
 
 
 
 
 
  Date: Wed, 15 Apr 2009 12:32:32 -0400
  To: axis-dev@ws.apache.org; axis-u...@ws.apache.org
  Subject: [ANNOUNCE] Axis2 1.5 Release Candidate ready for testing
  From: g...@thoughtcraft.com
 
  Hi all!
 
  After a failed set of attempts to use the Maven release plugin, I've
 built
  and uploaded a Release Candidate for Axis2 1.5. Please check it out,
 kick
  the tires, etc. If I don't hear anything back in the next day or so
 I'll
  start a VOTE to release these bits as 1.5.
 
  You can find the distribution files in here:
 
 
 
 http://people.apache.org/~gdaniels/stagingRepo/org/apache/axis2/distribution/1.5/http://people.apache.org/%7Egdaniels/stagingRepo/org/apache/axis2/distribution/1.5/
 
  And the M2 repository with everything is of course:
 
  http://people.apache.org/~gdaniels/stagingRepohttp://people.apache.org/%7Egdaniels/stagingRepo
 
  Thanks,
  --Glen
  
  Windows Live™: Life without walls. Check it out.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Anyone running all tests?

2009-04-08 Thread Amila Suriarachchi
I am runing on
Red Hat Enterprise Linux Server release 5 (Tikanga)
java version 1.5.0_10

thanks,
Amila.



On Wed, Apr 8, 2009 at 4:17 AM, Glen Daniels g...@thoughtcraft.com wrote:

 Glen Daniels wrote:
  I do also with Maven 2.0.10, Java 1.5.0_15 on XP.

 That's both with trunk and the 1.5 branch, btw.

 Dims, are you having problems?  Let us know so we can try to repro if so.

 --Glen




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Releasing transports 1.0 - dependency resolutions

2009-04-07 Thread Amila Suriarachchi
hi,

I tested the distribution (after adding http transport) with some samples
and it passes all the test cases. Earlier I had some test with the Sandesha2
security and rampart and worked fine.
So I think we can put an RC and release it there are no any critical issues.

thanks,
Amila.


On Mon, Apr 6, 2009 at 2:08 PM, Amila Suriarachchi 
amilasuriarach...@gmail.com wrote:



 On Fri, Apr 3, 2009 at 10:45 PM, Jarek Gawor jga...@gmail.com wrote:

 The local module and http module (source only) is now moved to Axis2.
 Please give it a try and see if things look ok. If so, we'll merge it
 to 1.5 branch.


 I ran some sample tests with a sanpshot release and it worked fine.
 (tested with both simple http server and war under tomcat)
 So we can move it to branch and remove the transport dependency.



 I kept the http module in the Transport project but I had to change
 the artifact name to prevent a conflict with the Axis2 http transport
 module. Btw, I think that the Transport project should have its own
 group id (e.g org.apache.axis2.transport instead of org.apache.axis2).


 but anyway we are going to remove the http and local transports from the
 commons transport module isn't it?

 IMHO also transport module should have a different group id and a package
 structure.

 thanks,
 Amila.


 The Transport http module only has the tests now. If we could refactor
 the tests somehow that would be great but I guess it's not critical
 for 1.5.

 Thanks,
 Jarek

 On Thu, Apr 2, 2009 at 5:15 PM, Glen Daniels g...@thoughtcraft.com
 wrote:
  Hi folks:
 
  First, many thanks to Jarek for getting the transport move going - I got
  sucked into other stuff today and probably won't be able to dive back in
 for
  real until Sunday.  Just talked to Jarek on IRC and he's hoping to
 finish the
  move tonight or tomorrow.
 
  That said I'm not very happy about the idea of leaving important
 tests in
  the WS-Commons area if the code they're testing is actually in Axis2.
  This
  smells of bad refactoring and future confusion.
 
  I want to get Axis2 1.5 out ASAP, and am willing to do whatever gets us
 there
  quickest, but after that I'd like to have another discussion about how
 to
  correctly host and factor the transports code.  This should dovetail
 nicely
  with another round of the Splitting WS conversation, which I'd like to
 have
  at the same time.
 
  Thanks,
  --Glen
 
  Andreas Veithen wrote:
  Note that the tests applied to the (default Axis2) HTTP transport
  initially were not meant to test the transport but to validate the
  generic HTTP tests in the testkit. The purpose was to apply these
  generic tests to the NIO HTTP transport. This allows to compare the
  behavior of both transports. From that perspective we may leave the
  tests in the transports project ... as tests for the testkit :-)
 
  Andreas
 
  On Thu, Apr 2, 2009 at 17:08, Jarek Gawor jga...@gmail.com wrote:
  On Wed, Apr 1, 2009 at 5:50 PM, Glen Daniels g...@thoughtcraft.com
 wrote:
  Jarek Gawor wrote:
  Also, I'd really like to get 1.5 out the door ASAP, it's lingered
 way too
  long already.  So whatever solution gets us there soonest with
 consensus is
  the one I'll be happy with.
  Yes, I agree. Sounds like we already agree on a solution (moving
 http
  and local back to Axis2).
  OK, I'm on this tomorrow.  If anyone has issues with it, please pipe
 up!
  I already moved some of the utility classes and methods back to Axis2
  and eliminated a direct dependency on transport base from http and
  local. But once I was actually looking into moving the http module to
  Axis2 I realized the the http transport tests have dependency on the
  testki module which has dependencies on the transport base module
  So we can easily move the transport http code itself but not the
  tests... anybody have ideas how to deal with this now?
 
  Jarek
 
 




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Requirement to update the ListenerManager class

2009-04-07 Thread Amila Suriarachchi
On Tue, Apr 7, 2009 at 3:55 PM, Ruwan Linton ruwan.lin...@gmail.com wrote:

 Hi devs,

 Synapse 1.3 is going to depend on the axis2 1.5 release and we need an
 enhancement in the ListenerManager class, so that we can add transport
 listeners to the ListenerManager without starting but just initializing
 them. We want to start the ListenerManager only after initializing Synapse
 in order to prevent the access to the Synapse proxy services before the
 system is properly initialized.

 At the same time we need a mechanism to start the ListenerManager without
 adding the ShutdownHook thread. I can do these changes on trunk, but since
 Synapse 1.3 depends on the Axis2 1.5 we need to get this fix into the axis2
 1.5 branch as well. Shall I attach a patch so that someone who is working on
 the release can review and commit that to the branch?


Please attach a patch.

thanks,
Amila.



 Thanks,
 Ruwan

 --
 Ruwan Linton
 Senior Software Engineer  Product Manager; WSO2 ESB; http://wso2.org/esb
 WSO2 Inc.; http://wso2.org
 email: ru...@wso2.com; cell: +94 77 341 3097
 blog: http://ruwansblog.blogspot.com




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Releasing transports 1.0 - dependency resolutions

2009-04-06 Thread Amila Suriarachchi
On Fri, Apr 3, 2009 at 10:45 PM, Jarek Gawor jga...@gmail.com wrote:

 The local module and http module (source only) is now moved to Axis2.
 Please give it a try and see if things look ok. If so, we'll merge it
 to 1.5 branch.


I ran some sample tests with a sanpshot release and it worked fine.
(tested with both simple http server and war under tomcat)
So we can move it to branch and remove the transport dependency.



 I kept the http module in the Transport project but I had to change
 the artifact name to prevent a conflict with the Axis2 http transport
 module. Btw, I think that the Transport project should have its own
 group id (e.g org.apache.axis2.transport instead of org.apache.axis2).


but anyway we are going to remove the http and local transports from the
commons transport module isn't it?

IMHO also transport module should have a different group id and a package
structure.

thanks,
Amila.


 The Transport http module only has the tests now. If we could refactor
 the tests somehow that would be great but I guess it's not critical
 for 1.5.

 Thanks,
 Jarek

 On Thu, Apr 2, 2009 at 5:15 PM, Glen Daniels g...@thoughtcraft.com
 wrote:
  Hi folks:
 
  First, many thanks to Jarek for getting the transport move going - I got
  sucked into other stuff today and probably won't be able to dive back in
 for
  real until Sunday.  Just talked to Jarek on IRC and he's hoping to finish
 the
  move tonight or tomorrow.
 
  That said I'm not very happy about the idea of leaving important
 tests in
  the WS-Commons area if the code they're testing is actually in Axis2.
  This
  smells of bad refactoring and future confusion.
 
  I want to get Axis2 1.5 out ASAP, and am willing to do whatever gets us
 there
  quickest, but after that I'd like to have another discussion about how to
  correctly host and factor the transports code.  This should dovetail
 nicely
  with another round of the Splitting WS conversation, which I'd like to
 have
  at the same time.
 
  Thanks,
  --Glen
 
  Andreas Veithen wrote:
  Note that the tests applied to the (default Axis2) HTTP transport
  initially were not meant to test the transport but to validate the
  generic HTTP tests in the testkit. The purpose was to apply these
  generic tests to the NIO HTTP transport. This allows to compare the
  behavior of both transports. From that perspective we may leave the
  tests in the transports project ... as tests for the testkit :-)
 
  Andreas
 
  On Thu, Apr 2, 2009 at 17:08, Jarek Gawor jga...@gmail.com wrote:
  On Wed, Apr 1, 2009 at 5:50 PM, Glen Daniels g...@thoughtcraft.com
 wrote:
  Jarek Gawor wrote:
  Also, I'd really like to get 1.5 out the door ASAP, it's lingered
 way too
  long already.  So whatever solution gets us there soonest with
 consensus is
  the one I'll be happy with.
  Yes, I agree. Sounds like we already agree on a solution (moving http
  and local back to Axis2).
  OK, I'm on this tomorrow.  If anyone has issues with it, please pipe
 up!
  I already moved some of the utility classes and methods back to Axis2
  and eliminated a direct dependency on transport base from http and
  local. But once I was actually looking into moving the http module to
  Axis2 I realized the the http transport tests have dependency on the
  testki module which has dependencies on the transport base module
  So we can easily move the transport http code itself but not the
  tests... anybody have ideas how to deal with this now?
 
  Jarek
 
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 1.5 beta 2 fails during the building of the Scripting module

2009-04-03 Thread Amila Suriarachchi
I could run all the test cases with jdk 1.5.
Shall we move the httpCore version to 4.0 since it has released now?

thanks,
Amila.

On Tue, Mar 31, 2009 at 8:32 PM, Glen Daniels g...@thoughtcraft.com wrote:

 Hi José:

 Thanks for catching this - the source assembly file was configured to omit
 any file starting with a dot, so .classpath and .project were both skipped
 in
 the source distribution.  I've just fixed this in the 1.5 branch, and will
 merge the change over to the trunk in a minute.  Can't do anything about
 the
 existing beta2 release, but this will be fixed in the upcoming RC.  Until
 then of course checking out from svn works great. :)

 Thanks,
 --Glen

 José Ricardo da Silva wrote:
  Hi Anthony, you're probably right. I've switched to JDK 5 and it
  worked. However, now the build process breaks on the generation of the
  eclipse codegen plugin:
 
  [INFO]
 
  [INFO] Building Apache Axis2 - tool - Eclipse Codegen Plugin
  [INFO]task-segment: [install]
  [INFO]
 
 
  (...)
 
  [ERROR] BUILD ERROR
  [INFO]
 
  [INFO] Error executing ant tasks
 
  Embedded error: Warning: Could not find file
 
 /home/myuser/Sources/axis2-1.5-beta-2/modules/tool/conf/codegen/.classpath
  to copy.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] SMS transport for axis2

2009-04-01 Thread Amila Suriarachchi
 this to be Nokia specific thing since they
appeared messed up in the old Ericcsson I used to have.[ Am
writing
this mail offline so can't google :(  Not sure whether it was
adopted
as a standard ] . You can definitely take a look at such things.
Ultimately if you can comeup with a protocol binding (such as
the WSDL
bindings for HTTP or SMTP) that would be an ideal outcome. Such a
binding would at least become a de-facto standard if you are
successful :)

Guys that have more knowledge in SMS can help out here, Can SMS
transfer binary ? [I doubt whether it can. It seemed to be only
ASCII]. If so you can think of more space efficient XML
serializations
such as fastinfoset.

Just some ideas

Ajith

2009/3/19 Sagara Gunathunga sagara.gunathu...@gmail.com
mailto:sagara.gunathu...@gmail.com:

 Hi Charith,
 It always  better to implement for a  specification instead
of  a
 specific implementation such as SMSlib ,  Initially  you can
set up
 SMPPSim for  testing  it just like running a HTTP server.

 Any way what is your plan to handle size of the the payload
messages ..?

 This is not a problem with other protocols like  HTTP,JMS or
mail but
 SMS  you need to think about the size of the massage.
 According to
 the SMPP spec short_message size is limited to 254 Octet
String,
 also this value may be vary with networks. pay your
attention for
 possible solution for this.

 Thanks ,



--
Ajith Ranabahu

Reading, after a certain age, diverts the mind too much from its
creative pursuits. Any man who reads too much and uses his own
brain
too little falls into lazy habits of thinking - Albert Einstein




--Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/




 --
 Charith Dhanushka Wickramarachchi
 http://charithwiki.blogspot.com/



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




 --
 Charith Dhanushka Wickramarachchi
 http://charithwiki.blogspot.com/




 --
 Charith Dhanushka Wickramarachchi
 http://charithwiki.blogspot.com/




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: First Element must contain the local name, Envelope , but found definitions

2009-04-01 Thread Amila Suriarachchi
On Thu, Apr 2, 2009 at 7:04 AM, Clifton B. Sothoron Jr. 
clifton.sothoro...@logixml.com wrote:

  I’m testing a dynamic client Axis 2 application. It works fine except
 that one web service I’m testing with is giving me a problem. The
 ServiceClient.sendReceive invocation generates the message “*First Element
 must contain the local name, Envelope , but found definitions*”.  The URL
 is http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl. I’ve
 looked at the returned XML via a sniffer and it indeed has definitions in
 it.  Obviously I can’t change the server side. Is there a way around this
 using Axis 2 in a dynamic client?  The following code illustrates the
 problem.



 import org.apache.axiom.om.OMAbstractFactory;

 import org.apache.axiom.om.OMElement;

 import org.apache.axiom.om.OMFactory;

 import org.apache.axis2.Constants;

 import org.apache.axiom.om.OMNamespace;

 import org.apache.axis2.AxisFault;

 import org.apache.axis2.addressing.EndpointReference;

 import org.apache.axis2.client.Options;

 import org.apache.axis2.client.ServiceClient;





 public class Forecasts{

 private static EndpointReference targetEPR = new EndpointReference(

 
 http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl;);


looks like you point to a wsdl file instead of service.

thanks,
Amila.

 public static void main(String[] args) {

 try {



 ServiceClient client = new ServiceClient();

 OMFactory fac = OMAbstractFactory.getOMFactory();

 OMNamespace ns = fac.createOMNamespace(
 http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl;,

 tns);



 OMElement payload =
 fac.createOMElement(LatLonListZipCode, ns);

 OMElement value = fac.createOMElement(ZipCode,
 ns);

 value.setText(22102);

 payload.addChild(value);



 Options options = new Options();


 options.setTimeOutInMilliSeconds(6);


 options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

 options.setTo(targetEPR);

 options.setAction(
 http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl/LatLonListZipCode
 );

 client.setOptions(options);

 //Blocking invocation



 OMElement result = client.sendReceive(payload);



 System.out.println(result.toString());



 } catch (AxisFault axisFault) {

 axisFault.printStackTrace();

 }



 }

 }





 Thanks in advance,

 Clifton Sothoron

 LogiXML, Development Department
 7900 Westpark Drive, Suite T107 |  McLean, VA 22102
 (703) 752-9700  Ext. 162 | fax: (703) 773-6903
 clifton.sothoro...@logixml.com ke...@logixml.com |
 http://www.logixml.com






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Releasing transports 1.0 - dependency resolutions

2009-03-30 Thread Amila Suriarachchi
On Tue, Mar 31, 2009 at 8:20 AM, Jarek Gawor jga...@gmail.com wrote:

 I mentioned two additional ideas to deal with this problem a while ago
 when this issue also came up:

 1) Release transports and axis2 at the same time. Have one vote for
 both libraries.


+1.  I think this the best way.

thanks,
Amila.



 2) Move the base, local, tcp, and http transport modules back to Axis2
 and release them with Axis2. That way the transports project would
 only have the 'optional' transport modules and we wouldn't have to
 release the transports for/with Axis2.

 Jarek

 On Mon, Mar 30, 2009 at 3:20 PM, Glen Daniels g...@thoughtcraft.com
 wrote:
  Hi folks:
 
  So I'm trying to get the transports 1.0 releases moving along, and have
 run
  into a bit of a snag.  The transports depend on axis2-kernel SNAPSHOT,
 for
  interfaces like MessageContext, Flow, etc. - the problem is how do we do
 the
  release when we want to release the transports before the actual Axis2
  release?  We need to resolve all the SNAPSHOT dependencies for the Maven
  release plugin to be happy, and for this case, we seem to have a circular
  dependency chain. :(
 
  A couple of options off the top of my head:
 
  * Release transports against Axis2 1.4.1's kernel - this may not even be
  possible as there may have been incompatible changes.
 
  * Do a Maven-only release of Axis2-kernel 1.5 - i.e. NOT a distribution
 but
  just a release into Maven.  Then use that for the Transports 1.0
 releases,
  and then release the Axis2 1.5 distribution after that.
 
  Moving forward, anyone have thoughts on how to best deal with this?  One
 of
  these options, or something else?
 
  Thanks,
  --Glen
 




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Releasing transports 1.0 - dependency resolutions

2009-03-30 Thread Amila Suriarachchi
On Tue, Mar 31, 2009 at 2:59 AM, Dennis Sosnoski d...@sosnoski.com wrote:

 If transports is using these Axis2 interfaces I don't see the point of
 having it as a separate project. I thought the reason for moving transports
 outside of Axis2 was to allow it to be used for other purposes. How is that
 going to work if the code is assuming the Axis2 environment?


Here the main idea was to share the same transports between Axis2 and
synapse. The idea of an axis2 transport is to use as an adapter between
axis2 and the actual transport (i.e http, smtp, JMS etc).  In fact Axis2
transport uses respective libraries for these standard transports and hence
it is only scoped to use with Axis2.

thanks,
Amila.



 The only clean solution is to have transports define whatever interfaces it
 needs. The Axis2 versions can then extend the transports versions.

  - Dennis



 Glen Daniels wrote:

 Hi folks:

 So I'm trying to get the transports 1.0 releases moving along, and have
 run
 into a bit of a snag.  The transports depend on axis2-kernel SNAPSHOT, for
 interfaces like MessageContext, Flow, etc. - the problem is how do we do
 the
 release when we want to release the transports before the actual Axis2
 release?  We need to resolve all the SNAPSHOT dependencies for the Maven
 release plugin to be happy, and for this case, we seem to have a circular
 dependency chain. :(

 A couple of options off the top of my head:

 * Release transports against Axis2 1.4.1's kernel - this may not even be
 possible as there may have been incompatible changes.

 * Do a Maven-only release of Axis2-kernel 1.5 - i.e. NOT a distribution
 but
 just a release into Maven.  Then use that for the Transports 1.0 releases,
 and then release the Axis2 1.5 distribution after that.

 Moving forward, anyone have thoughts on how to best deal with this?  One
 of
 these options, or something else?

 Thanks,
 --Glen






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: how to simulate record locking with Axis2/MySQL ?

2009-03-29 Thread Amila Suriarachchi
On Fri, Mar 27, 2009 at 1:59 PM, hideki tihiri hideki.tih...@gmail.comwrote:

 Hi,

 I have a service in soapsession scope.

 The underlying code needs to access a record in a table (so multiple
 sessions will try to lock te same record).

 How can I build in a kind of locking strategy ?

 Meaning, there are 2 operations that needs to be performed in the same
 session(groupid):
 service.operation1 == does something and, locks the record, return some
 value.
 service.operation2 == does something, unlock te record and return a value.

 My problem is that if, for some reason, service.operation2 is never called
 by the client, the record is 'locked' forever.

 Any ideas what a good solution/strategy could be ?

I think you need to start a transaction with the first call and store the
connection in the ServiceContext and use it on the second operation.
you may use the service life cycle to  events to rollback or commit the
transactions.

thanks,
Amila.


 Regards,

 H.






-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Reuse of HttpClient and HttpState proposal

2009-03-26 Thread Amila Suriarachchi
On Fri, Mar 27, 2009 at 1:21 AM, Dobri Kitipov kdobrik.ax...@googlemail.com
 wrote:

 Hi all,
 I am opening a new mail thread related to the following one HTTP
 connection
 leak and other related issues [1].
 Since this became really long and hairy discussion I decided not to post
 there this mail.

 The use case
 I want to point out a concrete use case I have. I want to reuse a
 HttpClient
 among different instances of a clients which are executed in different
 threads. Every client can make several invocations. The clients can call
 different Web Services (WSs) deployed at different hosts/servers. As a
 consequence every client may need to provide different authentication
 Credentials and may need to support transport sessions using Cookies.

 Both Credentials and Cookies are part of the HttpState. As a result the
 HttpState associated with the HttpClient that is reused cannot be reused
 that easily in the scenario described in the above lines. Credentials are
 associated with a given host, port, realm and authentication schema
 (defines
 the AuthScope object used as a key for the credentials Map part of the
 HttpState).

 Following is an excerpt from the AbstractHTTPSender#setAuthenticationInfo:

 creds = new UsernamePasswordCredentials(username, password);
 agent.getState().setCredentials(new AuthScope(host, port, realm), creds);

 Credentials are kept into a Map and could be indentified uniquely from
 client to client (thread to thread), but this Map is exposed to all clients
 which reuse the HttpClient which is not a good idea.

 The situation with the other member of the HttpState (i.e. Cookies) is
 similar. When we have to *different* instances of a client (configured to
 use cookies options.setManageSession(true)) calling one and the same WS's
 operation then the effect is that both are sharing one JSESSIONID.

 The proposal
 The proposal is based on my question posted at
 httpclient-us...@hc.apache.org [2]
 The idea is to provide the capability to specify/associate a separate
 HttpState with every client and still reuse one and the same HttpClient.
 What you just need is to pass it as a parameter to the
 HttpClient#executeMethod.
 I decided that the HttpState should be kept into the ServiceContext. I did
 all changes needed in Axis2 kernel (in fact they are really few) and added
 the possibility to use a separate HttpState and invoke
 HttpClient#executeMethod passing it as a parameter. The changes keep the
 kernel backward compatible. I did and several tests and it looks good.

 Please, give me your comments. Do you like this extension? If so I can
 provide you with the changes and finally we can agree on committing them
 into the kernel.


If I understand correctly you need to use the
public int executeMethod(org.apache.commons.httpclient.HostConfiguration
hostConfiguration, org.apache.commons.httpclient.HttpMethod httpMethod,
org.apache.commons.httpclient.HttpState httpState)

instead of two parameter method if the http state is stored at
serviceContext.
I think you have a valid use case there which can not provide with current
configurations.

Please create a jira and attach the patch.

thanks,
Amila.




 Thank you,
 Dobri

 [1] http://www.mail-archive.com/axis-dev@ws.apache.org/msg45787.html
 [2]
 http://www.mail-archive.com/httpclient-us...@hc.apache.org/msg01944.html




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


  1   2   3   4   >