Re: OutOfMemory in stub if reusing ConfigurationContext

2008-07-01 Thread seehamster

Hi Amila,

thanks for your fast response. When do you think, the fix will be released 
(Axis2 1.5)?

Please could you confirm, that using a Stub and the ConfigurationContext only 
one-time is a workaround, until the fix goes into production?

Regards,
Christoph

 Original-Nachricht 
 Datum: Tue, 1 Jul 2008 13:36:25 +0530
 Von: Amila Suriarachchi [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: OutOfMemory in stub if reusing ConfigurationContext

 hope this has fixed the following issue.
 
 https://issues.apache.org/jira/browse/AXIS2-3870
 
 please have a look at a nightly build.
 
 thanks,
 Amila.
 
 On Mon, Jun 30, 2008 at 9:35 PM, [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I am using Axis2 1.4 XMLBeans client stubs with shared Commons
 HttpClient.
  I get OutOfMemory errors, if I reuse ConfigurationContext previously
  generated by:
 
  configurationContext =
 
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
  null);
 
  The stub instance is created before each call and will not be reused
 itself
 
  pseudo-code:
 
  loop {
  stub = new TestCallServiceStub(configurationContext, url);
  stub.call();
  }
 
  If I just use:
 
  loop {
  stub = new TestCallServiceStub(url);
  }
 
  no OOM occurs, but I am afraid, that performance will decrease.
 
  Please could you tell me, if this is a bug in Axis2 or just misuse by
  myself?
 
  Greetings,
  Christoph
 
 
  --
  GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
  Jetzt dabei sein:
  http://www.shortview.de/[EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 Amila Suriarachchi,
 WSO2 Inc.

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OutOfMemory in stub if reusing ConfigurationContext

2008-06-30 Thread seehamster
Hi,

I am using Axis2 1.4 XMLBeans client stubs with shared Commons HttpClient. I 
get OutOfMemory errors, if I reuse ConfigurationContext previously generated by:

configurationContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
null);

The stub instance is created before each call and will not be reused itself

pseudo-code:

loop {
stub = new TestCallServiceStub(configurationContext, url);
stub.call();
}

If I just use:

loop {
stub = new TestCallServiceStub(url);
}

no OOM occurs, but I am afraid, that performance will decrease.

Please could you tell me, if this is a bug in Axis2 or just misuse by myself?

Greetings, 
Christoph


-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ADB Prefix counter never reset

2007-06-26 Thread seehamster
Hi,

we are using current Axis2 release with ADB binding. Each Axis stub is reused 
after each call. After several calls, we have noticed, that some 
namespace-prefix counters are never reseted and will increase after every loop:

ns27:tag.. will result to: ns1233:tag.. after several calls with the same 
stub instance. You can reproduce this behaviour if you just put a loop aroung a 
stub:

while (true) {
try {
  stub.call(param);
} catch (Exception e) {
   e.printStackTrace();
} finally {
  stub.cleanup();
}
}

It seems, that 'xmlWriter.getPrefix(namespace)' inside the ADB classes is not 
reseted after each call. Any ideas?

Cheers,
Christoph
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ADB Prefix counter never reset

2007-06-26 Thread seehamster
I have created a JIRA for this issue:

https://issues.apache.org/jira/browse/AXIS2-2860


 Original-Nachricht 
Datum: Tue, 26 Jun 2007 11:13:39 +0200
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: ADB Prefix counter never reset

 Hi,
 
 we are using current Axis2 release with ADB binding. Each Axis stub is
 reused after each call. After several calls, we have noticed, that some
 namespace-prefix counters are never reseted and will increase after every 
 loop:
 
 ns27:tag.. will result to: ns1233:tag.. after several calls with the
 same stub instance. You can reproduce this behaviour if you just put a loop
 aroung a stub:
 
 while (true) {
 try {
   stub.call(param);
 } catch (Exception e) {
e.printStackTrace();
 } finally {
   stub.cleanup();
 }
 }
 
 It seems, that 'xmlWriter.getPrefix(namespace)' inside the ADB classes is
 not reseted after each call. Any ideas?
 
 Cheers,
 Christoph
 -- 
 GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
 Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.net.BindException

2007-03-31 Thread seehamster
Finally solved the problem with help of HttpClient team. Please see JIRA 
comment: https://issues.apache.org/jira/browse/AXIS2-2441

Cheers,
Christoph
-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.net.BindException

2007-03-30 Thread seehamster

Michele,

I could reproduce this behaviour even with a single thread inside a loop. After 
4000 calls, Axis2 crashed.

By the way, how can I stop local listener? I think this might be a security 
risk (if not needed).

My sample code:

ConfigurationContext configurationContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
null);
HttpClient httpClient = new HttpClient(new 
MultiThreadedHttpConnectionManager());

configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);  
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);
TestStub stub = new TestStub(configurationContext, SVC_URL);
Data param = new Data();
param.setData(getData());

try {
  for (int i = 0; i  1; i++) {
 stub.call(param);

 if (i % 100 == 0) {
  System.out.println(i);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
stub.cleanup();
}


Console:

...
3600
3700
3800
3900
4000
30.03.2007 12:00:54 org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: I/O exception (java.net.BindException) caught when processing request: 
Address already in use: connect
30.03.2007 12:00:54 org.apache.commons.httpclient.HttpMethodDirector 
executeWithRetry
INFO: Retrying request
...


 Original-Nachricht 
Datum: Fri, 30 Mar 2007 10:45:44 +0100
Von: Michele Mazzucco [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: java.net.BindException

 Christoph,
 
 on the client start a local http server is started to receive the
 response.
 Do you use the same ServiceClient to send your requests? What about the
 ConfigurationContext? Do you clean up the ServiceClient(s) when you are
 done? Finally remember that if you are using a custom
 ConfigurationContext you have to manually close the connection listener
 (it's cleaned only if you use the default ConfigurationContext). 
 
 configurationContext.getListenerManager ().stop();
 
 Be careful because there's only one connection listener for each
 ConfigurationContext.
 
 Michele
 
 On Fri, 2007-03-30 at 10:52 +0200, [EMAIL PROTECTED] wrote:
  Thanks for response. Your suggested solution does not work. After
 thousands of calls the Bind exception appears again. Then I have to wait a 
 little
 (even with JVM restart) for next successful runs.
  I think, that socket handling of HttpClient is the problem. No local
 server is started.
  Please could you investigate this problem. I feel very uncomfortable
 about this behaviour, which might just raise in production under heavy load.
  
  I have created a JIRA issue.
  
  Christoph
  
  I guess the reason is explained here http://wso2.org/library/165
  Something like this should solve the problem
  
  ConfigurationContext configurationContext = ConfigurationContextFactory
  .createConfigurationContextFromFileSystem(null,
  null);
  
  HttpClient httpClient = new HttpClient(
   new MultiThreadedHttpConnectionManager());
  
  
  configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
  Boolean.TRUE);
  configurationContext
.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
  
  
  Michele
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.net.BindException

2007-03-30 Thread seehamster
Simply generate a Stub with your ADB Ant Task and call it in a loop like in my 
posted code fragment. I can't embedd my full code due to legal reasons.
I have used the nightly builds.

The duration until exception is  3 minutes at my machine (windows). Tomcat is 
on a different host.

Some posts with related problems:

http://www.mail-archive.com/httpclient-user@jakarta.apache.org/msg03652.html
http://www.archivesat.com/Jakarta_Commons_HttpClient/thread333537.htm

 Original-Nachricht 
Datum: Fri, 30 Mar 2007 12:19:09 +0100
Von: Michele Mazzucco [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: java.net.BindException

 On Fri, 2007-03-30 at 13:13 +0200, [EMAIL PROTECTED] wrote:
  Axis2 crashed means: Axis stub throws finally an exception after three
 retries of httpclient and stops execution - no more Axis stub calls. There
 is no out of memory printed in console. 
  
  Please could you run my posted clientcode at your machine and tell me,
 
 Where is the code (TestStub, service, etc.)?
 
   if the BindException is appearing there, too. I had to wait about
 3700-4000 calls.
  
 I'm using no stubs (i.e. raw xml) and I get an out of memory error after
 4/5000 messages (this happens in about 1 hour, so I guess the client is
 quite loaded), but no network issues.
 
 
 Michele
 
  Thanks!
  
  
   Original-Nachricht 
  Datum: Fri, 30 Mar 2007 11:35:08 +0100
  Von: Michele Mazzucco [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: java.net.BindException
  
   
   
   On Fri, 2007-03-30 at 12:04 +0200, [EMAIL PROTECTED] wrote:
Michele,

I could reproduce this behaviour even with a single thread inside a
   loop. After 4000 calls, Axis2 crashed.
   
   What do you mean when you say axis2 crashed? The exception below
 it's
   not a crash. Instead, there's a know issue (see JIRA 2328) which
 causes
   an OutOfMemory error because of a memory leak in the connection
   listener.
   

By the way, how can I stop local listener? 
   
   Please see here
  
 http://www.nabble.com/-Axis2--ServiceClient-question-tf2496516.html#a6959251
   
   Michele
   
I think this might be a security risk (if not needed).

My sample code:

ConfigurationContext configurationContext =
  
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
 null);
HttpClient httpClient = new HttpClient(new
   MultiThreadedHttpConnectionManager());

configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
   
  
   Boolean.TRUE);  
 configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);
TestStub stub = new TestStub(configurationContext, SVC_URL);
Data param = new Data();
param.setData(getData());

try {
  for (int i = 0; i  1; i++) {
 stub.call(param);

 if (i % 100 == 0) {
  System.out.println(i);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
stub.cleanup();
}


Console:

...
3600
3700
3800
3900
4000
30.03.2007 12:00:54 org.apache.commons.httpclient.HttpMethodDirector
   executeWithRetry
INFO: I/O exception (java.net.BindException) caught when processing
   request: Address already in use: connect
30.03.2007 12:00:54 org.apache.commons.httpclient.HttpMethodDirector
   executeWithRetry
INFO: Retrying request
...


 Original-Nachricht 
Datum: Fri, 30 Mar 2007 10:45:44 +0100
Von: Michele Mazzucco [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: java.net.BindException

 Christoph,
 
 on the client start a local http server is started to receive the
 response.
 Do you use the same ServiceClient to send your requests? What
 about
   the
 ConfigurationContext? Do you clean up the ServiceClient(s) when
 you
   are
 done? Finally remember that if you are using a custom
 ConfigurationContext you have to manually close the connection
   listener
 (it's cleaned only if you use the default ConfigurationContext). 
 
 configurationContext.getListenerManager ().stop();
 
 Be careful because there's only one connection listener for each
 ConfigurationContext.
 
 Michele
 
 On Fri, 2007-03-30 at 10:52 +0200, [EMAIL PROTECTED] wrote:
  Thanks for response. Your suggested solution does not work.
 After
 thousands of calls the Bind exception appears again. Then I have
 to
   wait a little
 (even with JVM restart) for next successful runs.
  I think, that socket handling of HttpClient is the problem. No
 local
 server is started.
  Please could you investigate this problem. I 

Re: java.net.BindException

2007-03-30 Thread seehamster

Could repeat exception with a simple HelloWorld wsdl after 3800 calls in a loop 
by a single thread.

 Original-Nachricht 
Datum: Fri, 30 Mar 2007 13:28:09 +0200
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: java.net.BindException

 Simply generate a Stub with your ADB Ant Task and call it in a loop like
 in my posted code fragment. I can't embedd my full code due to legal
 reasons.
 I have used the nightly builds.
 
 The duration until exception is  3 minutes at my machine (windows).
 Tomcat is on a different host.
 
 Some posts with related problems:
 
 http://www.mail-archive.com/httpclient-user@jakarta.apache.org/msg03652.html
 http://www.archivesat.com/Jakarta_Commons_HttpClient/thread333537.htm
 
  Original-Nachricht 
 Datum: Fri, 30 Mar 2007 12:19:09 +0100
 Von: Michele Mazzucco [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: java.net.BindException
 
  On Fri, 2007-03-30 at 13:13 +0200, [EMAIL PROTECTED] wrote:
   Axis2 crashed means: Axis stub throws finally an exception after three
  retries of httpclient and stops execution - no more Axis stub calls.
 There
  is no out of memory printed in console. 
   
   Please could you run my posted clientcode at your machine and tell me,
  
  Where is the code (TestStub, service, etc.)?
  
if the BindException is appearing there, too. I had to wait about
  3700-4000 calls.
   
  I'm using no stubs (i.e. raw xml) and I get an out of memory error after
  4/5000 messages (this happens in about 1 hour, so I guess the client is
  quite loaded), but no network issues.
  
  
  Michele
  
   Thanks!
   
   
    Original-Nachricht 
   Datum: Fri, 30 Mar 2007 11:35:08 +0100
   Von: Michele Mazzucco [EMAIL PROTECTED]
   An: axis-user@ws.apache.org
   Betreff: Re: java.net.BindException
   


On Fri, 2007-03-30 at 12:04 +0200, [EMAIL PROTECTED] wrote:
 Michele,
 
 I could reproduce this behaviour even with a single thread inside
 a
loop. After 4000 calls, Axis2 crashed.

What do you mean when you say axis2 crashed? The exception below
  it's
not a crash. Instead, there's a know issue (see JIRA 2328) which
  causes
an OutOfMemory error because of a memory leak in the connection
listener.

 
 By the way, how can I stop local listener? 

Please see here
   
 
 http://www.nabble.com/-Axis2--ServiceClient-question-tf2496516.html#a6959251

Michele

 I think this might be a security risk (if not needed).
 
 My sample code:
 
 ConfigurationContext configurationContext =
   
 
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
 null);
 HttpClient httpClient = new HttpClient(new
MultiThreadedHttpConnectionManager());
 
 configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,

   
 
   Boolean.TRUE);  
 configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
   httpClient);
 TestStub stub = new TestStub(configurationContext, SVC_URL);
   Data param = new Data();
   param.setData(getData());
   
 try {
   for (int i = 0; i  1; i++) {
stub.call(param);
 
if (i % 100 == 0) {
   System.out.println(i);
   }
 }
   } catch (Exception e) {
   e.printStackTrace();
   } finally {
   stub.cleanup();
   }
 
 
 Console:
 
 ...
 3600
 3700
 3800
 3900
 4000
 30.03.2007 12:00:54
 org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
 INFO: I/O exception (java.net.BindException) caught when
 processing
request: Address already in use: connect
 30.03.2007 12:00:54
 org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
 INFO: Retrying request
 ...
 
 
  Original-Nachricht 
 Datum: Fri, 30 Mar 2007 10:45:44 +0100
 Von: Michele Mazzucco [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: java.net.BindException
 
  Christoph,
  
  on the client start a local http server is started to receive
 the
  response.
  Do you use the same ServiceClient to send your requests? What
  about
the
  ConfigurationContext? Do you clean up the ServiceClient(s) when
  you
are
  done? Finally remember that if you are using a custom
  ConfigurationContext you have to manually close the connection
listener
  (it's cleaned only if you use the default ConfigurationContext).
  
  configurationContext.getListenerManager ().stop();
  
  Be careful because there's only one connection listener for each
  ConfigurationContext.
  
  Michele
  
  On Fri, 2007-03-30 at 10:52 

Re: java.net.BindException

2007-03-30 Thread seehamster
Yes, that was my suggestion, too. HttpClient could have a problem with socket 
handling. But in the end, Axis2 is failing and HttpClient is the default 
client. 
What are your suggestions, because Axis2 is using HttpClient per default and I 
think that this bug (or more exaclty HttpClient's bug) will affect Axis2 
nevertheless. 
Perhaps HttpClient could be configured to avoid this exception. If possible, 
this should be done by Axis IMHO.

Could you confirm the problem at your machine?



Please correct me if I'm wrong, but it looks to me that the problem is
related with the jakarta http client framework, it's not an Axis2 issue.

Michele
-- 
Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.net.BindException

2007-03-29 Thread seehamster

I really would appreciate if someone could ask my questions below. 

Please correct me if I am wrong:
I think it would be more secure to not start a listener in client stubs due to 
security reasons with default configuration.

Regards,
Christoph


Hi,

during stress test of ADB service stubs, I got a java.net.BindException: 
Address already in use: JVM_Bind. I have already read the article at 
http://wso2.org/library/165, but some things are still a bit unclear. 

I just want to call a service without asynchronous receiving. Every thread gets 
his own instance of stub (stored in commons pool) due to thread-safety.

- How do I disable Client side Http server? Just uncomment module 
ref=addressing/ in axis2.xml? I have already tried this, but without effect. 

- In order to use axis.xml for stubs, do I simply have to put this file into 
classpath?

- Do I have to call cleanup() of stubs before the stub is finalized? If 
multiple stubs for the same service are used, will this call affect the other 
stubs?

Thanks for answers!

Christoph


-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.net.BindException

2007-03-29 Thread seehamster
It seems that HttpClient is the reason for the socket bind exception: 

Caused by: java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:461)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
at 
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
at 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at 
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:551)
...

I can reproduce this behaviour, if I start multithreaded stub calls against a 
tomcat and restart the test after completion.
After a period of time ( 30 seconds), the calls are running again without 
problems. Maybe HttpClient has a problem with
local socket assignment under load test conditions?

I dont think anymore, that a client-side http listener is the problem.

Do you have an idea, what could be done to eliminate this behaviour?
-- 
Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



java.net.BindException

2007-03-28 Thread seehamster
Hi,

during stress test of ADB service stubs, I got a java.net.BindException: 
Address already in use: JVM_Bind. I have already read the article at 
http://wso2.org/library/165, but some things are still a bit unclear. 

I just want to call a service without asynchronous receiving. Every thread gets 
his own instance of stub (stored in commons pool) due to thread-safety.

- How do I disable Client side Http server? Just uncomment module 
ref=addressing/ in axis2.xml? I have already tried this, but without effect. 

- In order to use axis.xml for stubs, do I simply have to put this file into 
classpath?

- Do I have to call cleanup() of stubs before the stub is finalized? If 
multiple stubs for the same service are used, will this call affect the other 
stubs?

Thanks for answers!

Christoph
-- 
Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



StAXSOAPModelBuilder error in nightly build

2007-03-22 Thread seehamster
I have tried to use the nightly build, but I am getting the following error:

java.lang.NoSuchMethodError: 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder: method 
init(Ljavax/xml/stream/XMLStreamReader;)V not found
at 
org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:43)
at ...

The axiom jar of the 1.1.1 release is not compatible with the constructor call:

StAXBuilder builder = new StAXSOAPModelBuilder(streamReader); 

Which jar do I have to use?
-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Data binding questions

2007-03-21 Thread seehamster
Hi,

I have some questions about data binding:

We have a rather complex wsdl, which does not work with axis 1.x WSDL2Java. 
Therefore we are planning to move to a newer SOAP engine.

Our partner recommends to use XFire with XMLbeans, but I want to give Axis 2 a 
try, too. If I use XMLbeans binding, WSDL2Java crashes with some unresolved 
references in WSDL during generation. XMLBeans single Ant task 
(org.apache.xmlbeans.impl.tool.XMLBean) works without any problems! There seems 
to be a problem with XMLBeans integration into WSDL2Java.

- Can I use custom generated XMLBeans-jar (by own XMLBeans ant task) for axis2 
(like XFire does)?

- Generally speaking, would you recommend to use ADB or XMLBeans? We do not 
need XMLBeans in out other application layers. So the decision would only 
depend on Axis2.

Thanks for answers!
-- 
Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Data binding questions

2007-03-21 Thread seehamster

update:

Our given WSDL seems to be really challenging. With ADB, attributes are missing 
in the generated classes. With XMLBeans, everything is generated fine. 
Therefore I must use XMLBeans. Is there any way to use an existing xmlbeans jar 
with axis2 (due to generation problem mentioned in my previous post).

 Original-Nachricht 
Datum: Wed, 21 Mar 2007 09:57:00 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Data binding questions

 Hi,
 
 I have some questions about data binding:
 
 We have a rather complex wsdl, which does not work with axis 1.x
 WSDL2Java. Therefore we are planning to move to a newer SOAP engine.
 
 Our partner recommends to use XFire with XMLbeans, but I want to give Axis
 2 a try, too. If I use XMLbeans binding, WSDL2Java crashes with some
 unresolved references in WSDL during generation. XMLBeans single Ant task
 (org.apache.xmlbeans.impl.tool.XMLBean) works without any problems! There 
 seems
 to be a problem with XMLBeans integration into WSDL2Java.
 
 - Can I use custom generated XMLBeans-jar (by own XMLBeans ant task) for
 axis2 (like XFire does)?
 
 - Generally speaking, would you recommend to use ADB or XMLBeans? We do
 not need XMLBeans in out other application layers. So the decision would only
 depend on Axis2.
 
 Thanks for answers!
 -- 
 Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
 Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Data binding questions

2007-03-21 Thread seehamster
Thanks for fast response. Unfortunately I cannot post the WSDL due to legal 
reasons. Sorry!
Is there a way, to integrate a generated XML beans jar (and skip the generation 
error)?


 Original-Nachricht 
Datum: Wed, 21 Mar 2007 10:09:42 +
Von: Paul Fremantle [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 Hi
 
 A couple of suggestions. Firstly - we would really like it if you
 could post the WSDL as a JIRA (bug report) so that we can fix the ADB
 and XMLBeans issues.
 
 The other option you could try is either JAXB or JIBX which are other
 databinding frameworks that work with Axis2.
 
 Paul
 
 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  update:
 
  Our given WSDL seems to be really challenging. With ADB, attributes are
 missing in the generated classes. With XMLBeans, everything is generated
 fine. Therefore I must use XMLBeans. Is there any way to use an existing
 xmlbeans jar with axis2 (due to generation problem mentioned in my previous
 post).
 
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 09:57:00 +0100
  Von: [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Data binding questions
 
   Hi,
  
   I have some questions about data binding:
  
   We have a rather complex wsdl, which does not work with axis 1.x
   WSDL2Java. Therefore we are planning to move to a newer SOAP engine.
  
   Our partner recommends to use XFire with XMLbeans, but I want to give
 Axis
   2 a try, too. If I use XMLbeans binding, WSDL2Java crashes with some
   unresolved references in WSDL during generation. XMLBeans single Ant
 task
   (org.apache.xmlbeans.impl.tool.XMLBean) works without any problems!
 There seems
   to be a problem with XMLBeans integration into WSDL2Java.
  
   - Can I use custom generated XMLBeans-jar (by own XMLBeans ant task)
 for
   axis2 (like XFire does)?
  
   - Generally speaking, would you recommend to use ADB or XMLBeans? We
 do
   not need XMLBeans in out other application layers. So the decision
 would only
   depend on Axis2.
  
   Thanks for answers!
   --
   Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
   Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  --
  Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
  Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 Paul Fremantle
 VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
 
 http://bloglines.com/blog/paulfremantle
 [EMAIL PROTECTED]
 
 Oxygenating the Web Service Platform, www.wso2.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Data binding questions

2007-03-21 Thread seehamster
Please see my answers below...


 Original-Nachricht 
Datum: Wed, 21 Mar 2007 17:32:26 +0530
Von: Amila Suriarachchi [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Thanks for fast response. Unfortunately I cannot post the WSDL due to
  legal reasons. Sorry!
 
 
 Are  you testing with the Axis2 1.1.1 or with nightly builds?
 
1.1.1

 Is there a way, to integrate a generated XML beans jar (and skip the
  generation error)?
 
 
 You should be able to interage the XML beans jar seperately.
 
 Does it generates the Skelton and stub classes correctly?
 
No, generation stops immediately and no classes are generated.

 If not try some thing like this to generate stub and skelton correctly.
 Remove all the elements except the elements which are directly call by the
 wsdl messages.
 then remove the inner parts of the elements and complex types of the
 remaining elements as well.
 basically you keep minimal set of elements to comple the wsdl.
 
 So if you generate the code now it should generate the stub and skelton
 classes correctly. since there only simple complex and elements (I hope
 you
 got my point).

I will try to remove all parts from WSDL, which are not directly part of the 
service interface. After that I will use the already generated XMLBeans jar, 
containg the real beans. I wonder, if this will work reliantly.
Would you recommend to use Axis2 (1.1.1) in production?

 then integrate the correct classes by generating them seperately.
 
 One other question in Xfier case what it generates when you data bind with
 xmlbeans?

With XFire I have to generate XMLbeans before and add them to their ANT 
generation-task classpath. As result, a service interface using XMLBeans is 
generated (and other stub stuff).


 
  Original-Nachricht 
  Datum: Wed, 21 Mar 2007 10:09:42 +
  Von: Paul Fremantle [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
 
   Hi
  
   A couple of suggestions. Firstly - we would really like it if you
   could post the WSDL as a JIRA (bug report) so that we can fix the ADB
   and XMLBeans issues.
  
   The other option you could try is either JAXB or JIBX which are other
   databinding frameworks that work with Axis2.
  
   Paul
  
   On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
update:
   
Our given WSDL seems to be really challenging. With ADB, attributes
  are
   missing in the generated classes. With XMLBeans, everything is
 generated
   fine. Therefore I must use XMLBeans. Is there any way to use an
 existing
   xmlbeans jar with axis2 (due to generation problem mentioned in my
  previous
   post).
   
 Original-Nachricht 
Datum: Wed, 21 Mar 2007 09:57:00 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Data binding questions
   
 Hi,

 I have some questions about data binding:

 We have a rather complex wsdl, which does not work with axis 1.x
 WSDL2Java. Therefore we are planning to move to a newer SOAP
 engine.

 Our partner recommends to use XFire with XMLbeans, but I want to
  give
   Axis
 2 a try, too. If I use XMLbeans binding, WSDL2Java crashes with
 some
 unresolved references in WSDL during generation. XMLBeans single
 Ant
   task
 (org.apache.xmlbeans.impl.tool.XMLBean) works without any
 problems!
   There seems
 to be a problem with XMLBeans integration into WSDL2Java.

 - Can I use custom generated XMLBeans-jar (by own XMLBeans ant
 task)
   for
 axis2 (like XFire does)?

 - Generally speaking, would you recommend to use ADB or XMLBeans?
 We
   do
 not need XMLBeans in out other application layers. So the decision
   would only
 depend on Axis2.

 Thanks for answers!
 --
 Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
 Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out


  -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
--
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   Paul Fremantle
   VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
  
   http://bloglines.com/blog/paulfremantle
   [EMAIL PROTECTED]
  
   Oxygenating the Web Service Platform, www.wso2.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  --
  Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
  Jetzt GMX ProMail testen: 

Re: Data binding questions

2007-03-21 Thread seehamster
update:
After removing all inner parts of the WSDL as suggested, I was able to generate 
a Stub. Then I have removed all XMLBeans stuff and used the real 
xmlbeans-jar. Finally, I could to sent a request against an XFire server 
successfully. :-) 

Hope, that other parts of Axis2 are ready for production so far.

Now i am entering next level: Jar-Hell

We have to maintain old Axis 1.x clients and a lot of other jar's in different 
versions used by our application and axis2.

I do not have found any jar dependency list. Could you tell me please, which 
jar's do I need for client calls (just simple calls without security and stuff 
like that) and what are your advices for preventing jar version problems (I 
already have some ideas, but look for other solutions).

 Original-Nachricht 
Datum: Wed, 21 Mar 2007 18:34:40 +0530
Von: Amila Suriarachchi [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Please see my answers below...
 
 
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 17:32:26 +0530
  Von: Amila Suriarachchi [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
 
   On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
Thanks for fast response. Unfortunately I cannot post the WSDL due
 to
legal reasons. Sorry!
  
  
   Are  you testing with the Axis2 1.1.1 or with nightly builds?
  
  1.1.1
 
   Is there a way, to integrate a generated XML beans jar (and skip the
generation error)?
  
  
   You should be able to interage the XML beans jar seperately.
  
   Does it generates the Skelton and stub classes correctly?
  
  No, generation stops immediately and no classes are generated.
 
   If not try some thing like this to generate stub and skelton
 correctly.
   Remove all the elements except the elements which are directly call by
  the
   wsdl messages.
   then remove the inner parts of the elements and complex types of the
   remaining elements as well.
   basically you keep minimal set of elements to comple the wsdl.
  
   So if you generate the code now it should generate the stub and
 skelton
   classes correctly. since there only simple complex and elements (I
 hope
   you
   got my point).
 
  I will try to remove all parts from WSDL, which are not directly part of
  the service interface. After that I will use the already generated
 XMLBeans
  jar, containg the real beans. I wonder, if this will work reliantly.
 
 I can't gurantee but theoratically it should be.
 
 Would you recommend to use Axis2 (1.1.1) in production?
 
 
 yes.
 After 1.1.1 we did lot of improvments to adb. So if you can have a look at
 with a nighly build or the RC1
 (which is due to relase this friday) then you can veryfy whether it
 supports
 adb or not.
 
 On the other hand you can try with jibx as well. The advantage of both adb
 and the jibx is that they are faster than xmlbeans.
 
 We hope to release Axis2 1.2  which will be in better production quality
 middle of april.
 
  then integrate the correct classes by generating them seperately.
  
   One other question in Xfier case what it generates when you data bind
  with
   xmlbeans?
 
  With XFire I have to generate XMLbeans before and add them to their ANT
  generation-task classpath. As result, a service interface using XMLBeans
 is
  generated (and other stub stuff).
 
 
  
    Original-Nachricht 
Datum: Wed, 21 Mar 2007 10:09:42 +
Von: Paul Fremantle [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions
   
 Hi

 A couple of suggestions. Firstly - we would really like it if you
 could post the WSDL as a JIRA (bug report) so that we can fix the
  ADB
 and XMLBeans issues.

 The other option you could try is either JAXB or JIBX which are
  other
 databinding frameworks that work with Axis2.

 Paul

 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  update:
 
  Our given WSDL seems to be really challenging. With ADB,
  attributes
are
 missing in the generated classes. With XMLBeans, everything is
   generated
 fine. Therefore I must use XMLBeans. Is there any way to use an
   existing
 xmlbeans jar with axis2 (due to generation problem mentioned in my
previous
 post).
 
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 09:57:00 +0100
  Von: [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Data binding questions
 
   Hi,
  
   I have some questions about data binding:
  
   We have a rather complex wsdl, which does not work with axis
 1.x
   WSDL2Java. Therefore we are planning to move to a newer SOAP
   engine.
  
   Our partner recommends to use XFire with XMLbeans, but I want
 to
give
 Axis
   2 a try, too. If I use XMLbeans binding, 

Re: Data binding questions

2007-03-21 Thread seehamster
update:
jar's are indeed a problem and especially xmlbeans version is incompatible with 
our existing third party libraries. 
I tried Axis2 nigthly builds in order to use ADB instead of XMLBeans. At first, 
the generated classes really looked good; most attributes which were missing 
with 1.1.1 had been generated. But still some attributes of WSDL are ignored. 
Only XMLBeans seems to work at the moment. :-(

It's very unsatisfiying, because I do not want to change any third-party 
libraries due to XML beans. 


 Original-Nachricht 
Datum: Wed, 21 Mar 2007 16:09:11 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 update:
 After removing all inner parts of the WSDL as suggested, I was able to
 generate a Stub. Then I have removed all XMLBeans stuff and used the real
 xmlbeans-jar. Finally, I could to sent a request against an XFire server
 successfully. :-) 
 
 Hope, that other parts of Axis2 are ready for production so far.
 
 Now i am entering next level: Jar-Hell
 
 We have to maintain old Axis 1.x clients and a lot of other jar's in
 different versions used by our application and axis2.
 
 I do not have found any jar dependency list. Could you tell me please,
 which jar's do I need for client calls (just simple calls without security and
 stuff like that) and what are your advices for preventing jar version
 problems (I already have some ideas, but look for other solutions).
 
  Original-Nachricht 
 Datum: Wed, 21 Mar 2007 18:34:40 +0530
 Von: Amila Suriarachchi [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions
 
  On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   Please see my answers below...
  
  
    Original-Nachricht 
   Datum: Wed, 21 Mar 2007 17:32:26 +0530
   Von: Amila Suriarachchi [EMAIL PROTECTED]
   An: axis-user@ws.apache.org
   Betreff: Re: Data binding questions
  
On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Thanks for fast response. Unfortunately I cannot post the WSDL due
  to
 legal reasons. Sorry!
   
   
Are  you testing with the Axis2 1.1.1 or with nightly builds?
   
   1.1.1
  
Is there a way, to integrate a generated XML beans jar (and skip the
 generation error)?
   
   
You should be able to interage the XML beans jar seperately.
   
Does it generates the Skelton and stub classes correctly?
   
   No, generation stops immediately and no classes are generated.
  
If not try some thing like this to generate stub and skelton
  correctly.
Remove all the elements except the elements which are directly call
 by
   the
wsdl messages.
then remove the inner parts of the elements and complex types of the
remaining elements as well.
basically you keep minimal set of elements to comple the wsdl.
   
So if you generate the code now it should generate the stub and
  skelton
classes correctly. since there only simple complex and elements (I
  hope
you
got my point).
  
   I will try to remove all parts from WSDL, which are not directly part
 of
   the service interface. After that I will use the already generated
  XMLBeans
   jar, containg the real beans. I wonder, if this will work reliantly.
  
  I can't gurantee but theoratically it should be.
  
  Would you recommend to use Axis2 (1.1.1) in production?
  
  
  yes.
  After 1.1.1 we did lot of improvments to adb. So if you can have a look
 at
  with a nighly build or the RC1
  (which is due to relase this friday) then you can veryfy whether it
  supports
  adb or not.
  
  On the other hand you can try with jibx as well. The advantage of both
 adb
  and the jibx is that they are faster than xmlbeans.
  
  We hope to release Axis2 1.2  which will be in better production quality
  middle of april.
  
   then integrate the correct classes by generating them seperately.
   
One other question in Xfier case what it generates when you data
 bind
   with
xmlbeans?
  
   With XFire I have to generate XMLbeans before and add them to their
 ANT
   generation-task classpath. As result, a service interface using
 XMLBeans
  is
   generated (and other stub stuff).
  
  
   
 Original-Nachricht 
 Datum: Wed, 21 Mar 2007 10:09:42 +
 Von: Paul Fremantle [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions

  Hi
 
  A couple of suggestions. Firstly - we would really like it if
 you
  could post the WSDL as a JIRA (bug report) so that we can fix
 the
   ADB
  and XMLBeans issues.
 
  The other option you could try is either JAXB or JIBX which are
   other
  databinding frameworks that work with Axis2.
 
  Paul
 
  On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   update:
  
   Our given WSDL seems to be really challenging. With ADB,
   attributes
 are
  missing in the 

Re: Data binding questions

2007-03-21 Thread seehamster
I have figured out the reason, why attributes are not generated. In WSDL the 
type of the attribute is declared not inside the attribute tag itself, but in a 
restriction tag under the attribute tag:

attribute name=attr1 use=required
  simpleType
restriction base=xs:string
...

XMLBeans is able to generate the correct java type. ADM ignores the attribute 
completely, altough this WSDL declaration is correct IMHO. Could you try to fix 
this please?


 Original-Nachricht 
Datum: Wed, 21 Mar 2007 18:06:46 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 update:
 jar's are indeed a problem and especially xmlbeans version is incompatible
 with our existing third party libraries. 
 I tried Axis2 nigthly builds in order to use ADB instead of XMLBeans. At
 first, the generated classes really looked good; most attributes which were
 missing with 1.1.1 had been generated. But still some attributes of WSDL
 are ignored. Only XMLBeans seems to work at the moment. :-(
 
 It's very unsatisfiying, because I do not want to change any third-party
 libraries due to XML beans. 
 
 
  Original-Nachricht 
 Datum: Wed, 21 Mar 2007 16:09:11 +0100
 Von: [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions
 
  update:
  After removing all inner parts of the WSDL as suggested, I was able to
  generate a Stub. Then I have removed all XMLBeans stuff and used the
 real
  xmlbeans-jar. Finally, I could to sent a request against an XFire server
  successfully. :-) 
  
  Hope, that other parts of Axis2 are ready for production so far.
  
  Now i am entering next level: Jar-Hell
  
  We have to maintain old Axis 1.x clients and a lot of other jar's in
  different versions used by our application and axis2.
  
  I do not have found any jar dependency list. Could you tell me please,
  which jar's do I need for client calls (just simple calls without
 security and
  stuff like that) and what are your advices for preventing jar version
  problems (I already have some ideas, but look for other solutions).
  
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 18:34:40 +0530
  Von: Amila Suriarachchi [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
  
   On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
Please see my answers below...
   
   
 Original-Nachricht 
Datum: Wed, 21 Mar 2007 17:32:26 +0530
Von: Amila Suriarachchi [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions
   
 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Thanks for fast response. Unfortunately I cannot post the WSDL
 due
   to
  legal reasons. Sorry!


 Are  you testing with the Axis2 1.1.1 or with nightly builds?

1.1.1
   
 Is there a way, to integrate a generated XML beans jar (and skip
 the
  generation error)?


 You should be able to interage the XML beans jar seperately.

 Does it generates the Skelton and stub classes correctly?

No, generation stops immediately and no classes are generated.
   
 If not try some thing like this to generate stub and skelton
   correctly.
 Remove all the elements except the elements which are directly
 call
  by
the
 wsdl messages.
 then remove the inner parts of the elements and complex types of
 the
 remaining elements as well.
 basically you keep minimal set of elements to comple the wsdl.

 So if you generate the code now it should generate the stub and
   skelton
 classes correctly. since there only simple complex and elements (I
   hope
 you
 got my point).
   
I will try to remove all parts from WSDL, which are not directly
 part
  of
the service interface. After that I will use the already generated
   XMLBeans
jar, containg the real beans. I wonder, if this will work
 reliantly.
   
   I can't gurantee but theoratically it should be.
   
   Would you recommend to use Axis2 (1.1.1) in production?
   
   
   yes.
   After 1.1.1 we did lot of improvments to adb. So if you can have a
 look
  at
   with a nighly build or the RC1
   (which is due to relase this friday) then you can veryfy whether it
   supports
   adb or not.
   
   On the other hand you can try with jibx as well. The advantage of both
  adb
   and the jibx is that they are faster than xmlbeans.
   
   We hope to release Axis2 1.2  which will be in better production
 quality
   middle of april.
   
then integrate the correct classes by generating them seperately.

 One other question in Xfier case what it generates when you data
  bind
with
 xmlbeans?
   
With XFire I have to generate XMLbeans before and add them to their
  ANT
generation-task classpath. As result, a service interface using
  XMLBeans
   is
generated (and other stub stuff).
   
   

Re: Data binding questions

2007-03-21 Thread seehamster

There is another bug concerning maxLength restriction. The following 
restriction:

minLength value=10/
maxLength value=80/

results in the following code:

  if (  (10  java.lang.String.valueOf(param).length())   
(java.lang.String.valueOf(param).length() = 80)  ) {
this.value=param;
}
else {
throw new 
java.lang.RuntimeException();
}

The last comparison should be = and not =. The first check should include 10 
in my opinion.

I have figured out the reason, why attributes are not generated. In WSDL the 
type of the attribute is declared not inside the attribute tag itself, but in 
a restriction tag under the attribute tag:

attribute name=attr1 use=required
  simpleType
restriction base=xs:string
...

XMLBeans is able to generate the correct java type. ADM ignores the attribute 
completely, altough this WSDL declaration is correct IMHO. Could you try to 
fix this please?


 Original-Nachricht 
Datum: Wed, 21 Mar 2007 18:06:46 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 update:
 jar's are indeed a problem and especially xmlbeans version is incompatible
 with our existing third party libraries. 
 I tried Axis2 nigthly builds in order to use ADB instead of XMLBeans. At
 first, the generated classes really looked good; most attributes which were
 missing with 1.1.1 had been generated. But still some attributes of WSDL
 are ignored. Only XMLBeans seems to work at the moment. :-(
 
 It's very unsatisfiying, because I do not want to change any third-party
 libraries due to XML beans. 
 
 
  Original-Nachricht 
 Datum: Wed, 21 Mar 2007 16:09:11 +0100
 Von: [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions
 
  update:
  After removing all inner parts of the WSDL as suggested, I was able to
  generate a Stub. Then I have removed all XMLBeans stuff and used the
 real
  xmlbeans-jar. Finally, I could to sent a request against an XFire server
  successfully. :-) 
  
  Hope, that other parts of Axis2 are ready for production so far.
  
  Now i am entering next level: Jar-Hell
  
  We have to maintain old Axis 1.x clients and a lot of other jar's in
  different versions used by our application and axis2.
  
  I do not have found any jar dependency list. Could you tell me please,
  which jar's do I need for client calls (just simple calls without
 security and
  stuff like that) and what are your advices for preventing jar version
  problems (I already have some ideas, but look for other solutions).
  
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 18:34:40 +0530
  Von: Amila Suriarachchi [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
  
   On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
Please see my answers below...
   
   
 Original-Nachricht 
Datum: Wed, 21 Mar 2007 17:32:26 +0530
Von: Amila Suriarachchi [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions
   
 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Thanks for fast response. Unfortunately I cannot post the WSDL
 due
   to
  legal reasons. Sorry!


 Are  you testing with the Axis2 1.1.1 or with nightly builds?

1.1.1
   
 Is there a way, to integrate a generated XML beans jar (and skip
 the
  generation error)?


 You should be able to interage the XML beans jar seperately.

 Does it generates the Skelton and stub classes correctly?

No, generation stops immediately and no classes are generated.
   
 If not try some thing like this to generate stub and skelton
   correctly.
 Remove all the elements except the elements which are directly
 call
  by
the
 wsdl messages.
 then remove the inner parts of the elements and complex types of
 the
 remaining elements as well.
 basically you keep minimal set of elements to comple the wsdl.

 So if you generate the code now it should generate the stub and
   skelton
 classes correctly. since there only simple complex and elements (I
   hope
 you
 got my point).
   
I will try to remove all parts from WSDL, which are not directly
 part
  of
the service interface. After that I will use the already generated
   XMLBeans
jar, containg the real beans. I wonder, if this will work
 reliantly.
   
   I can't gurantee but theoratically it should be.
   
   Would you recommend to use Axis2 (1.1.1) in production?
   
   
   yes.
   After 1.1.1 we did lot of improvments to adb. So if you can have a
 look
  at
   with a nighly build or the RC1
   (which is due to relase this friday) then you can veryfy whether it
  

Re: Data binding questions

2007-03-21 Thread seehamster

And another one (again with the nightly build).

During serialization the code runs into an endless loop. If have debugged until 
I came to this code fragment in one of the ADB generated classes:

private java.lang.String registerPrefix(..) {
...

 while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
prefix = createPrefix();
}

The while condition always returns true. Please could you track this down, too. 
I really would appreciate it, if I could use ADB instead of XMLBeans.

 Original-Nachricht 
Datum: Wed, 21 Mar 2007 19:17:23 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 
 There is another bug concerning maxLength restriction. The following
 restriction:
 
 minLength value=10/
 maxLength value=80/
 
 results in the following code:
 
   if (  (10  java.lang.String.valueOf(param).length())  
 (java.lang.String.valueOf(param).length() = 80)  ) {
 this.value=param;
 }
 else {
 throw new
 java.lang.RuntimeException();
 }
 
 The last comparison should be = and not =. The first check should
 include 10 in my opinion.
 
 I have figured out the reason, why attributes are not generated. In WSDL
 the type of the attribute is declared not inside the attribute tag itself,
 but in a restriction tag under the attribute tag:
 
 attribute name=attr1 use=required
   simpleType
 restriction base=xs:string
 ...
 
 XMLBeans is able to generate the correct java type. ADM ignores the
 attribute completely, altough this WSDL declaration is correct IMHO. Could 
 you
 try to fix this please?
 
 
  Original-Nachricht 
 Datum: Wed, 21 Mar 2007 18:06:46 +0100
 Von: [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions
 
  update:
  jar's are indeed a problem and especially xmlbeans version is
 incompatible
  with our existing third party libraries. 
  I tried Axis2 nigthly builds in order to use ADB instead of XMLBeans. At
  first, the generated classes really looked good; most attributes which
 were
  missing with 1.1.1 had been generated. But still some attributes of WSDL
  are ignored. Only XMLBeans seems to work at the moment. :-(
  
  It's very unsatisfiying, because I do not want to change any third-party
  libraries due to XML beans. 
  
  
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 16:09:11 +0100
  Von: [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
  
   update:
   After removing all inner parts of the WSDL as suggested, I was able to
   generate a Stub. Then I have removed all XMLBeans stuff and used the
  real
   xmlbeans-jar. Finally, I could to sent a request against an XFire
 server
   successfully. :-) 
   
   Hope, that other parts of Axis2 are ready for production so far.
   
   Now i am entering next level: Jar-Hell
   
   We have to maintain old Axis 1.x clients and a lot of other jar's in
   different versions used by our application and axis2.
   
   I do not have found any jar dependency list. Could you tell me please,
   which jar's do I need for client calls (just simple calls without
  security and
   stuff like that) and what are your advices for preventing jar version
   problems (I already have some ideas, but look for other solutions).
   
    Original-Nachricht 
   Datum: Wed, 21 Mar 2007 18:34:40 +0530
   Von: Amila Suriarachchi [EMAIL PROTECTED]
   An: axis-user@ws.apache.org
   Betreff: Re: Data binding questions
   
On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Please see my answers below...


  Original-Nachricht 
 Datum: Wed, 21 Mar 2007 17:32:26 +0530
 Von: Amila Suriarachchi [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions

  On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   Thanks for fast response. Unfortunately I cannot post the WSDL
  due
to
   legal reasons. Sorry!
 
 
  Are  you testing with the Axis2 1.1.1 or with nightly builds?
 
 1.1.1

  Is there a way, to integrate a generated XML beans jar (and skip
  the
   generation error)?
 
 
  You should be able to interage the XML beans jar seperately.
 
  Does it generates the Skelton and stub classes correctly?
 
 No, generation stops immediately and no classes are generated.

  If not try some thing like this to generate stub and skelton
correctly.
  Remove all the elements except the elements which are directly
  call
   by
 the
  wsdl messages.
  then remove the inner parts of the elements and complex types of
  the
  remaining 

Re: Data binding questions

2007-03-21 Thread seehamster

should have waited a little with the last email. The problem is this method:

private java.lang.String createPrefix() {
return ns + (int)Math.random();
  }

It will always return ns0, because Math.random return a value betwen 0.0 and 
 1. Should be fixed IMHO.

 Original-Nachricht 
Datum: Wed, 21 Mar 2007 23:40:29 +0100
Von: [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 
 And another one (again with the nightly build).
 
 During serialization the code runs into an endless loop. If have debugged
 until I came to this code fragment in one of the ADB generated classes:
 
 private java.lang.String registerPrefix(..) {
 ...
 
  while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
 prefix = createPrefix();
 }
 
 The while condition always returns true. Please could you track this down,
 too. I really would appreciate it, if I could use ADB instead of XMLBeans.
 
  Original-Nachricht 
 Datum: Wed, 21 Mar 2007 19:17:23 +0100
 Von: [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: Data binding questions
 
  
  There is another bug concerning maxLength restriction. The following
  restriction:
  
  minLength value=10/
  maxLength value=80/
  
  results in the following code:
  
if (  (10  java.lang.String.valueOf(param).length())  
  (java.lang.String.valueOf(param).length() = 80)  ) {
  this.value=param;
  }
  else {
  throw new
  java.lang.RuntimeException();
  }
  
  The last comparison should be = and not =. The first check should
  include 10 in my opinion.
  
  I have figured out the reason, why attributes are not generated. In
 WSDL
  the type of the attribute is declared not inside the attribute tag
 itself,
  but in a restriction tag under the attribute tag:
  
  attribute name=attr1 use=required
simpleType
  restriction base=xs:string
  ...
  
  XMLBeans is able to generate the correct java type. ADM ignores the
  attribute completely, altough this WSDL declaration is correct IMHO.
 Could you
  try to fix this please?
  
  
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 18:06:46 +0100
  Von: [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
  
   update:
   jar's are indeed a problem and especially xmlbeans version is
  incompatible
   with our existing third party libraries. 
   I tried Axis2 nigthly builds in order to use ADB instead of XMLBeans.
 At
   first, the generated classes really looked good; most attributes which
  were
   missing with 1.1.1 had been generated. But still some attributes of
 WSDL
   are ignored. Only XMLBeans seems to work at the moment. :-(
   
   It's very unsatisfiying, because I do not want to change any
 third-party
   libraries due to XML beans. 
   
   
    Original-Nachricht 
   Datum: Wed, 21 Mar 2007 16:09:11 +0100
   Von: [EMAIL PROTECTED]
   An: axis-user@ws.apache.org
   Betreff: Re: Data binding questions
   
update:
After removing all inner parts of the WSDL as suggested, I was able
 to
generate a Stub. Then I have removed all XMLBeans stuff and used the
   real
xmlbeans-jar. Finally, I could to sent a request against an XFire
  server
successfully. :-) 

Hope, that other parts of Axis2 are ready for production so far.

Now i am entering next level: Jar-Hell

We have to maintain old Axis 1.x clients and a lot of other jar's in
different versions used by our application and axis2.

I do not have found any jar dependency list. Could you tell me
 please,
which jar's do I need for client calls (just simple calls without
   security and
stuff like that) and what are your advices for preventing jar
 version
problems (I already have some ideas, but look for other solutions).

 Original-Nachricht 
Datum: Wed, 21 Mar 2007 18:34:40 +0530
Von: Amila Suriarachchi [EMAIL PROTECTED]
An: axis-user@ws.apache.org
Betreff: Re: Data binding questions

 On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Please see my answers below...
 
 
   Original-Nachricht 
  Datum: Wed, 21 Mar 2007 17:32:26 +0530
  Von: Amila Suriarachchi [EMAIL PROTECTED]
  An: axis-user@ws.apache.org
  Betreff: Re: Data binding questions
 
   On 3/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
Thanks for fast response. Unfortunately I cannot post the
 WSDL
   due
 to
legal reasons. Sorry!
  
  
   Are  you testing with the Axis2 1.1.1 or with nightly builds?
  
  1.1.1
 
   Is there a way, to 

Multithreading issues in client

2005-12-06 Thread seehamster
Hi,

I have a question concerning thread-safety of wsdl2java generated client
stubs. These topic has been posted several times and unfortunately the
answers are as numerous, too. Some users say, that stubs are safe, because
there are synchronized code blocks inside axis code, some others say, that a
class which does not explictly state that it is thread-safe, should be
treated as not-threadsafe. Even in the developer list there seems to be no
consens about this matter.
Altough I do not need axis authentication and state management, which seems
to be the main possible problems with sharing one client instance, I want to
write robust code. Creating a stub (and a locator) for every call, is a lot
of overhead in my opinion. As a workaround I have used Jakarta Commons Pool
to keep a pool of ready-to-use clients, like a JDBC connection pool. But
this may introduce same new bugs (new library, more coding). It would be
very helpful, if in further axis releases, threading issues in client code
will be mentioned.

Greetings,
Christoph

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++