You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mancinelli Elodie <el...@bull.net> on 2006/07/13 16:08:02 UTC

[MTOM/XOP+WSRM] servlet error

Hi all,

I want to realise an client-server which supports MTOM and WSRM. I 
created separatly a client-server with MTOM and a client-server with WSRM.

My server has two methods: OneWay and RequestResponse.

- When I launch my client to test the RequestResponse method:
In TCPMon, I see, the CreateSequence and the CreateSequenceResponse. My 
first message is sent and it is accpeted.
But my client never receives the response and there is no trace on my 
server, the method seems not be executed.

- When I launch my client to test the OneWay method:
In TCPMon, I see:
- CreateSequence, CreateSequenceResponse
- Three messages have send and three acknowledgments
But no TerminateSequence.
And on the server, there is an error:
- "Servlet.service()" pour la servlet AxisServlet a généré une exception
java.lang.IllegalStateException: Impossible de créer une sessionaprès 
que la réponse ait été envoyée
        at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
        at 
org.apache.catalina.connector.Request.getSession(Request.java:2024)
        at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
        at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
        at 
org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt(AxisServlet.java:81)
        at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

I have no informations in catalina logs.
In precedent mails, somebody advise me to change the value of 
InOrderInvoker in the module.xml, but when I change this, client-server 
with MTOM only and client-server with WSRM only don't works.
I have download the sandesha2-SNAPSHOT.mar 
(http://people.apache.org/repository/sandesha2/mars/)

Someone have an idea?

Thanks a lot

Elodie






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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Ok, my tomcat run correctly, in fact, I have take the last version of 
jars and they have probably an error.
So I an other version of jars with the last version of mar and it don't 
change the problem.

I try to download the mar or chechout the project and create it.  The 
problem is always:

For Oneway addressable, I saw message soap but the server method is 
nerver call.
For the RequestResponse addressable, I saw the createSequence and the 
first message, the client don't receive response and the server method 
is nerver call.

Regards

Elodie

Mancinelli Elodie wrote:

> Hi Chamikara,
>
> Thanks for your explain.
>
> I download the mar and jar last version on link. I change the value of 
> InOrderInvocation to false in the module.xml.
> And now, I have an error, at the start of tomcat.
>
> - Deploying module : sandesha2
> - StandardWrapper.Throwable
> java.lang.ExceptionInInitializerError
>        at 
> org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) 
>
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 
>
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 
>
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>        at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>        at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
>
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
>
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>        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:585)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource 
> 'org.apache.sandesha2.i18n.resource'
>        at 
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259) 
>
>        at 
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19) 
>
>        ... 32 more
> - La servlet /axis2 a généré une exception "load()"
> java.lang.ExceptionInInitializerError
>        at 
> org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) 
>
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 
>
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 
>
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>        at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>        at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
>
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
>
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>        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:585)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource 
> 'org.apache.sandesha2.i18n.resource'
>        at 
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259) 
>
>        at 
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19) 
>
>        ... 32 more
>
> And when I check out the project and I create my mar and jar, I have 
> the same error. The module seems to not be initiate. I search to 
> resolve the problem but I don't find the solution. I join you the 
> cataliana log, there are errors on listeners classes (ContextListener 
> and SessionListener) but I think it's not the same problem and it 
> don't have consequences on my problem.
>
> Thanks for your time.
>
> Regards
> Elodie
>
>
> Chamikara Jayalath wrote:
>
>> Hi Elodie,
>>
>> Please see my comments below.
>>
>> On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
>> <ma...@bull.net>> wrote:
>>
>>     Hi Chamikara,
>>
>>     Your solution is correct.  Can you explain me what is this
>>     property and
>>     why it allows to pass the bug?
>>
>>
>>
>> In WSRM the messages that belong to a sequence are numbered starting 
>> from one. If this InvokeInOrder property is set to true, Sandesha2 
>> will make sure that the messages get invoked in the order of these 
>> message numbers. This is a delivery assurance provided by Sadesha2 
>> which is not a must to comply with the WSRM specification. So you can 
>> safely set it to false if you do not worry abt ardering. Infact 
>> disabling this will improve the performance.
>>
>> In implementation wise, we achieve ordering using a seperate thread. 
>> If InvokeInORder is set to true, messages will be paused at the RM 
>> handlers and invocation will be done in the order of message numbers 
>> using our thread. When a message get paused the current thread get 
>> returned and the incoming sockets with the client get closed.
>>
>> The bug is with axis2 not reading the attachments from the stream 
>> before this closing of the socket.
>>
>>     Change this property, make other mistake:
>>     The problem is when I implement method addressable ( i.e. I 
>> define the
>>     ReplyTo and AcksTo value for WSRM implementation). I have also the
>>     same
>>     problem in MTOMRM implementation.
>>     These values change with this code:
>>     String acksTo =
>>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
>>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>>     and
>>     options.setUseSeparateListener(true);
>>     In this case, for a RequestResponse method I see only the
>>     CreateSequence
>>     and the first message, others messages never sent. The client never
>>     receive the server response and the  server method is never called.
>>
>>     For OneWay method, in TCPMon, there are all soap messages, but no
>>     server
>>     reactions. The  server method is never called.
>>
>>     Have you an idea?
>>
>>
>> I guess this is the bug i fixed yested day. Please try the latest 
>> SNAPSHOT from
>> http://people.apache.org/repository/sandesha2/mars/
>>
>>
>> Chamikara
>>
>>
>>     Thanks for your help.
>>
>>     Regards,
>>
>>     Elodie
>>
>>     Chamikara Jayalath wrote:
>>
>>     > Hi Elodie,
>>     >
>>     > I just fixed a bug in Sandesha2 not-in-order case is working
>>     properly now.
>>     >
>>     > Currently MTOM+RM will not work when InOrderInvocation property
>>     is set
>>     > to true. This is due to a bug in OM  (
>>     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>>     >
>>     > But it perfectly works when InOrderInvocation is set to false. I
>>     just
>>     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
>>     > Currentlly the code in the test method is commented till the
>>     previous
>>     > bug is fixed. But it passes when InOrderInvation is disabled.
>>     >
>>     > Hope this will help you.
>>     >
>>     > Chamikara
>>     >
>>     >
>>
>
>
>------------------------------------------------------------------------
>
>21 juil. 2006 08:43:56 org.apache.catalina.core.ApplicationContext log
>INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.ContextListener
>java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: jsp-examples/WEB-INF/classes/listeners/ContextListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.SessionListener
>java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: jsp-examples/WEB-INF/classes/listeners/SessionListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: L'installation des écouteurs (listeners) de l'application a été sautée suite aux erreurs précédentes
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.ContextListener
>java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: servlets-examples/WEB-INF/classes/listeners/ContextListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.SessionListener
>java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: servlets-examples/WEB-INF/classes/listeners/SessionListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: L'installation des écouteurs (listeners) de l'application a été sautée suite aux erreurs précédentes
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Ok, my tomcat run correctly, in fact, I have take the last version of 
jars and they have probably an error.
So I an other version of jars with the last version of mar and it don't 
change the problem.

I try to download the mar or chechout the project and create it.  The 
problem is always:

For Oneway addressable, I saw message soap but the server method is 
nerver call.
For the RequestResponse addressable, I saw the createSequence and the 
first message, the client don't receive response and the server method 
is nerver call.

Regards

Elodie

Mancinelli Elodie wrote:

> Hi Chamikara,
>
> Thanks for your explain.
>
> I download the mar and jar last version on link. I change the value of 
> InOrderInvocation to false in the module.xml.
> And now, I have an error, at the start of tomcat.
>
> - Deploying module : sandesha2
> - StandardWrapper.Throwable
> java.lang.ExceptionInInitializerError
>        at 
> org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) 
>
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 
>
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 
>
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>        at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>        at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
>
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
>
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>        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:585)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource 
> 'org.apache.sandesha2.i18n.resource'
>        at 
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259) 
>
>        at 
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19) 
>
>        ... 32 more
> - La servlet /axis2 a généré une exception "load()"
> java.lang.ExceptionInInitializerError
>        at 
> org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) 
>
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 
>
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 
>
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>        at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>        at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
>
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
>
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>        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:585)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource 
> 'org.apache.sandesha2.i18n.resource'
>        at 
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259) 
>
>        at 
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19) 
>
>        ... 32 more
>
> And when I check out the project and I create my mar and jar, I have 
> the same error. The module seems to not be initiate. I search to 
> resolve the problem but I don't find the solution. I join you the 
> cataliana log, there are errors on listeners classes (ContextListener 
> and SessionListener) but I think it's not the same problem and it 
> don't have consequences on my problem.
>
> Thanks for your time.
>
> Regards
> Elodie
>
>
> Chamikara Jayalath wrote:
>
>> Hi Elodie,
>>
>> Please see my comments below.
>>
>> On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
>> <ma...@bull.net>> wrote:
>>
>>     Hi Chamikara,
>>
>>     Your solution is correct.  Can you explain me what is this
>>     property and
>>     why it allows to pass the bug?
>>
>>
>>
>> In WSRM the messages that belong to a sequence are numbered starting 
>> from one. If this InvokeInOrder property is set to true, Sandesha2 
>> will make sure that the messages get invoked in the order of these 
>> message numbers. This is a delivery assurance provided by Sadesha2 
>> which is not a must to comply with the WSRM specification. So you can 
>> safely set it to false if you do not worry abt ardering. Infact 
>> disabling this will improve the performance.
>>
>> In implementation wise, we achieve ordering using a seperate thread. 
>> If InvokeInORder is set to true, messages will be paused at the RM 
>> handlers and invocation will be done in the order of message numbers 
>> using our thread. When a message get paused the current thread get 
>> returned and the incoming sockets with the client get closed.
>>
>> The bug is with axis2 not reading the attachments from the stream 
>> before this closing of the socket.
>>
>>     Change this property, make other mistake:
>>     The problem is when I implement method addressable ( i.e. I 
>> define the
>>     ReplyTo and AcksTo value for WSRM implementation). I have also the
>>     same
>>     problem in MTOMRM implementation.
>>     These values change with this code:
>>     String acksTo =
>>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
>>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>>     and
>>     options.setUseSeparateListener(true);
>>     In this case, for a RequestResponse method I see only the
>>     CreateSequence
>>     and the first message, others messages never sent. The client never
>>     receive the server response and the  server method is never called.
>>
>>     For OneWay method, in TCPMon, there are all soap messages, but no
>>     server
>>     reactions. The  server method is never called.
>>
>>     Have you an idea?
>>
>>
>> I guess this is the bug i fixed yested day. Please try the latest 
>> SNAPSHOT from
>> http://people.apache.org/repository/sandesha2/mars/
>>
>>
>> Chamikara
>>
>>
>>     Thanks for your help.
>>
>>     Regards,
>>
>>     Elodie
>>
>>     Chamikara Jayalath wrote:
>>
>>     > Hi Elodie,
>>     >
>>     > I just fixed a bug in Sandesha2 not-in-order case is working
>>     properly now.
>>     >
>>     > Currently MTOM+RM will not work when InOrderInvocation property
>>     is set
>>     > to true. This is due to a bug in OM  (
>>     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>>     >
>>     > But it perfectly works when InOrderInvocation is set to false. I
>>     just
>>     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
>>     > Currentlly the code in the test method is commented till the
>>     previous
>>     > bug is fixed. But it passes when InOrderInvation is disabled.
>>     >
>>     > Hope this will help you.
>>     >
>>     > Chamikara
>>     >
>>     >
>>
>
>
>------------------------------------------------------------------------
>
>21 juil. 2006 08:43:56 org.apache.catalina.core.ApplicationContext log
>INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.ContextListener
>java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: jsp-examples/WEB-INF/classes/listeners/ContextListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.SessionListener
>java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: jsp-examples/WEB-INF/classes/listeners/SessionListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: L'installation des écouteurs (listeners) de l'application a été sautée suite aux erreurs précédentes
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.ContextListener
>java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: servlets-examples/WEB-INF/classes/listeners/ContextListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.SessionListener
>java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: servlets-examples/WEB-INF/classes/listeners/SessionListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: L'installation des écouteurs (listeners) de l'application a été sautée suite aux erreurs précédentes
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Eoldie,

I checked Sandesha2 for all anonymous/addressble and ping/echo scenarios. it
seemed to be working. Cannot figure out why you are getting this error.

If you send me the files you are using I can do a debug. (the client code,
the service, and the mar file if u hv changed it). Probably you can host it
somewhere and send me the link.

Chamikara


On 7/24/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Sanjiva,
>
> Thanks for your interest
>
> I want to specify my problem.
> The problem become when I implement a method addressable(ie I define the
> AcksTo and ReplyTo value) because the anonymous method (no addressable)
> works correctly.
>
> I test an implementation of wsrm and I have the same problem as mtomrm,
> when I launch an addressable client to test the oneway method I saw all
> messages soap but the service is not execute and to test the
> requestresponse method, I see only the CreateSequence and the first
> message, the service is not execute and the client not receive the
> server response.
>
> When I launch the client mtomrm and wsrm oneway but not addressable, no
> problem, my service is execute correctly.
>
> This problem appears with the last version of mar for wsrm addressable
> which works with an precedent version. But the mtomrm addressable never
> works and need the last version of mar.
>
> The resource.properties file is present in the package
> 'org.apache.sandesha2.i18n' and it seems to be ok.
>
> I hope I have been more clear.
> Have you an idea?
>
> Regards,
> Elodie
>
>
> Sanjiva Weerawarana wrote:
>
> >On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
> >
> >
> >>Hi Elodie,
> >>
> >>The reason for this error is resource.properties file not being
> >>available in the package 'org.apache.sandesha2.i18n'. Please check
> >>weather it is available in the 'mar' file you are using.
> >>
> >>
> >
> >Isn't the problem a default locale issue? Looks like Elodie is running
> >with French and hence the file searched for doesn't exist.
> >
> >Sanjiva.
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Eoldie,

I checked Sandesha2 for all anonymous/addressble and ping/echo scenarios. it
seemed to be working. Cannot figure out why you are getting this error.

If you send me the files you are using I can do a debug. (the client code,
the service, and the mar file if u hv changed it). Probably you can host it
somewhere and send me the link.

Chamikara


On 7/24/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Sanjiva,
>
> Thanks for your interest
>
> I want to specify my problem.
> The problem become when I implement a method addressable(ie I define the
> AcksTo and ReplyTo value) because the anonymous method (no addressable)
> works correctly.
>
> I test an implementation of wsrm and I have the same problem as mtomrm,
> when I launch an addressable client to test the oneway method I saw all
> messages soap but the service is not execute and to test the
> requestresponse method, I see only the CreateSequence and the first
> message, the service is not execute and the client not receive the
> server response.
>
> When I launch the client mtomrm and wsrm oneway but not addressable, no
> problem, my service is execute correctly.
>
> This problem appears with the last version of mar for wsrm addressable
> which works with an precedent version. But the mtomrm addressable never
> works and need the last version of mar.
>
> The resource.properties file is present in the package
> 'org.apache.sandesha2.i18n' and it seems to be ok.
>
> I hope I have been more clear.
> Have you an idea?
>
> Regards,
> Elodie
>
>
> Sanjiva Weerawarana wrote:
>
> >On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
> >
> >
> >>Hi Elodie,
> >>
> >>The reason for this error is resource.properties file not being
> >>available in the package 'org.apache.sandesha2.i18n'. Please check
> >>weather it is available in the 'mar' file you are using.
> >>
> >>
> >
> >Isn't the problem a default locale issue? Looks like Elodie is running
> >with French and hence the file searched for doesn't exist.
> >
> >Sanjiva.
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Sanjiva,

Thanks for your interest

I want to specify my problem.
The problem become when I implement a method addressable(ie I define the 
AcksTo and ReplyTo value) because the anonymous method (no addressable) 
works correctly.

I test an implementation of wsrm and I have the same problem as mtomrm, 
when I launch an addressable client to test the oneway method I saw all 
messages soap but the service is not execute and to test the 
requestresponse method, I see only the CreateSequence and the first 
message, the service is not execute and the client not receive the 
server response.

When I launch the client mtomrm and wsrm oneway but not addressable, no 
problem, my service is execute correctly.

This problem appears with the last version of mar for wsrm addressable 
which works with an precedent version. But the mtomrm addressable never 
works and need the last version of mar.

The resource.properties file is present in the package 
'org.apache.sandesha2.i18n' and it seems to be ok.

I hope I have been more clear.
Have you an idea?

Regards,
Elodie


Sanjiva Weerawarana wrote:

>On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
>  
>
>>Hi Elodie,
>>
>>The reason for this error is resource.properties file not being
>>available in the package 'org.apache.sandesha2.i18n'. Please check
>>weather it is available in the 'mar' file you are using.
>>    
>>
>
>Isn't the problem a default locale issue? Looks like Elodie is running
>with French and hence the file searched for doesn't exist.
>
>Sanjiva.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>  
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Sanjiva,

Thanks for your interest

I want to specify my problem.
The problem become when I implement a method addressable(ie I define the 
AcksTo and ReplyTo value) because the anonymous method (no addressable) 
works correctly.

I test an implementation of wsrm and I have the same problem as mtomrm, 
when I launch an addressable client to test the oneway method I saw all 
messages soap but the service is not execute and to test the 
requestresponse method, I see only the CreateSequence and the first 
message, the service is not execute and the client not receive the 
server response.

When I launch the client mtomrm and wsrm oneway but not addressable, no 
problem, my service is execute correctly.

This problem appears with the last version of mar for wsrm addressable 
which works with an precedent version. But the mtomrm addressable never 
works and need the last version of mar.

The resource.properties file is present in the package 
'org.apache.sandesha2.i18n' and it seems to be ok.

I hope I have been more clear.
Have you an idea?

Regards,
Elodie


Sanjiva Weerawarana wrote:

>On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
>  
>
>>Hi Elodie,
>>
>>The reason for this error is resource.properties file not being
>>available in the package 'org.apache.sandesha2.i18n'. Please check
>>weather it is available in the 'mar' file you are using.
>>    
>>
>
>Isn't the problem a default locale issue? Looks like Elodie is running
>with French and hence the file searched for doesn't exist.
>
>Sanjiva.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>  
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Sanjiva,

Thanks for your interest

I want to specify my problem.
The problem become when I implement a method addressable(ie I define the 
AcksTo and ReplyTo value) because the anonymous method (no addressable) 
works correctly.

I test an implementation of wsrm and I have the same problem as mtomrm, 
when I launch an addressable client to test the oneway method I saw all 
messages soap but the service is not execute and to test the 
requestresponse method, I see only the CreateSequence and the first 
message, the service is not execute and the client not receive the 
server response.

When I launch the client mtomrm and wsrm oneway but not addressable, no 
problem, my service is execute correctly.

This problem appears with the last version of mar for wsrm addressable 
which works with an precedent version. But the mtomrm addressable never 
works and need the last version of mar.

The resource.properties file is present in the package 
'org.apache.sandesha2.i18n' and it seems to be ok.

I hope I have been more clear.
Have you an idea?

Regards,
Elodie


Sanjiva Weerawarana wrote:

>On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
>  
>
>>Hi Elodie,
>>
>>The reason for this error is resource.properties file not being
>>available in the package 'org.apache.sandesha2.i18n'. Please check
>>weather it is available in the 'mar' file you are using.
>>    
>>
>
>Isn't the problem a default locale issue? Looks like Elodie is running
>with French and hence the file searched for doesn't exist.
>
>Sanjiva.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>  
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
> Hi Elodie,
> 
> The reason for this error is resource.properties file not being
> available in the package 'org.apache.sandesha2.i18n'. Please check
> weather it is available in the 'mar' file you are using.

Isn't the problem a default locale issue? Looks like Elodie is running
with French and hence the file searched for doesn't exist.

Sanjiva.


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
> Hi Elodie,
> 
> The reason for this error is resource.properties file not being
> available in the package 'org.apache.sandesha2.i18n'. Please check
> weather it is available in the 'mar' file you are using.

Isn't the problem a default locale issue? Looks like Elodie is running
with French and hence the file searched for doesn't exist.

Sanjiva.


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sat, 2006-07-22 at 17:55 +0530, Chamikara Jayalath wrote:
> Hi Elodie,
> 
> The reason for this error is resource.properties file not being
> available in the package 'org.apache.sandesha2.i18n'. Please check
> weather it is available in the 'mar' file you are using.

Isn't the problem a default locale issue? Looks like Elodie is running
with French and hence the file searched for doesn't exist.

Sanjiva.


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

The reason for this error is resource.properties file not being available in
the package 'org.apache.sandesha2.i18n'. Please check weather it is
available in the 'mar' file you are using.

Chamikara


On 7/21/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara,
>
> Thanks for your explain.
>
> I download the mar and jar last version on link. I change the value of
> InOrderInvocation to false in the module.xml.
> And now, I have an error, at the start of tomcat.
>
> - Deploying module : sandesha2
> - StandardWrapper.Throwable
> java.lang.ExceptionInInitializerError
>         at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java
> :54)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.initModules(
> ConfigurationContextFactory.java:128)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.init(
> ConfigurationContextFactory.java:104)
>         at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (ConfigurationContextFactory.java:40)
>         at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> AxisServlet.java:213)
>         at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1105)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3915)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         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:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource
> 'org.apache.sandesha2.i18n.resource'
>         at
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(
> ProjectResourceBundle.java:259)
>         at
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(
> SandeshaMessageHelper.java:19)
>         ... 32 more
> - La servlet /axis2 a généré une exception "load()"
> java.lang.ExceptionInInitializerError
>         at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java
> :54)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.initModules(
> ConfigurationContextFactory.java:128)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.init(
> ConfigurationContextFactory.java:104)
>         at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (ConfigurationContextFactory.java:40)
>         at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> AxisServlet.java:213)
>         at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1105)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3915)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         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:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource
> 'org.apache.sandesha2.i18n.resource'
>         at
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(
> ProjectResourceBundle.java:259)
>         at
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(
> SandeshaMessageHelper.java:19)
>         ... 32 more
>
> And when I check out the project and I create my mar and jar, I have the
> same error. The module seems to not be initiate. I search to resolve the
> problem but I don't find the solution. I join you the cataliana log,
> there are errors on listeners classes (ContextListener and
> SessionListener) but I think it's not the same problem and it don't have
> consequences on my problem.
>
> Thanks for your time.
>
> Regards
> Elodie
>
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > Please see my comments below.
> >
> > On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> > <ma...@bull.net>> wrote:
> >
> >     Hi Chamikara,
> >
> >     Your solution is correct.  Can you explain me what is this
> >     property and
> >     why it allows to pass the bug?
> >
> >
> >
> > In WSRM the messages that belong to a sequence are numbered starting
> > from one. If this InvokeInOrder property is set to true, Sandesha2
> > will make sure that the messages get invoked in the order of these
> > message numbers. This is a delivery assurance provided by Sadesha2
> > which is not a must to comply with the WSRM specification. So you can
> > safely set it to false if you do not worry abt ardering. Infact
> > disabling this will improve the performance.
> >
> > In implementation wise, we achieve ordering using a seperate thread.
> > If InvokeInORder is set to true, messages will be paused at the RM
> > handlers and invocation will be done in the order of message numbers
> > using our thread. When a message get paused the current thread get
> > returned and the incoming sockets with the client get closed.
> >
> > The bug is with axis2 not reading the attachments from the stream
> > before this closing of the socket.
> >
> >     Change this property, make other mistake:
> >     The problem is when I implement method addressable ( i.e. I define
> the
> >     ReplyTo and AcksTo value for WSRM implementation). I have also the
> >     same
> >     problem in MTOMRM implementation.
> >     These values change with this code:
> >     String acksTo =
> >     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
> >     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> >     and
> >     options.setUseSeparateListener(true);
> >     In this case, for a RequestResponse method I see only the
> >     CreateSequence
> >     and the first message, others messages never sent. The client never
> >     receive the server response and the  server method is never called.
> >
> >     For OneWay method, in TCPMon, there are all soap messages, but no
> >     server
> >     reactions. The  server method is never called.
> >
> >     Have you an idea?
> >
> >
> >
> > I guess this is the bug i fixed yested day. Please try the latest
> > SNAPSHOT from
> > http://people.apache.org/repository/sandesha2/mars/
> >
> >
> > Chamikara
> >
> >
> >     Thanks for your help.
> >
> >     Regards,
> >
> >     Elodie
> >
> >     Chamikara Jayalath wrote:
> >
> >     > Hi Elodie,
> >     >
> >     > I just fixed a bug in Sandesha2 not-in-order case is working
> >     properly now.
> >     >
> >     > Currently MTOM+RM will not work when InOrderInvocation property
> >     is set
> >     > to true. This is due to a bug in OM  (
> >     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
> >     >
> >     > But it perfectly works when InOrderInvocation is set to false. I
> >     just
> >     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
> >     > Currentlly the code in the test method is commented till the
> >     previous
> >     > bug is fixed. But it passes when InOrderInvation is disabled.
> >     >
> >     > Hope this will help you.
> >     >
> >     > Chamikara
> >     >
> >     >
> >
>
>
>
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

The reason for this error is resource.properties file not being available in
the package 'org.apache.sandesha2.i18n'. Please check weather it is
available in the 'mar' file you are using.

Chamikara


On 7/21/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara,
>
> Thanks for your explain.
>
> I download the mar and jar last version on link. I change the value of
> InOrderInvocation to false in the module.xml.
> And now, I have an error, at the start of tomcat.
>
> - Deploying module : sandesha2
> - StandardWrapper.Throwable
> java.lang.ExceptionInInitializerError
>         at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java
> :54)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.initModules(
> ConfigurationContextFactory.java:128)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.init(
> ConfigurationContextFactory.java:104)
>         at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (ConfigurationContextFactory.java:40)
>         at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> AxisServlet.java:213)
>         at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1105)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3915)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         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:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource
> 'org.apache.sandesha2.i18n.resource'
>         at
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(
> ProjectResourceBundle.java:259)
>         at
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(
> SandeshaMessageHelper.java:19)
>         ... 32 more
> - La servlet /axis2 a généré une exception "load()"
> java.lang.ExceptionInInitializerError
>         at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java
> :54)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.initModules(
> ConfigurationContextFactory.java:128)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.init(
> ConfigurationContextFactory.java:104)
>         at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (ConfigurationContextFactory.java:40)
>         at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> AxisServlet.java:213)
>         at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1105)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3915)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         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:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource
> 'org.apache.sandesha2.i18n.resource'
>         at
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(
> ProjectResourceBundle.java:259)
>         at
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(
> SandeshaMessageHelper.java:19)
>         ... 32 more
>
> And when I check out the project and I create my mar and jar, I have the
> same error. The module seems to not be initiate. I search to resolve the
> problem but I don't find the solution. I join you the cataliana log,
> there are errors on listeners classes (ContextListener and
> SessionListener) but I think it's not the same problem and it don't have
> consequences on my problem.
>
> Thanks for your time.
>
> Regards
> Elodie
>
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > Please see my comments below.
> >
> > On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> > <ma...@bull.net>> wrote:
> >
> >     Hi Chamikara,
> >
> >     Your solution is correct.  Can you explain me what is this
> >     property and
> >     why it allows to pass the bug?
> >
> >
> >
> > In WSRM the messages that belong to a sequence are numbered starting
> > from one. If this InvokeInOrder property is set to true, Sandesha2
> > will make sure that the messages get invoked in the order of these
> > message numbers. This is a delivery assurance provided by Sadesha2
> > which is not a must to comply with the WSRM specification. So you can
> > safely set it to false if you do not worry abt ardering. Infact
> > disabling this will improve the performance.
> >
> > In implementation wise, we achieve ordering using a seperate thread.
> > If InvokeInORder is set to true, messages will be paused at the RM
> > handlers and invocation will be done in the order of message numbers
> > using our thread. When a message get paused the current thread get
> > returned and the incoming sockets with the client get closed.
> >
> > The bug is with axis2 not reading the attachments from the stream
> > before this closing of the socket.
> >
> >     Change this property, make other mistake:
> >     The problem is when I implement method addressable ( i.e. I define
> the
> >     ReplyTo and AcksTo value for WSRM implementation). I have also the
> >     same
> >     problem in MTOMRM implementation.
> >     These values change with this code:
> >     String acksTo =
> >     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
> >     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> >     and
> >     options.setUseSeparateListener(true);
> >     In this case, for a RequestResponse method I see only the
> >     CreateSequence
> >     and the first message, others messages never sent. The client never
> >     receive the server response and the  server method is never called.
> >
> >     For OneWay method, in TCPMon, there are all soap messages, but no
> >     server
> >     reactions. The  server method is never called.
> >
> >     Have you an idea?
> >
> >
> >
> > I guess this is the bug i fixed yested day. Please try the latest
> > SNAPSHOT from
> > http://people.apache.org/repository/sandesha2/mars/
> >
> >
> > Chamikara
> >
> >
> >     Thanks for your help.
> >
> >     Regards,
> >
> >     Elodie
> >
> >     Chamikara Jayalath wrote:
> >
> >     > Hi Elodie,
> >     >
> >     > I just fixed a bug in Sandesha2 not-in-order case is working
> >     properly now.
> >     >
> >     > Currently MTOM+RM will not work when InOrderInvocation property
> >     is set
> >     > to true. This is due to a bug in OM  (
> >     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
> >     >
> >     > But it perfectly works when InOrderInvocation is set to false. I
> >     just
> >     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
> >     > Currentlly the code in the test method is commented till the
> >     previous
> >     > bug is fixed. But it passes when InOrderInvation is disabled.
> >     >
> >     > Hope this will help you.
> >     >
> >     > Chamikara
> >     >
> >     >
> >
>
>
>
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Ok, my tomcat run correctly, in fact, I have take the last version of 
jars and they have probably an error.
So I an other version of jars with the last version of mar and it don't 
change the problem.

I try to download the mar or chechout the project and create it.  The 
problem is always:

For Oneway addressable, I saw message soap but the server method is 
nerver call.
For the RequestResponse addressable, I saw the createSequence and the 
first message, the client don't receive response and the server method 
is nerver call.

Regards

Elodie

Mancinelli Elodie wrote:

> Hi Chamikara,
>
> Thanks for your explain.
>
> I download the mar and jar last version on link. I change the value of 
> InOrderInvocation to false in the module.xml.
> And now, I have an error, at the start of tomcat.
>
> - Deploying module : sandesha2
> - StandardWrapper.Throwable
> java.lang.ExceptionInInitializerError
>        at 
> org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) 
>
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 
>
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 
>
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>        at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>        at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
>
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
>
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>        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:585)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource 
> 'org.apache.sandesha2.i18n.resource'
>        at 
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259) 
>
>        at 
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19) 
>
>        ... 32 more
> - La servlet /axis2 a généré une exception "load()"
> java.lang.ExceptionInInitializerError
>        at 
> org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) 
>
>        at 
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) 
>
>        at 
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>        at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) 
>
>        at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>        at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 
>
>        at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>        at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) 
>
>        at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>        at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>        at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>        at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>        at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>        at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>        at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
>
>        at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
>
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>        at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>        at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>        at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>        at 
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>        at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>        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:585)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource 
> 'org.apache.sandesha2.i18n.resource'
>        at 
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259) 
>
>        at 
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19) 
>
>        ... 32 more
>
> And when I check out the project and I create my mar and jar, I have 
> the same error. The module seems to not be initiate. I search to 
> resolve the problem but I don't find the solution. I join you the 
> cataliana log, there are errors on listeners classes (ContextListener 
> and SessionListener) but I think it's not the same problem and it 
> don't have consequences on my problem.
>
> Thanks for your time.
>
> Regards
> Elodie
>
>
> Chamikara Jayalath wrote:
>
>> Hi Elodie,
>>
>> Please see my comments below.
>>
>> On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
>> <ma...@bull.net>> wrote:
>>
>>     Hi Chamikara,
>>
>>     Your solution is correct.  Can you explain me what is this
>>     property and
>>     why it allows to pass the bug?
>>
>>
>>
>> In WSRM the messages that belong to a sequence are numbered starting 
>> from one. If this InvokeInOrder property is set to true, Sandesha2 
>> will make sure that the messages get invoked in the order of these 
>> message numbers. This is a delivery assurance provided by Sadesha2 
>> which is not a must to comply with the WSRM specification. So you can 
>> safely set it to false if you do not worry abt ardering. Infact 
>> disabling this will improve the performance.
>>
>> In implementation wise, we achieve ordering using a seperate thread. 
>> If InvokeInORder is set to true, messages will be paused at the RM 
>> handlers and invocation will be done in the order of message numbers 
>> using our thread. When a message get paused the current thread get 
>> returned and the incoming sockets with the client get closed.
>>
>> The bug is with axis2 not reading the attachments from the stream 
>> before this closing of the socket.
>>
>>     Change this property, make other mistake:
>>     The problem is when I implement method addressable ( i.e. I 
>> define the
>>     ReplyTo and AcksTo value for WSRM implementation). I have also the
>>     same
>>     problem in MTOMRM implementation.
>>     These values change with this code:
>>     String acksTo =
>>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
>>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>>     and
>>     options.setUseSeparateListener(true);
>>     In this case, for a RequestResponse method I see only the
>>     CreateSequence
>>     and the first message, others messages never sent. The client never
>>     receive the server response and the  server method is never called.
>>
>>     For OneWay method, in TCPMon, there are all soap messages, but no
>>     server
>>     reactions. The  server method is never called.
>>
>>     Have you an idea?
>>
>>
>> I guess this is the bug i fixed yested day. Please try the latest 
>> SNAPSHOT from
>> http://people.apache.org/repository/sandesha2/mars/
>>
>>
>> Chamikara
>>
>>
>>     Thanks for your help.
>>
>>     Regards,
>>
>>     Elodie
>>
>>     Chamikara Jayalath wrote:
>>
>>     > Hi Elodie,
>>     >
>>     > I just fixed a bug in Sandesha2 not-in-order case is working
>>     properly now.
>>     >
>>     > Currently MTOM+RM will not work when InOrderInvocation property
>>     is set
>>     > to true. This is due to a bug in OM  (
>>     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>>     >
>>     > But it perfectly works when InOrderInvocation is set to false. I
>>     just
>>     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
>>     > Currentlly the code in the test method is commented till the
>>     previous
>>     > bug is fixed. But it passes when InOrderInvation is disabled.
>>     >
>>     > Hope this will help you.
>>     >
>>     > Chamikara
>>     >
>>     >
>>
>
>
>------------------------------------------------------------------------
>
>21 juil. 2006 08:43:56 org.apache.catalina.core.ApplicationContext log
>INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.ContextListener
>java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: jsp-examples/WEB-INF/classes/listeners/ContextListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.SessionListener
>java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: jsp-examples/WEB-INF/classes/listeners/SessionListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:56 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: L'installation des écouteurs (listeners) de l'application a été sautée suite aux erreurs précédentes
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.ContextListener
>java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: servlets-examples/WEB-INF/classes/listeners/ContextListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) listeners.SessionListener
>java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: servlets-examples/WEB-INF/classes/listeners/SessionListener)
>	at java.lang.ClassLoader.defineClass1(Native Method)
>	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1779)
>	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
>	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
>	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3675)
>	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
>	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
>	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
>	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
>	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	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:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>21 juil. 2006 08:43:57 org.apache.catalina.core.StandardContext listenerStart
>GRAVE: L'installation des écouteurs (listeners) de l'application a été sautée suite aux erreurs précédentes
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

The reason for this error is resource.properties file not being available in
the package 'org.apache.sandesha2.i18n'. Please check weather it is
available in the 'mar' file you are using.

Chamikara


On 7/21/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara,
>
> Thanks for your explain.
>
> I download the mar and jar last version on link. I change the value of
> InOrderInvocation to false in the module.xml.
> And now, I have an error, at the start of tomcat.
>
> - Deploying module : sandesha2
> - StandardWrapper.Throwable
> java.lang.ExceptionInInitializerError
>         at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java
> :54)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.initModules(
> ConfigurationContextFactory.java:128)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.init(
> ConfigurationContextFactory.java:104)
>         at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (ConfigurationContextFactory.java:40)
>         at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> AxisServlet.java:213)
>         at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1105)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3915)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         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:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource
> 'org.apache.sandesha2.i18n.resource'
>         at
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(
> ProjectResourceBundle.java:259)
>         at
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(
> SandeshaMessageHelper.java:19)
>         ... 32 more
> - La servlet /axis2 a généré une exception "load()"
> java.lang.ExceptionInInitializerError
>         at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java
> :54)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.initModules(
> ConfigurationContextFactory.java:128)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.init(
> ConfigurationContextFactory.java:104)
>         at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext
> (ConfigurationContextFactory.java:40)
>         at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(
> AxisServlet.java:213)
>         at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1105)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3915)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> :759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:450)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         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:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.util.MissingResourceException: Cannot find resource
> 'org.apache.sandesha2.i18n.resource'
>         at
> org.apache.axis2.i18n.ProjectResourceBundle.getBundle(
> ProjectResourceBundle.java:259)
>         at
> org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(
> SandeshaMessageHelper.java:19)
>         ... 32 more
>
> And when I check out the project and I create my mar and jar, I have the
> same error. The module seems to not be initiate. I search to resolve the
> problem but I don't find the solution. I join you the cataliana log,
> there are errors on listeners classes (ContextListener and
> SessionListener) but I think it's not the same problem and it don't have
> consequences on my problem.
>
> Thanks for your time.
>
> Regards
> Elodie
>
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > Please see my comments below.
> >
> > On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> > <ma...@bull.net>> wrote:
> >
> >     Hi Chamikara,
> >
> >     Your solution is correct.  Can you explain me what is this
> >     property and
> >     why it allows to pass the bug?
> >
> >
> >
> > In WSRM the messages that belong to a sequence are numbered starting
> > from one. If this InvokeInOrder property is set to true, Sandesha2
> > will make sure that the messages get invoked in the order of these
> > message numbers. This is a delivery assurance provided by Sadesha2
> > which is not a must to comply with the WSRM specification. So you can
> > safely set it to false if you do not worry abt ardering. Infact
> > disabling this will improve the performance.
> >
> > In implementation wise, we achieve ordering using a seperate thread.
> > If InvokeInORder is set to true, messages will be paused at the RM
> > handlers and invocation will be done in the order of message numbers
> > using our thread. When a message get paused the current thread get
> > returned and the incoming sockets with the client get closed.
> >
> > The bug is with axis2 not reading the attachments from the stream
> > before this closing of the socket.
> >
> >     Change this property, make other mistake:
> >     The problem is when I implement method addressable ( i.e. I define
> the
> >     ReplyTo and AcksTo value for WSRM implementation). I have also the
> >     same
> >     problem in MTOMRM implementation.
> >     These values change with this code:
> >     String acksTo =
> >     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
> >     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> >     and
> >     options.setUseSeparateListener(true);
> >     In this case, for a RequestResponse method I see only the
> >     CreateSequence
> >     and the first message, others messages never sent. The client never
> >     receive the server response and the  server method is never called.
> >
> >     For OneWay method, in TCPMon, there are all soap messages, but no
> >     server
> >     reactions. The  server method is never called.
> >
> >     Have you an idea?
> >
> >
> >
> > I guess this is the bug i fixed yested day. Please try the latest
> > SNAPSHOT from
> > http://people.apache.org/repository/sandesha2/mars/
> >
> >
> > Chamikara
> >
> >
> >     Thanks for your help.
> >
> >     Regards,
> >
> >     Elodie
> >
> >     Chamikara Jayalath wrote:
> >
> >     > Hi Elodie,
> >     >
> >     > I just fixed a bug in Sandesha2 not-in-order case is working
> >     properly now.
> >     >
> >     > Currently MTOM+RM will not work when InOrderInvocation property
> >     is set
> >     > to true. This is due to a bug in OM  (
> >     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
> >     >
> >     > But it perfectly works when InOrderInvocation is set to false. I
> >     just
> >     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
> >     > Currentlly the code in the test method is commented till the
> >     previous
> >     > bug is fixed. But it passes when InOrderInvation is disabled.
> >     >
> >     > Hope this will help you.
> >     >
> >     > Chamikara
> >     >
> >     >
> >
>
>
>
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

Thanks for your explain.

I download the mar and jar last version on link. I change the value of 
InOrderInvocation to false in the module.xml.
And now, I have an error, at the start of tomcat.

- Deploying module : sandesha2
- StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
        at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
        at 
org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)
        at 
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.util.MissingResourceException: Cannot find resource 
'org.apache.sandesha2.i18n.resource'
        at 
org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259)
        at 
org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19)
        ... 32 more
- La servlet /axis2 a généré une exception "load()"
java.lang.ExceptionInInitializerError
        at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
        at 
org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)
        at 
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.util.MissingResourceException: Cannot find resource 
'org.apache.sandesha2.i18n.resource'
        at 
org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259)
        at 
org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19)
        ... 32 more

And when I check out the project and I create my mar and jar, I have the 
same error. The module seems to not be initiate. I search to resolve the 
problem but I don't find the solution. I join you the cataliana log, 
there are errors on listeners classes (ContextListener and 
SessionListener) but I think it's not the same problem and it don't have 
consequences on my problem.

Thanks for your time.

Regards
Elodie


Chamikara Jayalath wrote:

> Hi Elodie,
>
> Please see my comments below.
>
> On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi Chamikara,
>
>     Your solution is correct.  Can you explain me what is this
>     property and
>     why it allows to pass the bug?
>
>
>
> In WSRM the messages that belong to a sequence are numbered starting 
> from one. If this InvokeInOrder property is set to true, Sandesha2 
> will make sure that the messages get invoked in the order of these 
> message numbers. This is a delivery assurance provided by Sadesha2 
> which is not a must to comply with the WSRM specification. So you can 
> safely set it to false if you do not worry abt ardering. Infact 
> disabling this will improve the performance.
>
> In implementation wise, we achieve ordering using a seperate thread. 
> If InvokeInORder is set to true, messages will be paused at the RM 
> handlers and invocation will be done in the order of message numbers 
> using our thread. When a message get paused the current thread get 
> returned and the incoming sockets with the client get closed.
>
> The bug is with axis2 not reading the attachments from the stream 
> before this closing of the socket.
>
>     Change this property, make other mistake:
>     The problem is when I implement method addressable ( i.e. I define the
>     ReplyTo and AcksTo value for WSRM implementation). I have also the
>     same
>     problem in MTOMRM implementation.
>     These values change with this code:
>     String acksTo =
>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>     and
>     options.setUseSeparateListener(true);
>     In this case, for a RequestResponse method I see only the
>     CreateSequence
>     and the first message, others messages never sent. The client never
>     receive the server response and the  server method is never called.
>
>     For OneWay method, in TCPMon, there are all soap messages, but no
>     server
>     reactions. The  server method is never called.
>
>     Have you an idea? 
>
>
>
> I guess this is the bug i fixed yested day. Please try the latest 
> SNAPSHOT from
> http://people.apache.org/repository/sandesha2/mars/
>
>
> Chamikara
>
>
>     Thanks for your help.
>
>     Regards,
>
>     Elodie
>
>     Chamikara Jayalath wrote:
>
>     > Hi Elodie,
>     >
>     > I just fixed a bug in Sandesha2 not-in-order case is working
>     properly now.
>     >
>     > Currently MTOM+RM will not work when InOrderInvocation property
>     is set
>     > to true. This is due to a bug in OM  (
>     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>     >
>     > But it perfectly works when InOrderInvocation is set to false. I
>     just
>     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
>     > Currentlly the code in the test method is commented till the
>     previous
>     > bug is fixed. But it passes when InOrderInvation is disabled.
>     >
>     > Hope this will help you.
>     >
>     > Chamikara
>     >
>     >
>



Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

Thanks for your explain.

I download the mar and jar last version on link. I change the value of 
InOrderInvocation to false in the module.xml.
And now, I have an error, at the start of tomcat.

- Deploying module : sandesha2
- StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
        at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
        at 
org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)
        at 
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.util.MissingResourceException: Cannot find resource 
'org.apache.sandesha2.i18n.resource'
        at 
org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259)
        at 
org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19)
        ... 32 more
- La servlet /axis2 a généré une exception "load()"
java.lang.ExceptionInInitializerError
        at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
        at 
org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)
        at 
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.util.MissingResourceException: Cannot find resource 
'org.apache.sandesha2.i18n.resource'
        at 
org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259)
        at 
org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19)
        ... 32 more

And when I check out the project and I create my mar and jar, I have the 
same error. The module seems to not be initiate. I search to resolve the 
problem but I don't find the solution. I join you the cataliana log, 
there are errors on listeners classes (ContextListener and 
SessionListener) but I think it's not the same problem and it don't have 
consequences on my problem.

Thanks for your time.

Regards
Elodie


Chamikara Jayalath wrote:

> Hi Elodie,
>
> Please see my comments below.
>
> On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi Chamikara,
>
>     Your solution is correct.  Can you explain me what is this
>     property and
>     why it allows to pass the bug?
>
>
>
> In WSRM the messages that belong to a sequence are numbered starting 
> from one. If this InvokeInOrder property is set to true, Sandesha2 
> will make sure that the messages get invoked in the order of these 
> message numbers. This is a delivery assurance provided by Sadesha2 
> which is not a must to comply with the WSRM specification. So you can 
> safely set it to false if you do not worry abt ardering. Infact 
> disabling this will improve the performance.
>
> In implementation wise, we achieve ordering using a seperate thread. 
> If InvokeInORder is set to true, messages will be paused at the RM 
> handlers and invocation will be done in the order of message numbers 
> using our thread. When a message get paused the current thread get 
> returned and the incoming sockets with the client get closed.
>
> The bug is with axis2 not reading the attachments from the stream 
> before this closing of the socket.
>
>     Change this property, make other mistake:
>     The problem is when I implement method addressable ( i.e. I define the
>     ReplyTo and AcksTo value for WSRM implementation). I have also the
>     same
>     problem in MTOMRM implementation.
>     These values change with this code:
>     String acksTo =
>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>     and
>     options.setUseSeparateListener(true);
>     In this case, for a RequestResponse method I see only the
>     CreateSequence
>     and the first message, others messages never sent. The client never
>     receive the server response and the  server method is never called.
>
>     For OneWay method, in TCPMon, there are all soap messages, but no
>     server
>     reactions. The  server method is never called.
>
>     Have you an idea? 
>
>
>
> I guess this is the bug i fixed yested day. Please try the latest 
> SNAPSHOT from
> http://people.apache.org/repository/sandesha2/mars/
>
>
> Chamikara
>
>
>     Thanks for your help.
>
>     Regards,
>
>     Elodie
>
>     Chamikara Jayalath wrote:
>
>     > Hi Elodie,
>     >
>     > I just fixed a bug in Sandesha2 not-in-order case is working
>     properly now.
>     >
>     > Currently MTOM+RM will not work when InOrderInvocation property
>     is set
>     > to true. This is due to a bug in OM  (
>     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>     >
>     > But it perfectly works when InOrderInvocation is set to false. I
>     just
>     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
>     > Currentlly the code in the test method is commented till the
>     previous
>     > bug is fixed. But it passes when InOrderInvation is disabled.
>     >
>     > Hope this will help you.
>     >
>     > Chamikara
>     >
>     >
>



Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

Thanks for your explain.

I download the mar and jar last version on link. I change the value of 
InOrderInvocation to false in the module.xml.
And now, I have an error, at the start of tomcat.

- Deploying module : sandesha2
- StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
        at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
        at 
org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)
        at 
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.util.MissingResourceException: Cannot find resource 
'org.apache.sandesha2.i18n.resource'
        at 
org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259)
        at 
org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19)
        ... 32 more
- La servlet /axis2 a généré une exception "load()"
java.lang.ExceptionInInitializerError
        at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:54)
        at 
org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)
        at 
org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.util.MissingResourceException: Cannot find resource 
'org.apache.sandesha2.i18n.resource'
        at 
org.apache.axis2.i18n.ProjectResourceBundle.getBundle(ProjectResourceBundle.java:259)
        at 
org.apache.sandesha2.i18n.SandeshaMessageHelper.<clinit>(SandeshaMessageHelper.java:19)
        ... 32 more

And when I check out the project and I create my mar and jar, I have the 
same error. The module seems to not be initiate. I search to resolve the 
problem but I don't find the solution. I join you the cataliana log, 
there are errors on listeners classes (ContextListener and 
SessionListener) but I think it's not the same problem and it don't have 
consequences on my problem.

Thanks for your time.

Regards
Elodie


Chamikara Jayalath wrote:

> Hi Elodie,
>
> Please see my comments below.
>
> On 7/19/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi Chamikara,
>
>     Your solution is correct.  Can you explain me what is this
>     property and
>     why it allows to pass the bug?
>
>
>
> In WSRM the messages that belong to a sequence are numbered starting 
> from one. If this InvokeInOrder property is set to true, Sandesha2 
> will make sure that the messages get invoked in the order of these 
> message numbers. This is a delivery assurance provided by Sadesha2 
> which is not a must to comply with the WSRM specification. So you can 
> safely set it to false if you do not worry abt ardering. Infact 
> disabling this will improve the performance.
>
> In implementation wise, we achieve ordering using a seperate thread. 
> If InvokeInORder is set to true, messages will be paused at the RM 
> handlers and invocation will be done in the order of message numbers 
> using our thread. When a message get paused the current thread get 
> returned and the incoming sockets with the client get closed.
>
> The bug is with axis2 not reading the attachments from the stream 
> before this closing of the socket.
>
>     Change this property, make other mistake:
>     The problem is when I implement method addressable ( i.e. I define the
>     ReplyTo and AcksTo value for WSRM implementation). I have also the
>     same
>     problem in MTOMRM implementation.
>     These values change with this code:
>     String acksTo =
>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP ).getAddress();
>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>     and
>     options.setUseSeparateListener(true);
>     In this case, for a RequestResponse method I see only the
>     CreateSequence
>     and the first message, others messages never sent. The client never
>     receive the server response and the  server method is never called.
>
>     For OneWay method, in TCPMon, there are all soap messages, but no
>     server
>     reactions. The  server method is never called.
>
>     Have you an idea? 
>
>
>
> I guess this is the bug i fixed yested day. Please try the latest 
> SNAPSHOT from
> http://people.apache.org/repository/sandesha2/mars/
>
>
> Chamikara
>
>
>     Thanks for your help.
>
>     Regards,
>
>     Elodie
>
>     Chamikara Jayalath wrote:
>
>     > Hi Elodie,
>     >
>     > I just fixed a bug in Sandesha2 not-in-order case is working
>     properly now.
>     >
>     > Currently MTOM+RM will not work when InOrderInvocation property
>     is set
>     > to true. This is due to a bug in OM  (
>     > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>     >
>     > But it perfectly works when InOrderInvocation is set to false. I
>     just
>     > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
>     > Currentlly the code in the test method is commented till the
>     previous
>     > bug is fixed. But it passes when InOrderInvation is disabled.
>     >
>     > Hope this will help you.
>     >
>     > Chamikara
>     >
>     >
>



Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Please see my comments below.

On 7/19/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara,
>
> Your solution is correct.  Can you explain me what is this property and
> why it allows to pass the bug?



In WSRM the messages that belong to a sequence are numbered starting from
one. If this InvokeInOrder property is set to true, Sandesha2 will make sure
that the messages get invoked in the order of these message numbers. This is
a delivery assurance provided by Sadesha2 which is not a must to comply with
the WSRM specification. So you can safely set it to false if you do not
worry abt ardering. Infact disabling this will improve the performance.

In implementation wise, we achieve ordering using a seperate thread. If
InvokeInORder is set to true, messages will be paused at the RM handlers and
invocation will be done in the order of message numbers using our thread.
When a message get paused the current thread get returned and the incoming
sockets with the client get closed.

The bug is with axis2 not reading the attachments from the stream before
this closing of the socket.

Change this property, make other mistake:
> The problem is when I implement method addressable (i.e. I define the
> ReplyTo and AcksTo value for WSRM implementation). I have also the same
> problem in MTOMRM implementation.
> These values change with this code:
> String acksTo =
> serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
> options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> and
> options.setUseSeparateListener(true);
> In this case, for a RequestResponse method I see only the CreateSequence
> and the first message, others messages never sent. The client never
> receive the server response and the  server method is never called.
>
> For OneWay method, in TCPMon, there are all soap messages, but no server
> reactions. The  server method is never called.
>
> Have you an idea?



I guess this is the bug i fixed yested day. Please try the latest SNAPSHOT
from
http://people.apache.org/repository/sandesha2/mars/


Chamikara


Thanks for your help.
>
> Regards,
>
> Elodie
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > I just fixed a bug in Sandesha2 not-in-order case is working properly
> now.
> >
> > Currently MTOM+RM will not work when InOrderInvocation property is set
> > to true. This is due to a bug in OM  (
> > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
> >
> > But it perfectly works when InOrderInvocation is set to false. I just
> > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
> > Currentlly the code in the test method is commented till the previous
> > bug is fixed. But it passes when InOrderInvation is disabled.
> >
> > Hope this will help you.
> >
> > Chamikara
> >
> >
> >
> > On 7/17/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> > <ma...@bull.net>> wrote:
> >
> >     Hi,
> >
> >     Can you think the problem is due to the tomcat version? Or the
> >     sandesha2
> >     version? I download jars and war on
> >     http://people.apache.org/repository/sandesha2/
> >     <http://people.apache.org/repository/sandesha2/>.
> >
> >     To configure the server,I have only change the axis2.xml. I can't
> >     change
> >     the module.xml because I intente to create a common server for all
> >     independante client (WSRM only, MTOM only, MTOM-WSRM).
> >
> >     Sorry to insit.
> >     Regards
> >
> >     Elodie
> >
> >
> >     Mancinelli Elodie wrote:
> >
> >     > Hi Chamikara,
> >     >
> >     > I use tomcat in the server side and its version is the
> >     > apache-tomcat-5.5.15.
> >     > I join in attachment my client code.
> >     >
> >     > Thanks for your help.
> >     >
> >     > Regards
> >     >
> >     > Elodie
> >     >
> >     >
> >     >
> >     > Chamikara Jayalath wrote:
> >     >
> >     >> Hi Elodie,
> >     >>
> >     >> Are you using tomcat in the server side. If so which version?
> >     >> Can u send your client code as well.
> >     >>
> >     >> Chamikara
> >     >>
> >     >>
> >     >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> >     <ma...@bull.net>
> >     >> <mailto:elodie.mancinelli@bull.net
> >     <ma...@bull.net>>> wrote:
> >     >>
> >     >>     Hi all,
> >     >>
> >     >>     I want to realise an client-server which supports MTOM and
> >     WSRM. I
> >     >>     created separatly a client-server with MTOM and a
> client-server
> >     >>     with WSRM.
> >     >>
> >     >>     My server has two methods: OneWay and RequestResponse.
> >     >>
> >     >>     - When I launch my client to test the RequestResponse method:
> >     >>     In TCPMon, I see, the CreateSequence and the
> >     >>     CreateSequenceResponse. My
> >     >>     first message is sent and it is accpeted.
> >     >>     But my client never receives the response and there is no
> >     trace
> >     >> on my
> >     >>     server, the method seems not be executed.
> >     >>
> >     >>     - When I launch my client to test the OneWay method:
> >     >>     In TCPMon, I see:
> >     >>     - CreateSequence, CreateSequenceResponse
> >     >>     - Three messages have send and three acknowledgments
> >     >>     But no TerminateSequence.
> >     >>     And on the server, there is an error:
> >     >>     - "Servlet.service()" pour la servlet AxisServlet a généré
> une
> >     >>     exception
> >     >>     java.lang.IllegalStateException: Impossible de créer une
> >     >> sessionaprès
> >     >>     que la réponse ait été envoyée
> >     >>             at
> >     >>
> >     >>
> >     org.apache.catalina.connector.Request.doGetSession(Request.java
> :2214)
> >     >>             at
> >     >>
> >     org.apache.catalina.connector.Request.getSession(Request.java:2024)
> >     >>             at
> >     >>
> >     >>
> >     org.apache.catalina.connector.RequestFacade.getSession(
> RequestFacade.java:831)
> >     >>
> >     >>             at
> >     >>     ........
> >     >
> >
> >------------------------------------------------------------------------
> >
> >     >
> >     >package fr.gouv.finances.dgme.presto;
> >     >
> >     >import java.io.File;
> >     >import java.io.FileInputStream;
> >     >import javax.activation.DataHandler;
> >     >import javax.activation.FileDataSource;
> >     >import javax.xml.stream.XMLInputFactory;
> >     >import javax.xml.stream.XMLStreamReader;
> >     >import org.apache.axiom.om.OMAbstractFactory;
> >     >import org.apache.axiom.om.OMElement;
> >     >import org.apache.axiom.om.OMFactory ;
> >     >import org.apache.axiom.om.OMNamespace;
> >     >import org.apache.axiom.om.OMText;
> >     >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
> >     >import org.apache.axiom.soap.SOAP12Constants;
> >     >import org.apache.axis2.Constants ;
> >     >import org.apache.axis2.addressing.EndpointReference;
> >     >import org.apache.axis2.client.Options;
> >     >import org.apache.axis2.client.ServiceClient;
> >     >import org.apache.axis2.client.async.AsyncResult;
> >     >import org.apache.axis2.client.async.Callback;
> >     >import org.apache.axis2.context.ConfigurationContext;
> >     >import org.apache.axis2.context.ConfigurationContextFactory;
> >     >import org.apache.axis2.context.MessageContextConstants ;
> >     >import org.apache.sandesha2.client.SandeshaClientConstants;
> >     >
> >     >
> >     >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
> >     >
> >     >       static String fileXMLName="test_data_in.xml";
> >     >       static String fileNameAttach="fichier.txt";
> >     >       private static EndpointReference targetEPR = new
> >     EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
> >     >       private static String targetEPRTcpmon ="
> >     http://localhost:8070/axis2/services/PrestoSvc";
> >     >       static String namespace="http://dgme.finances.gouv.fr/presto
> ";
> >     >       private static String CLIENT_REPO_PATH = "RepoClient";
> >     >       private static String axis2_xml = CLIENT_REPO_PATH +
> >     File.separator +"conf" + File.separator + "axis2.xml";
> >     >
> >     >       /**
> >     >        * Call submitRequestReponse with attachment
> >     >        *
> >     >        */
> >     >       public  void testSubmitRequestResponseWSRMAddressable()
> >     throws Exception{
> >     >
> >     >               String nameMethod="submit";
> >     >               ConfigurationContext configContext =
> >     ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >     >               ServiceClient serviceClient = new ServiceClient
> >     (configContext,null);
> >     >
> >     >               Options options=initOptions("submit",true);
> >     >               serviceClient.setOptions(options);
> >     >               String acksTo =
> >     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
> >     >
> >     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> >     >
> >     >               System.out.println("Envoi");
> >     >               Callback callback1 = new TestCallback ("Callback
> 1");
> >     >               serviceClient.sendReceiveNonBlocking
> >     (getOMBlock("message1","sequence1",nameMethod),callback1);
> >     >
> >     >               while (!callback1.isComplete()) {
> >     >                       System.out.println("boucle1");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >
> >     >               Callback callback2 = new TestCallback ("Callback
> 2");
> >     >
> >     serviceClient.sendReceiveNonBlocking
> (getOMBlock("message2","sequence1",nameMethod),callback2);
> >     >
> >     >               while (!callback2.isComplete()) {
> >     >                       System.out.println("boucle2");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >
> >     >
> >     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
> >     >               Callback callback3 = new TestCallback ("Callback
> 3");
> >     >
> >     serviceClient.sendReceiveNonBlocking
> (getOMBlock("message3","sequence1",nameMethod),callback3);
> >     >
> >     >               while (!callback3.isComplete()) {
> >     >                       System.out.println("boucle3");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >               System.out.println("Fin du programme");
> >     >               Thread.sleep(10000);
> >     >               serviceClient.finalizeInvoke();
> >     >
> >     >       }
> >     >
> >     >
> >     >       /**
> >     >        * Call submitOneWay with attachment
> >     >        *
> >     >        */
> >     >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
> >     Exception {
> >     >
> >     >               String nameMethod="submitOneWay";
> >     >               ConfigurationContext configContext =
> >     ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >     >               ServiceClient sender = new ServiceClient
> >     (configContext,null);
> >     >
> >     >               Options options=initOptions("submitOneWay", false);
> >     >               sender.setOptions(options);
> >     >
> >     >               System.out.println("Envoi");
> >     >
> >     >
> >     sender.fireAndForget(getOMBlock("","ping1",nameMethod));
> >     >
> >     sender.fireAndForget(getOMBlock("","ping2",nameMethod));
> >     >
> >     >
> >     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
> >     >
> >     sender.fireAndForget(getOMBlock("","ping3",nameMethod));
> >     >
> >     >               Thread.sleep(10000);
> >     >               System.out.println("\nResult :");
> >     >               System.out.println("NO RETURN FOR WEBSERVICE");
> >     >               sender.finalizeInvoke();
> >     >
> >     >       }
> >     >
> >     >       private OMElement getOMBlock(String text, String
> >     sequenceKey, String nameMethod) throws Exception{
> >     >
> >     >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >     >               OMNamespace omNs =
> >     fac.createOMNamespace(namespace, "m");
> >     >               OMElement payload = getPayload(nameMethod);
> >     >
> >     >               // Attach text file
> >     >                       OMElement
> filetxt=createAttachment(fac,omNs);
> >     >                       payload.addChild(filetxt);
> >     >
> >     >               // Add sequence number
> >     >//             OMElement sequenceElem =
> >     fac.createOMElement("Sequence",omNs);
> >     >//             if (nameMethod.equalsIgnoreCase("submit"))
> >     sequenceElem.setText(sequenceKey + "-" + text);
> >     >//             else sequenceElem.setText(sequenceKey);
> >     >//             payload.addChild(sequenceElem);
> >     >
> >     >               System.out.println("Document sent : "+payload);
> >     >
> >     >               return payload;
> >     >
> >     >       }
> >     >
> >     >
> >     >       static class TestCallback extends Callback {
> >     >
> >     >               String name = null;
> >     >               public TestCallback (String name) {
> >     >                       this.name <http://this.name> = name;
> >     >               }
> >     >
> >     >               public void onComplete(AsyncResult result) {
> >     >//                     Traitement du résultat et affichage
> >     >                       System.out.println("\nResult :");
> >     >                       System.out.println("Callback '" + name
> >     +  "' got result:" + result.getResponseEnvelope());
> >     >               }
> >     >
> >     >               public void onError (Exception e) {
> >     >                       System.out.println("Error reported for
> >     test call back");
> >     >                       e.printStackTrace();
> >     >               }
> >     >       }
> >     >
> >     >       /**
> >     >        * Define options
> >     >        *
> >     >        */
> >     >       private static Options initOptions(String
> >     nameMethod,boolean SeparateListener){
> >     >
> >     >               Options options = new Options ();
> >     >               options.setTo(targetEPR);
> >     >               options.setAction(nameMethod);
> >     >
> >     options.setSoapVersionURI(
> SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> >     >
> >     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >     >               options.setUseSeparateListener(SeparateListener);
> >     >
> >     options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> >     >
> >     options.setProperty(Constants.Configuration.ENABLE_MTOM,
> >     Constants.VALUE_TRUE);
> >     >
> >     >               return options;
> >     >       }
> >     >
> >     >       /**
> >     >        * Get file
> >     >        *
> >     >        */
> >     >       private OMElement getPayload(String operation) throws
> >     Exception {
> >     >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >     >               // Declaration du namespace
> >     >               OMNamespace omNs =
> >     fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
> >     >               // Creation du sommet de l'arborescence
> >     >               OMElement payload = fac.createOMElement(operation,
> >     omNs);
> >     >
> >     >               // Lecture du fichier a recuperer
> >     >               XMLStreamReader parser =
> >     XMLInputFactory.newInstance().createXMLStreamReader(new
> >     FileInputStream("test_data_in.xml"));
> >     >               // Construction de l'element
> >     >               StAXOMBuilder builder = new StAXOMBuilder(fac,
> >     parser);
> >     >               // Intergration dans l arborescence
> >     >               payload.addChild(builder.getDocumentElement());
> >     >
> >     >               return payload;
> >     >       }
> >     >
> >     >       /**
> >     >        * Method which create attachment
> >     >        *
> >     >        */
> >     >       private static OMElement createAttachment(OMFactory fac,
> >     OMNamespace omNs) throws Exception{
> >     >
> >     >               OMElement attach = null;
> >     >
> >     >               // Creation du noeud
> >     >               attach = fac.createOMElement("attachment", omNs);
> >     >               // Lecteure de ce fichier
> >     >               File fileTxt = new File(fileNameAttach);
> >     >               FileDataSource dataSource = new
> >     FileDataSource(fileTxt);
> >     >               // Transformation en données binaires
> >     >               DataHandler expectedDH = new
> DataHandler(dataSource);
> >     >               OMText textData = fac.createOMText(expectedDH,
> true);
> >     >               // Ajout au message soap
> >     >               attach.addChild(textData);
> >     >
> >     >               return attach;
> >     >       }
> >     >
> >     >}
> >     >
> >     >
> >     >
> >
> >------------------------------------------------------------------------
> >     >
> >
> >---------------------------------------------------------------------
> >     >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     >For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >     >
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: sandesha-dev-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Please see my comments below.

On 7/19/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara,
>
> Your solution is correct.  Can you explain me what is this property and
> why it allows to pass the bug?



In WSRM the messages that belong to a sequence are numbered starting from
one. If this InvokeInOrder property is set to true, Sandesha2 will make sure
that the messages get invoked in the order of these message numbers. This is
a delivery assurance provided by Sadesha2 which is not a must to comply with
the WSRM specification. So you can safely set it to false if you do not
worry abt ardering. Infact disabling this will improve the performance.

In implementation wise, we achieve ordering using a seperate thread. If
InvokeInORder is set to true, messages will be paused at the RM handlers and
invocation will be done in the order of message numbers using our thread.
When a message get paused the current thread get returned and the incoming
sockets with the client get closed.

The bug is with axis2 not reading the attachments from the stream before
this closing of the socket.

Change this property, make other mistake:
> The problem is when I implement method addressable (i.e. I define the
> ReplyTo and AcksTo value for WSRM implementation). I have also the same
> problem in MTOMRM implementation.
> These values change with this code:
> String acksTo =
> serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
> options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> and
> options.setUseSeparateListener(true);
> In this case, for a RequestResponse method I see only the CreateSequence
> and the first message, others messages never sent. The client never
> receive the server response and the  server method is never called.
>
> For OneWay method, in TCPMon, there are all soap messages, but no server
> reactions. The  server method is never called.
>
> Have you an idea?



I guess this is the bug i fixed yested day. Please try the latest SNAPSHOT
from
http://people.apache.org/repository/sandesha2/mars/


Chamikara


Thanks for your help.
>
> Regards,
>
> Elodie
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > I just fixed a bug in Sandesha2 not-in-order case is working properly
> now.
> >
> > Currently MTOM+RM will not work when InOrderInvocation property is set
> > to true. This is due to a bug in OM  (
> > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
> >
> > But it perfectly works when InOrderInvocation is set to false. I just
> > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
> > Currentlly the code in the test method is commented till the previous
> > bug is fixed. But it passes when InOrderInvation is disabled.
> >
> > Hope this will help you.
> >
> > Chamikara
> >
> >
> >
> > On 7/17/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> > <ma...@bull.net>> wrote:
> >
> >     Hi,
> >
> >     Can you think the problem is due to the tomcat version? Or the
> >     sandesha2
> >     version? I download jars and war on
> >     http://people.apache.org/repository/sandesha2/
> >     <http://people.apache.org/repository/sandesha2/>.
> >
> >     To configure the server,I have only change the axis2.xml. I can't
> >     change
> >     the module.xml because I intente to create a common server for all
> >     independante client (WSRM only, MTOM only, MTOM-WSRM).
> >
> >     Sorry to insit.
> >     Regards
> >
> >     Elodie
> >
> >
> >     Mancinelli Elodie wrote:
> >
> >     > Hi Chamikara,
> >     >
> >     > I use tomcat in the server side and its version is the
> >     > apache-tomcat-5.5.15.
> >     > I join in attachment my client code.
> >     >
> >     > Thanks for your help.
> >     >
> >     > Regards
> >     >
> >     > Elodie
> >     >
> >     >
> >     >
> >     > Chamikara Jayalath wrote:
> >     >
> >     >> Hi Elodie,
> >     >>
> >     >> Are you using tomcat in the server side. If so which version?
> >     >> Can u send your client code as well.
> >     >>
> >     >> Chamikara
> >     >>
> >     >>
> >     >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> >     <ma...@bull.net>
> >     >> <mailto:elodie.mancinelli@bull.net
> >     <ma...@bull.net>>> wrote:
> >     >>
> >     >>     Hi all,
> >     >>
> >     >>     I want to realise an client-server which supports MTOM and
> >     WSRM. I
> >     >>     created separatly a client-server with MTOM and a
> client-server
> >     >>     with WSRM.
> >     >>
> >     >>     My server has two methods: OneWay and RequestResponse.
> >     >>
> >     >>     - When I launch my client to test the RequestResponse method:
> >     >>     In TCPMon, I see, the CreateSequence and the
> >     >>     CreateSequenceResponse. My
> >     >>     first message is sent and it is accpeted.
> >     >>     But my client never receives the response and there is no
> >     trace
> >     >> on my
> >     >>     server, the method seems not be executed.
> >     >>
> >     >>     - When I launch my client to test the OneWay method:
> >     >>     In TCPMon, I see:
> >     >>     - CreateSequence, CreateSequenceResponse
> >     >>     - Three messages have send and three acknowledgments
> >     >>     But no TerminateSequence.
> >     >>     And on the server, there is an error:
> >     >>     - "Servlet.service()" pour la servlet AxisServlet a généré
> une
> >     >>     exception
> >     >>     java.lang.IllegalStateException: Impossible de créer une
> >     >> sessionaprès
> >     >>     que la réponse ait été envoyée
> >     >>             at
> >     >>
> >     >>
> >     org.apache.catalina.connector.Request.doGetSession(Request.java
> :2214)
> >     >>             at
> >     >>
> >     org.apache.catalina.connector.Request.getSession(Request.java:2024)
> >     >>             at
> >     >>
> >     >>
> >     org.apache.catalina.connector.RequestFacade.getSession(
> RequestFacade.java:831)
> >     >>
> >     >>             at
> >     >>     ........
> >     >
> >
> >------------------------------------------------------------------------
> >
> >     >
> >     >package fr.gouv.finances.dgme.presto;
> >     >
> >     >import java.io.File;
> >     >import java.io.FileInputStream;
> >     >import javax.activation.DataHandler;
> >     >import javax.activation.FileDataSource;
> >     >import javax.xml.stream.XMLInputFactory;
> >     >import javax.xml.stream.XMLStreamReader;
> >     >import org.apache.axiom.om.OMAbstractFactory;
> >     >import org.apache.axiom.om.OMElement;
> >     >import org.apache.axiom.om.OMFactory ;
> >     >import org.apache.axiom.om.OMNamespace;
> >     >import org.apache.axiom.om.OMText;
> >     >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
> >     >import org.apache.axiom.soap.SOAP12Constants;
> >     >import org.apache.axis2.Constants ;
> >     >import org.apache.axis2.addressing.EndpointReference;
> >     >import org.apache.axis2.client.Options;
> >     >import org.apache.axis2.client.ServiceClient;
> >     >import org.apache.axis2.client.async.AsyncResult;
> >     >import org.apache.axis2.client.async.Callback;
> >     >import org.apache.axis2.context.ConfigurationContext;
> >     >import org.apache.axis2.context.ConfigurationContextFactory;
> >     >import org.apache.axis2.context.MessageContextConstants ;
> >     >import org.apache.sandesha2.client.SandeshaClientConstants;
> >     >
> >     >
> >     >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
> >     >
> >     >       static String fileXMLName="test_data_in.xml";
> >     >       static String fileNameAttach="fichier.txt";
> >     >       private static EndpointReference targetEPR = new
> >     EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
> >     >       private static String targetEPRTcpmon ="
> >     http://localhost:8070/axis2/services/PrestoSvc";
> >     >       static String namespace="http://dgme.finances.gouv.fr/presto
> ";
> >     >       private static String CLIENT_REPO_PATH = "RepoClient";
> >     >       private static String axis2_xml = CLIENT_REPO_PATH +
> >     File.separator +"conf" + File.separator + "axis2.xml";
> >     >
> >     >       /**
> >     >        * Call submitRequestReponse with attachment
> >     >        *
> >     >        */
> >     >       public  void testSubmitRequestResponseWSRMAddressable()
> >     throws Exception{
> >     >
> >     >               String nameMethod="submit";
> >     >               ConfigurationContext configContext =
> >     ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >     >               ServiceClient serviceClient = new ServiceClient
> >     (configContext,null);
> >     >
> >     >               Options options=initOptions("submit",true);
> >     >               serviceClient.setOptions(options);
> >     >               String acksTo =
> >     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
> >     >
> >     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> >     >
> >     >               System.out.println("Envoi");
> >     >               Callback callback1 = new TestCallback ("Callback
> 1");
> >     >               serviceClient.sendReceiveNonBlocking
> >     (getOMBlock("message1","sequence1",nameMethod),callback1);
> >     >
> >     >               while (!callback1.isComplete()) {
> >     >                       System.out.println("boucle1");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >
> >     >               Callback callback2 = new TestCallback ("Callback
> 2");
> >     >
> >     serviceClient.sendReceiveNonBlocking
> (getOMBlock("message2","sequence1",nameMethod),callback2);
> >     >
> >     >               while (!callback2.isComplete()) {
> >     >                       System.out.println("boucle2");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >
> >     >
> >     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
> >     >               Callback callback3 = new TestCallback ("Callback
> 3");
> >     >
> >     serviceClient.sendReceiveNonBlocking
> (getOMBlock("message3","sequence1",nameMethod),callback3);
> >     >
> >     >               while (!callback3.isComplete()) {
> >     >                       System.out.println("boucle3");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >               System.out.println("Fin du programme");
> >     >               Thread.sleep(10000);
> >     >               serviceClient.finalizeInvoke();
> >     >
> >     >       }
> >     >
> >     >
> >     >       /**
> >     >        * Call submitOneWay with attachment
> >     >        *
> >     >        */
> >     >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
> >     Exception {
> >     >
> >     >               String nameMethod="submitOneWay";
> >     >               ConfigurationContext configContext =
> >     ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >     >               ServiceClient sender = new ServiceClient
> >     (configContext,null);
> >     >
> >     >               Options options=initOptions("submitOneWay", false);
> >     >               sender.setOptions(options);
> >     >
> >     >               System.out.println("Envoi");
> >     >
> >     >
> >     sender.fireAndForget(getOMBlock("","ping1",nameMethod));
> >     >
> >     sender.fireAndForget(getOMBlock("","ping2",nameMethod));
> >     >
> >     >
> >     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
> >     >
> >     sender.fireAndForget(getOMBlock("","ping3",nameMethod));
> >     >
> >     >               Thread.sleep(10000);
> >     >               System.out.println("\nResult :");
> >     >               System.out.println("NO RETURN FOR WEBSERVICE");
> >     >               sender.finalizeInvoke();
> >     >
> >     >       }
> >     >
> >     >       private OMElement getOMBlock(String text, String
> >     sequenceKey, String nameMethod) throws Exception{
> >     >
> >     >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >     >               OMNamespace omNs =
> >     fac.createOMNamespace(namespace, "m");
> >     >               OMElement payload = getPayload(nameMethod);
> >     >
> >     >               // Attach text file
> >     >                       OMElement
> filetxt=createAttachment(fac,omNs);
> >     >                       payload.addChild(filetxt);
> >     >
> >     >               // Add sequence number
> >     >//             OMElement sequenceElem =
> >     fac.createOMElement("Sequence",omNs);
> >     >//             if (nameMethod.equalsIgnoreCase("submit"))
> >     sequenceElem.setText(sequenceKey + "-" + text);
> >     >//             else sequenceElem.setText(sequenceKey);
> >     >//             payload.addChild(sequenceElem);
> >     >
> >     >               System.out.println("Document sent : "+payload);
> >     >
> >     >               return payload;
> >     >
> >     >       }
> >     >
> >     >
> >     >       static class TestCallback extends Callback {
> >     >
> >     >               String name = null;
> >     >               public TestCallback (String name) {
> >     >                       this.name <http://this.name> = name;
> >     >               }
> >     >
> >     >               public void onComplete(AsyncResult result) {
> >     >//                     Traitement du résultat et affichage
> >     >                       System.out.println("\nResult :");
> >     >                       System.out.println("Callback '" + name
> >     +  "' got result:" + result.getResponseEnvelope());
> >     >               }
> >     >
> >     >               public void onError (Exception e) {
> >     >                       System.out.println("Error reported for
> >     test call back");
> >     >                       e.printStackTrace();
> >     >               }
> >     >       }
> >     >
> >     >       /**
> >     >        * Define options
> >     >        *
> >     >        */
> >     >       private static Options initOptions(String
> >     nameMethod,boolean SeparateListener){
> >     >
> >     >               Options options = new Options ();
> >     >               options.setTo(targetEPR);
> >     >               options.setAction(nameMethod);
> >     >
> >     options.setSoapVersionURI(
> SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> >     >
> >     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >     >               options.setUseSeparateListener(SeparateListener);
> >     >
> >     options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> >     >
> >     options.setProperty(Constants.Configuration.ENABLE_MTOM,
> >     Constants.VALUE_TRUE);
> >     >
> >     >               return options;
> >     >       }
> >     >
> >     >       /**
> >     >        * Get file
> >     >        *
> >     >        */
> >     >       private OMElement getPayload(String operation) throws
> >     Exception {
> >     >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >     >               // Declaration du namespace
> >     >               OMNamespace omNs =
> >     fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
> >     >               // Creation du sommet de l'arborescence
> >     >               OMElement payload = fac.createOMElement(operation,
> >     omNs);
> >     >
> >     >               // Lecture du fichier a recuperer
> >     >               XMLStreamReader parser =
> >     XMLInputFactory.newInstance().createXMLStreamReader(new
> >     FileInputStream("test_data_in.xml"));
> >     >               // Construction de l'element
> >     >               StAXOMBuilder builder = new StAXOMBuilder(fac,
> >     parser);
> >     >               // Intergration dans l arborescence
> >     >               payload.addChild(builder.getDocumentElement());
> >     >
> >     >               return payload;
> >     >       }
> >     >
> >     >       /**
> >     >        * Method which create attachment
> >     >        *
> >     >        */
> >     >       private static OMElement createAttachment(OMFactory fac,
> >     OMNamespace omNs) throws Exception{
> >     >
> >     >               OMElement attach = null;
> >     >
> >     >               // Creation du noeud
> >     >               attach = fac.createOMElement("attachment", omNs);
> >     >               // Lecteure de ce fichier
> >     >               File fileTxt = new File(fileNameAttach);
> >     >               FileDataSource dataSource = new
> >     FileDataSource(fileTxt);
> >     >               // Transformation en données binaires
> >     >               DataHandler expectedDH = new
> DataHandler(dataSource);
> >     >               OMText textData = fac.createOMText(expectedDH,
> true);
> >     >               // Ajout au message soap
> >     >               attach.addChild(textData);
> >     >
> >     >               return attach;
> >     >       }
> >     >
> >     >}
> >     >
> >     >
> >     >
> >
> >------------------------------------------------------------------------
> >     >
> >
> >---------------------------------------------------------------------
> >     >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     >For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >     >
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: sandesha-dev-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Please see my comments below.

On 7/19/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi Chamikara,
>
> Your solution is correct.  Can you explain me what is this property and
> why it allows to pass the bug?



In WSRM the messages that belong to a sequence are numbered starting from
one. If this InvokeInOrder property is set to true, Sandesha2 will make sure
that the messages get invoked in the order of these message numbers. This is
a delivery assurance provided by Sadesha2 which is not a must to comply with
the WSRM specification. So you can safely set it to false if you do not
worry abt ardering. Infact disabling this will improve the performance.

In implementation wise, we achieve ordering using a seperate thread. If
InvokeInORder is set to true, messages will be paused at the RM handlers and
invocation will be done in the order of message numbers using our thread.
When a message get paused the current thread get returned and the incoming
sockets with the client get closed.

The bug is with axis2 not reading the attachments from the stream before
this closing of the socket.

Change this property, make other mistake:
> The problem is when I implement method addressable (i.e. I define the
> ReplyTo and AcksTo value for WSRM implementation). I have also the same
> problem in MTOMRM implementation.
> These values change with this code:
> String acksTo =
> serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
> options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> and
> options.setUseSeparateListener(true);
> In this case, for a RequestResponse method I see only the CreateSequence
> and the first message, others messages never sent. The client never
> receive the server response and the  server method is never called.
>
> For OneWay method, in TCPMon, there are all soap messages, but no server
> reactions. The  server method is never called.
>
> Have you an idea?



I guess this is the bug i fixed yested day. Please try the latest SNAPSHOT
from
http://people.apache.org/repository/sandesha2/mars/


Chamikara


Thanks for your help.
>
> Regards,
>
> Elodie
>
> Chamikara Jayalath wrote:
>
> > Hi Elodie,
> >
> > I just fixed a bug in Sandesha2 not-in-order case is working properly
> now.
> >
> > Currently MTOM+RM will not work when InOrderInvocation property is set
> > to true. This is due to a bug in OM  (
> > https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
> >
> > But it perfectly works when InOrderInvocation is set to false. I just
> > added a test case to sandesha2 to demonstrate this (MTOMRMTest).
> > Currentlly the code in the test method is commented till the previous
> > bug is fixed. But it passes when InOrderInvation is disabled.
> >
> > Hope this will help you.
> >
> > Chamikara
> >
> >
> >
> > On 7/17/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> > <ma...@bull.net>> wrote:
> >
> >     Hi,
> >
> >     Can you think the problem is due to the tomcat version? Or the
> >     sandesha2
> >     version? I download jars and war on
> >     http://people.apache.org/repository/sandesha2/
> >     <http://people.apache.org/repository/sandesha2/>.
> >
> >     To configure the server,I have only change the axis2.xml. I can't
> >     change
> >     the module.xml because I intente to create a common server for all
> >     independante client (WSRM only, MTOM only, MTOM-WSRM).
> >
> >     Sorry to insit.
> >     Regards
> >
> >     Elodie
> >
> >
> >     Mancinelli Elodie wrote:
> >
> >     > Hi Chamikara,
> >     >
> >     > I use tomcat in the server side and its version is the
> >     > apache-tomcat-5.5.15.
> >     > I join in attachment my client code.
> >     >
> >     > Thanks for your help.
> >     >
> >     > Regards
> >     >
> >     > Elodie
> >     >
> >     >
> >     >
> >     > Chamikara Jayalath wrote:
> >     >
> >     >> Hi Elodie,
> >     >>
> >     >> Are you using tomcat in the server side. If so which version?
> >     >> Can u send your client code as well.
> >     >>
> >     >> Chamikara
> >     >>
> >     >>
> >     >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> >     <ma...@bull.net>
> >     >> <mailto:elodie.mancinelli@bull.net
> >     <ma...@bull.net>>> wrote:
> >     >>
> >     >>     Hi all,
> >     >>
> >     >>     I want to realise an client-server which supports MTOM and
> >     WSRM. I
> >     >>     created separatly a client-server with MTOM and a
> client-server
> >     >>     with WSRM.
> >     >>
> >     >>     My server has two methods: OneWay and RequestResponse.
> >     >>
> >     >>     - When I launch my client to test the RequestResponse method:
> >     >>     In TCPMon, I see, the CreateSequence and the
> >     >>     CreateSequenceResponse. My
> >     >>     first message is sent and it is accpeted.
> >     >>     But my client never receives the response and there is no
> >     trace
> >     >> on my
> >     >>     server, the method seems not be executed.
> >     >>
> >     >>     - When I launch my client to test the OneWay method:
> >     >>     In TCPMon, I see:
> >     >>     - CreateSequence, CreateSequenceResponse
> >     >>     - Three messages have send and three acknowledgments
> >     >>     But no TerminateSequence.
> >     >>     And on the server, there is an error:
> >     >>     - "Servlet.service()" pour la servlet AxisServlet a généré
> une
> >     >>     exception
> >     >>     java.lang.IllegalStateException: Impossible de créer une
> >     >> sessionaprès
> >     >>     que la réponse ait été envoyée
> >     >>             at
> >     >>
> >     >>
> >     org.apache.catalina.connector.Request.doGetSession(Request.java
> :2214)
> >     >>             at
> >     >>
> >     org.apache.catalina.connector.Request.getSession(Request.java:2024)
> >     >>             at
> >     >>
> >     >>
> >     org.apache.catalina.connector.RequestFacade.getSession(
> RequestFacade.java:831)
> >     >>
> >     >>             at
> >     >>     ........
> >     >
> >
> >------------------------------------------------------------------------
> >
> >     >
> >     >package fr.gouv.finances.dgme.presto;
> >     >
> >     >import java.io.File;
> >     >import java.io.FileInputStream;
> >     >import javax.activation.DataHandler;
> >     >import javax.activation.FileDataSource;
> >     >import javax.xml.stream.XMLInputFactory;
> >     >import javax.xml.stream.XMLStreamReader;
> >     >import org.apache.axiom.om.OMAbstractFactory;
> >     >import org.apache.axiom.om.OMElement;
> >     >import org.apache.axiom.om.OMFactory ;
> >     >import org.apache.axiom.om.OMNamespace;
> >     >import org.apache.axiom.om.OMText;
> >     >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
> >     >import org.apache.axiom.soap.SOAP12Constants;
> >     >import org.apache.axis2.Constants ;
> >     >import org.apache.axis2.addressing.EndpointReference;
> >     >import org.apache.axis2.client.Options;
> >     >import org.apache.axis2.client.ServiceClient;
> >     >import org.apache.axis2.client.async.AsyncResult;
> >     >import org.apache.axis2.client.async.Callback;
> >     >import org.apache.axis2.context.ConfigurationContext;
> >     >import org.apache.axis2.context.ConfigurationContextFactory;
> >     >import org.apache.axis2.context.MessageContextConstants ;
> >     >import org.apache.sandesha2.client.SandeshaClientConstants;
> >     >
> >     >
> >     >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
> >     >
> >     >       static String fileXMLName="test_data_in.xml";
> >     >       static String fileNameAttach="fichier.txt";
> >     >       private static EndpointReference targetEPR = new
> >     EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
> >     >       private static String targetEPRTcpmon ="
> >     http://localhost:8070/axis2/services/PrestoSvc";
> >     >       static String namespace="http://dgme.finances.gouv.fr/presto
> ";
> >     >       private static String CLIENT_REPO_PATH = "RepoClient";
> >     >       private static String axis2_xml = CLIENT_REPO_PATH +
> >     File.separator +"conf" + File.separator + "axis2.xml";
> >     >
> >     >       /**
> >     >        * Call submitRequestReponse with attachment
> >     >        *
> >     >        */
> >     >       public  void testSubmitRequestResponseWSRMAddressable()
> >     throws Exception{
> >     >
> >     >               String nameMethod="submit";
> >     >               ConfigurationContext configContext =
> >     ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >     >               ServiceClient serviceClient = new ServiceClient
> >     (configContext,null);
> >     >
> >     >               Options options=initOptions("submit",true);
> >     >               serviceClient.setOptions(options);
> >     >               String acksTo =
> >     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
> >     >
> >     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
> >     >
> >     >               System.out.println("Envoi");
> >     >               Callback callback1 = new TestCallback ("Callback
> 1");
> >     >               serviceClient.sendReceiveNonBlocking
> >     (getOMBlock("message1","sequence1",nameMethod),callback1);
> >     >
> >     >               while (!callback1.isComplete()) {
> >     >                       System.out.println("boucle1");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >
> >     >               Callback callback2 = new TestCallback ("Callback
> 2");
> >     >
> >     serviceClient.sendReceiveNonBlocking
> (getOMBlock("message2","sequence1",nameMethod),callback2);
> >     >
> >     >               while (!callback2.isComplete()) {
> >     >                       System.out.println("boucle2");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >
> >     >
> >     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
> >     >               Callback callback3 = new TestCallback ("Callback
> 3");
> >     >
> >     serviceClient.sendReceiveNonBlocking
> (getOMBlock("message3","sequence1",nameMethod),callback3);
> >     >
> >     >               while (!callback3.isComplete()) {
> >     >                       System.out.println("boucle3");
> >     >                       Thread.sleep(1000);
> >     >               }
> >     >               System.out.println("Fin du programme");
> >     >               Thread.sleep(10000);
> >     >               serviceClient.finalizeInvoke();
> >     >
> >     >       }
> >     >
> >     >
> >     >       /**
> >     >        * Call submitOneWay with attachment
> >     >        *
> >     >        */
> >     >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
> >     Exception {
> >     >
> >     >               String nameMethod="submitOneWay";
> >     >               ConfigurationContext configContext =
> >     ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >     >               ServiceClient sender = new ServiceClient
> >     (configContext,null);
> >     >
> >     >               Options options=initOptions("submitOneWay", false);
> >     >               sender.setOptions(options);
> >     >
> >     >               System.out.println("Envoi");
> >     >
> >     >
> >     sender.fireAndForget(getOMBlock("","ping1",nameMethod));
> >     >
> >     sender.fireAndForget(getOMBlock("","ping2",nameMethod));
> >     >
> >     >
> >     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
> >     >
> >     sender.fireAndForget(getOMBlock("","ping3",nameMethod));
> >     >
> >     >               Thread.sleep(10000);
> >     >               System.out.println("\nResult :");
> >     >               System.out.println("NO RETURN FOR WEBSERVICE");
> >     >               sender.finalizeInvoke();
> >     >
> >     >       }
> >     >
> >     >       private OMElement getOMBlock(String text, String
> >     sequenceKey, String nameMethod) throws Exception{
> >     >
> >     >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >     >               OMNamespace omNs =
> >     fac.createOMNamespace(namespace, "m");
> >     >               OMElement payload = getPayload(nameMethod);
> >     >
> >     >               // Attach text file
> >     >                       OMElement
> filetxt=createAttachment(fac,omNs);
> >     >                       payload.addChild(filetxt);
> >     >
> >     >               // Add sequence number
> >     >//             OMElement sequenceElem =
> >     fac.createOMElement("Sequence",omNs);
> >     >//             if (nameMethod.equalsIgnoreCase("submit"))
> >     sequenceElem.setText(sequenceKey + "-" + text);
> >     >//             else sequenceElem.setText(sequenceKey);
> >     >//             payload.addChild(sequenceElem);
> >     >
> >     >               System.out.println("Document sent : "+payload);
> >     >
> >     >               return payload;
> >     >
> >     >       }
> >     >
> >     >
> >     >       static class TestCallback extends Callback {
> >     >
> >     >               String name = null;
> >     >               public TestCallback (String name) {
> >     >                       this.name <http://this.name> = name;
> >     >               }
> >     >
> >     >               public void onComplete(AsyncResult result) {
> >     >//                     Traitement du résultat et affichage
> >     >                       System.out.println("\nResult :");
> >     >                       System.out.println("Callback '" + name
> >     +  "' got result:" + result.getResponseEnvelope());
> >     >               }
> >     >
> >     >               public void onError (Exception e) {
> >     >                       System.out.println("Error reported for
> >     test call back");
> >     >                       e.printStackTrace();
> >     >               }
> >     >       }
> >     >
> >     >       /**
> >     >        * Define options
> >     >        *
> >     >        */
> >     >       private static Options initOptions(String
> >     nameMethod,boolean SeparateListener){
> >     >
> >     >               Options options = new Options ();
> >     >               options.setTo(targetEPR);
> >     >               options.setAction(nameMethod);
> >     >
> >     options.setSoapVersionURI(
> SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> >     >
> >     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >     >               options.setUseSeparateListener(SeparateListener);
> >     >
> >     options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> >     >
> >     options.setProperty(Constants.Configuration.ENABLE_MTOM,
> >     Constants.VALUE_TRUE);
> >     >
> >     >               return options;
> >     >       }
> >     >
> >     >       /**
> >     >        * Get file
> >     >        *
> >     >        */
> >     >       private OMElement getPayload(String operation) throws
> >     Exception {
> >     >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >     >               // Declaration du namespace
> >     >               OMNamespace omNs =
> >     fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
> >     >               // Creation du sommet de l'arborescence
> >     >               OMElement payload = fac.createOMElement(operation,
> >     omNs);
> >     >
> >     >               // Lecture du fichier a recuperer
> >     >               XMLStreamReader parser =
> >     XMLInputFactory.newInstance().createXMLStreamReader(new
> >     FileInputStream("test_data_in.xml"));
> >     >               // Construction de l'element
> >     >               StAXOMBuilder builder = new StAXOMBuilder(fac,
> >     parser);
> >     >               // Intergration dans l arborescence
> >     >               payload.addChild(builder.getDocumentElement());
> >     >
> >     >               return payload;
> >     >       }
> >     >
> >     >       /**
> >     >        * Method which create attachment
> >     >        *
> >     >        */
> >     >       private static OMElement createAttachment(OMFactory fac,
> >     OMNamespace omNs) throws Exception{
> >     >
> >     >               OMElement attach = null;
> >     >
> >     >               // Creation du noeud
> >     >               attach = fac.createOMElement("attachment", omNs);
> >     >               // Lecteure de ce fichier
> >     >               File fileTxt = new File(fileNameAttach);
> >     >               FileDataSource dataSource = new
> >     FileDataSource(fileTxt);
> >     >               // Transformation en données binaires
> >     >               DataHandler expectedDH = new
> DataHandler(dataSource);
> >     >               OMText textData = fac.createOMText(expectedDH,
> true);
> >     >               // Ajout au message soap
> >     >               attach.addChild(textData);
> >     >
> >     >               return attach;
> >     >       }
> >     >
> >     >}
> >     >
> >     >
> >     >
> >
> >------------------------------------------------------------------------
> >     >
> >
> >---------------------------------------------------------------------
> >     >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     >For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >     >
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: sandesha-dev-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

Your solution is correct.  Can you explain me what is this property and 
why it allows to pass the bug?

Change this property, make other mistake:
The problem is when I implement method addressable (i.e. I define the 
ReplyTo and AcksTo value for WSRM implementation). I have also the same 
problem in MTOMRM implementation.
These values change with this code:
String acksTo = 
serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
and
options.setUseSeparateListener(true);
In this case, for a RequestResponse method I see only the CreateSequence 
and the first message, others messages never sent. The client never 
receive the server response and the  server method is never called.

For OneWay method, in TCPMon, there are all soap messages, but no server 
reactions. The  server method is never called.

Have you an idea?

Thanks for your help.

Regards,

Elodie

Chamikara Jayalath wrote:

> Hi Elodie,
>
> I just fixed a bug in Sandesha2 not-in-order case is working properly now.
>
> Currently MTOM+RM will not work when InOrderInvocation property is set 
> to true. This is due to a bug in OM  ( 
> https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>
> But it perfectly works when InOrderInvocation is set to false. I just 
> added a test case to sandesha2 to demonstrate this (MTOMRMTest). 
> Currentlly the code in the test method is commented till the previous 
> bug is fixed. But it passes when InOrderInvation is disabled.
>
> Hope this will help you.
>
> Chamikara
>
>
>
> On 7/17/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi,
>
>     Can you think the problem is due to the tomcat version? Or the
>     sandesha2
>     version? I download jars and war on
>     http://people.apache.org/repository/sandesha2/
>     <http://people.apache.org/repository/sandesha2/>.
>
>     To configure the server,I have only change the axis2.xml. I can't
>     change
>     the module.xml because I intente to create a common server for all
>     independante client (WSRM only, MTOM only, MTOM-WSRM).
>
>     Sorry to insit.
>     Regards
>
>     Elodie
>
>
>     Mancinelli Elodie wrote:
>
>     > Hi Chamikara,
>     >
>     > I use tomcat in the server side and its version is the
>     > apache-tomcat-5.5.15.
>     > I join in attachment my client code.
>     >
>     > Thanks for your help.
>     >
>     > Regards
>     >
>     > Elodie
>     >
>     >
>     >
>     > Chamikara Jayalath wrote:
>     >
>     >> Hi Elodie,
>     >>
>     >> Are you using tomcat in the server side. If so which version?
>     >> Can u send your client code as well.
>     >>
>     >> Chamikara
>     >>
>     >>
>     >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
>     <ma...@bull.net>
>     >> <mailto:elodie.mancinelli@bull.net
>     <ma...@bull.net>>> wrote:
>     >>
>     >>     Hi all,
>     >>
>     >>     I want to realise an client-server which supports MTOM and
>     WSRM. I
>     >>     created separatly a client-server with MTOM and a client-server
>     >>     with WSRM.
>     >>
>     >>     My server has two methods: OneWay and RequestResponse.
>     >>
>     >>     - When I launch my client to test the RequestResponse method:
>     >>     In TCPMon, I see, the CreateSequence and the
>     >>     CreateSequenceResponse. My
>     >>     first message is sent and it is accpeted.
>     >>     But my client never receives the response and there is no
>     trace
>     >> on my
>     >>     server, the method seems not be executed.
>     >>
>     >>     - When I launch my client to test the OneWay method:
>     >>     In TCPMon, I see:
>     >>     - CreateSequence, CreateSequenceResponse
>     >>     - Three messages have send and three acknowledgments
>     >>     But no TerminateSequence.
>     >>     And on the server, there is an error:
>     >>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>     >>     exception
>     >>     java.lang.IllegalStateException: Impossible de créer une
>     >> sessionaprès
>     >>     que la réponse ait été envoyée
>     >>             at
>     >>
>     >>
>     org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>     >>             at
>     >>    
>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>     >>             at
>     >>
>     >>
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
>     >>
>     >>             at
>     >>     ........
>     >
>     >------------------------------------------------------------------------
>
>     >
>     >package fr.gouv.finances.dgme.presto;
>     >
>     >import java.io.File;
>     >import java.io.FileInputStream;
>     >import javax.activation.DataHandler;
>     >import javax.activation.FileDataSource;
>     >import javax.xml.stream.XMLInputFactory;
>     >import javax.xml.stream.XMLStreamReader;
>     >import org.apache.axiom.om.OMAbstractFactory;
>     >import org.apache.axiom.om.OMElement;
>     >import org.apache.axiom.om.OMFactory ;
>     >import org.apache.axiom.om.OMNamespace;
>     >import org.apache.axiom.om.OMText;
>     >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     >import org.apache.axiom.soap.SOAP12Constants;
>     >import org.apache.axis2.Constants ;
>     >import org.apache.axis2.addressing.EndpointReference;
>     >import org.apache.axis2.client.Options;
>     >import org.apache.axis2.client.ServiceClient;
>     >import org.apache.axis2.client.async.AsyncResult;
>     >import org.apache.axis2.client.async.Callback;
>     >import org.apache.axis2.context.ConfigurationContext;
>     >import org.apache.axis2.context.ConfigurationContextFactory;
>     >import org.apache.axis2.context.MessageContextConstants ;
>     >import org.apache.sandesha2.client.SandeshaClientConstants;
>     >
>     >
>     >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
>     >
>     >       static String fileXMLName="test_data_in.xml";
>     >       static String fileNameAttach="fichier.txt";
>     >       private static EndpointReference targetEPR = new
>     EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
>     >       private static String targetEPRTcpmon ="
>     http://localhost:8070/axis2/services/PrestoSvc";
>     >       static String namespace="http://dgme.finances.gouv.fr/presto";
>     >       private static String CLIENT_REPO_PATH = "RepoClient";
>     >       private static String axis2_xml = CLIENT_REPO_PATH +
>     File.separator +"conf" + File.separator + "axis2.xml";
>     >
>     >       /**
>     >        * Call submitRequestReponse with attachment
>     >        *
>     >        */
>     >       public  void testSubmitRequestResponseWSRMAddressable()
>     throws Exception{
>     >
>     >               String nameMethod="submit";
>     >               ConfigurationContext configContext =
>     ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>     >               ServiceClient serviceClient = new ServiceClient
>     (configContext,null);
>     >
>     >               Options options=initOptions("submit",true);
>     >               serviceClient.setOptions(options);
>     >               String acksTo =
>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
>     >              
>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>     >
>     >               System.out.println("Envoi");
>     >               Callback callback1 = new TestCallback ("Callback 1");
>     >               serviceClient.sendReceiveNonBlocking
>     (getOMBlock("message1","sequence1",nameMethod),callback1);
>     >
>     >               while (!callback1.isComplete()) {
>     >                       System.out.println("boucle1");
>     >                       Thread.sleep(1000);
>     >               }
>     >
>     >               Callback callback2 = new TestCallback ("Callback 2");
>     >              
>     serviceClient.sendReceiveNonBlocking(getOMBlock("message2","sequence1",nameMethod),callback2);
>     >
>     >               while (!callback2.isComplete()) {
>     >                       System.out.println("boucle2");
>     >                       Thread.sleep(1000);
>     >               }
>     >
>     >              
>     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>     >               Callback callback3 = new TestCallback ("Callback 3");
>     >              
>     serviceClient.sendReceiveNonBlocking(getOMBlock("message3","sequence1",nameMethod),callback3);
>     >
>     >               while (!callback3.isComplete()) {
>     >                       System.out.println("boucle3");
>     >                       Thread.sleep(1000);
>     >               }
>     >               System.out.println("Fin du programme");
>     >               Thread.sleep(10000);
>     >               serviceClient.finalizeInvoke();
>     >
>     >       }
>     >
>     >
>     >       /**
>     >        * Call submitOneWay with attachment
>     >        *
>     >        */
>     >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
>     Exception {
>     >
>     >               String nameMethod="submitOneWay";
>     >               ConfigurationContext configContext =
>     ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>     >               ServiceClient sender = new ServiceClient
>     (configContext,null);
>     >
>     >               Options options=initOptions("submitOneWay", false);
>     >               sender.setOptions(options);
>     >
>     >               System.out.println("Envoi");
>     >
>     >              
>     sender.fireAndForget(getOMBlock("","ping1",nameMethod));
>     >              
>     sender.fireAndForget(getOMBlock("","ping2",nameMethod));
>     >
>     >              
>     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>     >              
>     sender.fireAndForget(getOMBlock("","ping3",nameMethod));
>     >
>     >               Thread.sleep(10000);
>     >               System.out.println("\nResult :");
>     >               System.out.println("NO RETURN FOR WEBSERVICE");
>     >               sender.finalizeInvoke();
>     >
>     >       }
>     >
>     >       private OMElement getOMBlock(String text, String
>     sequenceKey, String nameMethod) throws Exception{
>     >
>     >               OMFactory fac = OMAbstractFactory.getOMFactory();
>     >               OMNamespace omNs =
>     fac.createOMNamespace(namespace, "m");
>     >               OMElement payload = getPayload(nameMethod);
>     >
>     >               // Attach text file
>     >                       OMElement filetxt=createAttachment(fac,omNs);
>     >                       payload.addChild(filetxt);
>     >
>     >               // Add sequence number
>     >//             OMElement sequenceElem =
>     fac.createOMElement("Sequence",omNs);
>     >//             if (nameMethod.equalsIgnoreCase("submit"))
>     sequenceElem.setText(sequenceKey + "-" + text);
>     >//             else sequenceElem.setText(sequenceKey);
>     >//             payload.addChild(sequenceElem);
>     >
>     >               System.out.println("Document sent : "+payload);
>     >
>     >               return payload;
>     >
>     >       }
>     >
>     >
>     >       static class TestCallback extends Callback {
>     >
>     >               String name = null;
>     >               public TestCallback (String name) {
>     >                       this.name <http://this.name> = name;
>     >               }
>     >
>     >               public void onComplete(AsyncResult result) {
>     >//                     Traitement du résultat et affichage
>     >                       System.out.println("\nResult :");
>     >                       System.out.println("Callback '" + name
>     +  "' got result:" + result.getResponseEnvelope());
>     >               }
>     >
>     >               public void onError (Exception e) {
>     >                       System.out.println("Error reported for
>     test call back");
>     >                       e.printStackTrace();
>     >               }
>     >       }
>     >
>     >       /**
>     >        * Define options
>     >        *
>     >        */
>     >       private static Options initOptions(String
>     nameMethod,boolean SeparateListener){
>     >
>     >               Options options = new Options ();
>     >               options.setTo(targetEPR);
>     >               options.setAction(nameMethod);
>     >              
>     options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>     >              
>     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>     >               options.setUseSeparateListener(SeparateListener);
>     >              
>     options.setProperty(MessageContextConstants.TRANSPORT_URL,targetEPRTcpmon);
>     >              
>     options.setProperty(Constants.Configuration.ENABLE_MTOM,
>     Constants.VALUE_TRUE);
>     >
>     >               return options;
>     >       }
>     >
>     >       /**
>     >        * Get file
>     >        *
>     >        */
>     >       private OMElement getPayload(String operation) throws
>     Exception {
>     >               OMFactory fac = OMAbstractFactory.getOMFactory();
>     >               // Declaration du namespace
>     >               OMNamespace omNs =
>     fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
>     >               // Creation du sommet de l'arborescence
>     >               OMElement payload = fac.createOMElement(operation,
>     omNs);
>     >
>     >               // Lecture du fichier a recuperer
>     >               XMLStreamReader parser =
>     XMLInputFactory.newInstance().createXMLStreamReader(new
>     FileInputStream("test_data_in.xml"));
>     >               // Construction de l'element
>     >               StAXOMBuilder builder = new StAXOMBuilder(fac,
>     parser);
>     >               // Intergration dans l arborescence
>     >               payload.addChild(builder.getDocumentElement());
>     >
>     >               return payload;
>     >       }
>     >
>     >       /**
>     >        * Method which create attachment
>     >        *
>     >        */
>     >       private static OMElement createAttachment(OMFactory fac,
>     OMNamespace omNs) throws Exception{
>     >
>     >               OMElement attach = null;
>     >
>     >               // Creation du noeud
>     >               attach = fac.createOMElement("attachment", omNs);
>     >               // Lecteure de ce fichier
>     >               File fileTxt = new File(fileNameAttach);
>     >               FileDataSource dataSource = new
>     FileDataSource(fileTxt);
>     >               // Transformation en données binaires
>     >               DataHandler expectedDH = new DataHandler(dataSource);
>     >               OMText textData = fac.createOMText(expectedDH, true);
>     >               // Ajout au message soap
>     >               attach.addChild(textData);
>     >
>     >               return attach;
>     >       }
>     >
>     >}
>     >
>     >
>     >
>     >------------------------------------------------------------------------
>     >
>     >---------------------------------------------------------------------
>     >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>     >
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

Your solution is correct.  Can you explain me what is this property and 
why it allows to pass the bug?

Change this property, make other mistake:
The problem is when I implement method addressable (i.e. I define the 
ReplyTo and AcksTo value for WSRM implementation). I have also the same 
problem in MTOMRM implementation.
These values change with this code:
String acksTo = 
serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
and
options.setUseSeparateListener(true);
In this case, for a RequestResponse method I see only the CreateSequence 
and the first message, others messages never sent. The client never 
receive the server response and the  server method is never called.

For OneWay method, in TCPMon, there are all soap messages, but no server 
reactions. The  server method is never called.

Have you an idea?

Thanks for your help.

Regards,

Elodie

Chamikara Jayalath wrote:

> Hi Elodie,
>
> I just fixed a bug in Sandesha2 not-in-order case is working properly now.
>
> Currently MTOM+RM will not work when InOrderInvocation property is set 
> to true. This is due to a bug in OM  ( 
> https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>
> But it perfectly works when InOrderInvocation is set to false. I just 
> added a test case to sandesha2 to demonstrate this (MTOMRMTest). 
> Currentlly the code in the test method is commented till the previous 
> bug is fixed. But it passes when InOrderInvation is disabled.
>
> Hope this will help you.
>
> Chamikara
>
>
>
> On 7/17/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi,
>
>     Can you think the problem is due to the tomcat version? Or the
>     sandesha2
>     version? I download jars and war on
>     http://people.apache.org/repository/sandesha2/
>     <http://people.apache.org/repository/sandesha2/>.
>
>     To configure the server,I have only change the axis2.xml. I can't
>     change
>     the module.xml because I intente to create a common server for all
>     independante client (WSRM only, MTOM only, MTOM-WSRM).
>
>     Sorry to insit.
>     Regards
>
>     Elodie
>
>
>     Mancinelli Elodie wrote:
>
>     > Hi Chamikara,
>     >
>     > I use tomcat in the server side and its version is the
>     > apache-tomcat-5.5.15.
>     > I join in attachment my client code.
>     >
>     > Thanks for your help.
>     >
>     > Regards
>     >
>     > Elodie
>     >
>     >
>     >
>     > Chamikara Jayalath wrote:
>     >
>     >> Hi Elodie,
>     >>
>     >> Are you using tomcat in the server side. If so which version?
>     >> Can u send your client code as well.
>     >>
>     >> Chamikara
>     >>
>     >>
>     >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
>     <ma...@bull.net>
>     >> <mailto:elodie.mancinelli@bull.net
>     <ma...@bull.net>>> wrote:
>     >>
>     >>     Hi all,
>     >>
>     >>     I want to realise an client-server which supports MTOM and
>     WSRM. I
>     >>     created separatly a client-server with MTOM and a client-server
>     >>     with WSRM.
>     >>
>     >>     My server has two methods: OneWay and RequestResponse.
>     >>
>     >>     - When I launch my client to test the RequestResponse method:
>     >>     In TCPMon, I see, the CreateSequence and the
>     >>     CreateSequenceResponse. My
>     >>     first message is sent and it is accpeted.
>     >>     But my client never receives the response and there is no
>     trace
>     >> on my
>     >>     server, the method seems not be executed.
>     >>
>     >>     - When I launch my client to test the OneWay method:
>     >>     In TCPMon, I see:
>     >>     - CreateSequence, CreateSequenceResponse
>     >>     - Three messages have send and three acknowledgments
>     >>     But no TerminateSequence.
>     >>     And on the server, there is an error:
>     >>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>     >>     exception
>     >>     java.lang.IllegalStateException: Impossible de créer une
>     >> sessionaprès
>     >>     que la réponse ait été envoyée
>     >>             at
>     >>
>     >>
>     org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>     >>             at
>     >>    
>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>     >>             at
>     >>
>     >>
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
>     >>
>     >>             at
>     >>     ........
>     >
>     >------------------------------------------------------------------------
>
>     >
>     >package fr.gouv.finances.dgme.presto;
>     >
>     >import java.io.File;
>     >import java.io.FileInputStream;
>     >import javax.activation.DataHandler;
>     >import javax.activation.FileDataSource;
>     >import javax.xml.stream.XMLInputFactory;
>     >import javax.xml.stream.XMLStreamReader;
>     >import org.apache.axiom.om.OMAbstractFactory;
>     >import org.apache.axiom.om.OMElement;
>     >import org.apache.axiom.om.OMFactory ;
>     >import org.apache.axiom.om.OMNamespace;
>     >import org.apache.axiom.om.OMText;
>     >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     >import org.apache.axiom.soap.SOAP12Constants;
>     >import org.apache.axis2.Constants ;
>     >import org.apache.axis2.addressing.EndpointReference;
>     >import org.apache.axis2.client.Options;
>     >import org.apache.axis2.client.ServiceClient;
>     >import org.apache.axis2.client.async.AsyncResult;
>     >import org.apache.axis2.client.async.Callback;
>     >import org.apache.axis2.context.ConfigurationContext;
>     >import org.apache.axis2.context.ConfigurationContextFactory;
>     >import org.apache.axis2.context.MessageContextConstants ;
>     >import org.apache.sandesha2.client.SandeshaClientConstants;
>     >
>     >
>     >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
>     >
>     >       static String fileXMLName="test_data_in.xml";
>     >       static String fileNameAttach="fichier.txt";
>     >       private static EndpointReference targetEPR = new
>     EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
>     >       private static String targetEPRTcpmon ="
>     http://localhost:8070/axis2/services/PrestoSvc";
>     >       static String namespace="http://dgme.finances.gouv.fr/presto";
>     >       private static String CLIENT_REPO_PATH = "RepoClient";
>     >       private static String axis2_xml = CLIENT_REPO_PATH +
>     File.separator +"conf" + File.separator + "axis2.xml";
>     >
>     >       /**
>     >        * Call submitRequestReponse with attachment
>     >        *
>     >        */
>     >       public  void testSubmitRequestResponseWSRMAddressable()
>     throws Exception{
>     >
>     >               String nameMethod="submit";
>     >               ConfigurationContext configContext =
>     ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>     >               ServiceClient serviceClient = new ServiceClient
>     (configContext,null);
>     >
>     >               Options options=initOptions("submit",true);
>     >               serviceClient.setOptions(options);
>     >               String acksTo =
>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
>     >              
>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>     >
>     >               System.out.println("Envoi");
>     >               Callback callback1 = new TestCallback ("Callback 1");
>     >               serviceClient.sendReceiveNonBlocking
>     (getOMBlock("message1","sequence1",nameMethod),callback1);
>     >
>     >               while (!callback1.isComplete()) {
>     >                       System.out.println("boucle1");
>     >                       Thread.sleep(1000);
>     >               }
>     >
>     >               Callback callback2 = new TestCallback ("Callback 2");
>     >              
>     serviceClient.sendReceiveNonBlocking(getOMBlock("message2","sequence1",nameMethod),callback2);
>     >
>     >               while (!callback2.isComplete()) {
>     >                       System.out.println("boucle2");
>     >                       Thread.sleep(1000);
>     >               }
>     >
>     >              
>     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>     >               Callback callback3 = new TestCallback ("Callback 3");
>     >              
>     serviceClient.sendReceiveNonBlocking(getOMBlock("message3","sequence1",nameMethod),callback3);
>     >
>     >               while (!callback3.isComplete()) {
>     >                       System.out.println("boucle3");
>     >                       Thread.sleep(1000);
>     >               }
>     >               System.out.println("Fin du programme");
>     >               Thread.sleep(10000);
>     >               serviceClient.finalizeInvoke();
>     >
>     >       }
>     >
>     >
>     >       /**
>     >        * Call submitOneWay with attachment
>     >        *
>     >        */
>     >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
>     Exception {
>     >
>     >               String nameMethod="submitOneWay";
>     >               ConfigurationContext configContext =
>     ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>     >               ServiceClient sender = new ServiceClient
>     (configContext,null);
>     >
>     >               Options options=initOptions("submitOneWay", false);
>     >               sender.setOptions(options);
>     >
>     >               System.out.println("Envoi");
>     >
>     >              
>     sender.fireAndForget(getOMBlock("","ping1",nameMethod));
>     >              
>     sender.fireAndForget(getOMBlock("","ping2",nameMethod));
>     >
>     >              
>     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>     >              
>     sender.fireAndForget(getOMBlock("","ping3",nameMethod));
>     >
>     >               Thread.sleep(10000);
>     >               System.out.println("\nResult :");
>     >               System.out.println("NO RETURN FOR WEBSERVICE");
>     >               sender.finalizeInvoke();
>     >
>     >       }
>     >
>     >       private OMElement getOMBlock(String text, String
>     sequenceKey, String nameMethod) throws Exception{
>     >
>     >               OMFactory fac = OMAbstractFactory.getOMFactory();
>     >               OMNamespace omNs =
>     fac.createOMNamespace(namespace, "m");
>     >               OMElement payload = getPayload(nameMethod);
>     >
>     >               // Attach text file
>     >                       OMElement filetxt=createAttachment(fac,omNs);
>     >                       payload.addChild(filetxt);
>     >
>     >               // Add sequence number
>     >//             OMElement sequenceElem =
>     fac.createOMElement("Sequence",omNs);
>     >//             if (nameMethod.equalsIgnoreCase("submit"))
>     sequenceElem.setText(sequenceKey + "-" + text);
>     >//             else sequenceElem.setText(sequenceKey);
>     >//             payload.addChild(sequenceElem);
>     >
>     >               System.out.println("Document sent : "+payload);
>     >
>     >               return payload;
>     >
>     >       }
>     >
>     >
>     >       static class TestCallback extends Callback {
>     >
>     >               String name = null;
>     >               public TestCallback (String name) {
>     >                       this.name <http://this.name> = name;
>     >               }
>     >
>     >               public void onComplete(AsyncResult result) {
>     >//                     Traitement du résultat et affichage
>     >                       System.out.println("\nResult :");
>     >                       System.out.println("Callback '" + name
>     +  "' got result:" + result.getResponseEnvelope());
>     >               }
>     >
>     >               public void onError (Exception e) {
>     >                       System.out.println("Error reported for
>     test call back");
>     >                       e.printStackTrace();
>     >               }
>     >       }
>     >
>     >       /**
>     >        * Define options
>     >        *
>     >        */
>     >       private static Options initOptions(String
>     nameMethod,boolean SeparateListener){
>     >
>     >               Options options = new Options ();
>     >               options.setTo(targetEPR);
>     >               options.setAction(nameMethod);
>     >              
>     options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>     >              
>     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>     >               options.setUseSeparateListener(SeparateListener);
>     >              
>     options.setProperty(MessageContextConstants.TRANSPORT_URL,targetEPRTcpmon);
>     >              
>     options.setProperty(Constants.Configuration.ENABLE_MTOM,
>     Constants.VALUE_TRUE);
>     >
>     >               return options;
>     >       }
>     >
>     >       /**
>     >        * Get file
>     >        *
>     >        */
>     >       private OMElement getPayload(String operation) throws
>     Exception {
>     >               OMFactory fac = OMAbstractFactory.getOMFactory();
>     >               // Declaration du namespace
>     >               OMNamespace omNs =
>     fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
>     >               // Creation du sommet de l'arborescence
>     >               OMElement payload = fac.createOMElement(operation,
>     omNs);
>     >
>     >               // Lecture du fichier a recuperer
>     >               XMLStreamReader parser =
>     XMLInputFactory.newInstance().createXMLStreamReader(new
>     FileInputStream("test_data_in.xml"));
>     >               // Construction de l'element
>     >               StAXOMBuilder builder = new StAXOMBuilder(fac,
>     parser);
>     >               // Intergration dans l arborescence
>     >               payload.addChild(builder.getDocumentElement());
>     >
>     >               return payload;
>     >       }
>     >
>     >       /**
>     >        * Method which create attachment
>     >        *
>     >        */
>     >       private static OMElement createAttachment(OMFactory fac,
>     OMNamespace omNs) throws Exception{
>     >
>     >               OMElement attach = null;
>     >
>     >               // Creation du noeud
>     >               attach = fac.createOMElement("attachment", omNs);
>     >               // Lecteure de ce fichier
>     >               File fileTxt = new File(fileNameAttach);
>     >               FileDataSource dataSource = new
>     FileDataSource(fileTxt);
>     >               // Transformation en données binaires
>     >               DataHandler expectedDH = new DataHandler(dataSource);
>     >               OMText textData = fac.createOMText(expectedDH, true);
>     >               // Ajout au message soap
>     >               attach.addChild(textData);
>     >
>     >               return attach;
>     >       }
>     >
>     >}
>     >
>     >
>     >
>     >------------------------------------------------------------------------
>     >
>     >---------------------------------------------------------------------
>     >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>     >
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

Your solution is correct.  Can you explain me what is this property and 
why it allows to pass the bug?

Change this property, make other mistake:
The problem is when I implement method addressable (i.e. I define the 
ReplyTo and AcksTo value for WSRM implementation). I have also the same 
problem in MTOMRM implementation.
These values change with this code:
String acksTo = 
serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
and
options.setUseSeparateListener(true);
In this case, for a RequestResponse method I see only the CreateSequence 
and the first message, others messages never sent. The client never 
receive the server response and the  server method is never called.

For OneWay method, in TCPMon, there are all soap messages, but no server 
reactions. The  server method is never called.

Have you an idea?

Thanks for your help.

Regards,

Elodie

Chamikara Jayalath wrote:

> Hi Elodie,
>
> I just fixed a bug in Sandesha2 not-in-order case is working properly now.
>
> Currently MTOM+RM will not work when InOrderInvocation property is set 
> to true. This is due to a bug in OM  ( 
> https://issues.apache.org/jira/browse/WSCOMMONS-52 ).
>
> But it perfectly works when InOrderInvocation is set to false. I just 
> added a test case to sandesha2 to demonstrate this (MTOMRMTest). 
> Currentlly the code in the test method is commented till the previous 
> bug is fixed. But it passes when InOrderInvation is disabled.
>
> Hope this will help you.
>
> Chamikara
>
>
>
> On 7/17/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi,
>
>     Can you think the problem is due to the tomcat version? Or the
>     sandesha2
>     version? I download jars and war on
>     http://people.apache.org/repository/sandesha2/
>     <http://people.apache.org/repository/sandesha2/>.
>
>     To configure the server,I have only change the axis2.xml. I can't
>     change
>     the module.xml because I intente to create a common server for all
>     independante client (WSRM only, MTOM only, MTOM-WSRM).
>
>     Sorry to insit.
>     Regards
>
>     Elodie
>
>
>     Mancinelli Elodie wrote:
>
>     > Hi Chamikara,
>     >
>     > I use tomcat in the server side and its version is the
>     > apache-tomcat-5.5.15.
>     > I join in attachment my client code.
>     >
>     > Thanks for your help.
>     >
>     > Regards
>     >
>     > Elodie
>     >
>     >
>     >
>     > Chamikara Jayalath wrote:
>     >
>     >> Hi Elodie,
>     >>
>     >> Are you using tomcat in the server side. If so which version?
>     >> Can u send your client code as well.
>     >>
>     >> Chamikara
>     >>
>     >>
>     >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
>     <ma...@bull.net>
>     >> <mailto:elodie.mancinelli@bull.net
>     <ma...@bull.net>>> wrote:
>     >>
>     >>     Hi all,
>     >>
>     >>     I want to realise an client-server which supports MTOM and
>     WSRM. I
>     >>     created separatly a client-server with MTOM and a client-server
>     >>     with WSRM.
>     >>
>     >>     My server has two methods: OneWay and RequestResponse.
>     >>
>     >>     - When I launch my client to test the RequestResponse method:
>     >>     In TCPMon, I see, the CreateSequence and the
>     >>     CreateSequenceResponse. My
>     >>     first message is sent and it is accpeted.
>     >>     But my client never receives the response and there is no
>     trace
>     >> on my
>     >>     server, the method seems not be executed.
>     >>
>     >>     - When I launch my client to test the OneWay method:
>     >>     In TCPMon, I see:
>     >>     - CreateSequence, CreateSequenceResponse
>     >>     - Three messages have send and three acknowledgments
>     >>     But no TerminateSequence.
>     >>     And on the server, there is an error:
>     >>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>     >>     exception
>     >>     java.lang.IllegalStateException: Impossible de créer une
>     >> sessionaprès
>     >>     que la réponse ait été envoyée
>     >>             at
>     >>
>     >>
>     org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>     >>             at
>     >>    
>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>     >>             at
>     >>
>     >>
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
>     >>
>     >>             at
>     >>     ........
>     >
>     >------------------------------------------------------------------------
>
>     >
>     >package fr.gouv.finances.dgme.presto;
>     >
>     >import java.io.File;
>     >import java.io.FileInputStream;
>     >import javax.activation.DataHandler;
>     >import javax.activation.FileDataSource;
>     >import javax.xml.stream.XMLInputFactory;
>     >import javax.xml.stream.XMLStreamReader;
>     >import org.apache.axiom.om.OMAbstractFactory;
>     >import org.apache.axiom.om.OMElement;
>     >import org.apache.axiom.om.OMFactory ;
>     >import org.apache.axiom.om.OMNamespace;
>     >import org.apache.axiom.om.OMText;
>     >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>     >import org.apache.axiom.soap.SOAP12Constants;
>     >import org.apache.axis2.Constants ;
>     >import org.apache.axis2.addressing.EndpointReference;
>     >import org.apache.axis2.client.Options;
>     >import org.apache.axis2.client.ServiceClient;
>     >import org.apache.axis2.client.async.AsyncResult;
>     >import org.apache.axis2.client.async.Callback;
>     >import org.apache.axis2.context.ConfigurationContext;
>     >import org.apache.axis2.context.ConfigurationContextFactory;
>     >import org.apache.axis2.context.MessageContextConstants ;
>     >import org.apache.sandesha2.client.SandeshaClientConstants;
>     >
>     >
>     >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
>     >
>     >       static String fileXMLName="test_data_in.xml";
>     >       static String fileNameAttach="fichier.txt";
>     >       private static EndpointReference targetEPR = new
>     EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
>     >       private static String targetEPRTcpmon ="
>     http://localhost:8070/axis2/services/PrestoSvc";
>     >       static String namespace="http://dgme.finances.gouv.fr/presto";
>     >       private static String CLIENT_REPO_PATH = "RepoClient";
>     >       private static String axis2_xml = CLIENT_REPO_PATH +
>     File.separator +"conf" + File.separator + "axis2.xml";
>     >
>     >       /**
>     >        * Call submitRequestReponse with attachment
>     >        *
>     >        */
>     >       public  void testSubmitRequestResponseWSRMAddressable()
>     throws Exception{
>     >
>     >               String nameMethod="submit";
>     >               ConfigurationContext configContext =
>     ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>     >               ServiceClient serviceClient = new ServiceClient
>     (configContext,null);
>     >
>     >               Options options=initOptions("submit",true);
>     >               serviceClient.setOptions(options);
>     >               String acksTo =
>     serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
>     >              
>     options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>     >
>     >               System.out.println("Envoi");
>     >               Callback callback1 = new TestCallback ("Callback 1");
>     >               serviceClient.sendReceiveNonBlocking
>     (getOMBlock("message1","sequence1",nameMethod),callback1);
>     >
>     >               while (!callback1.isComplete()) {
>     >                       System.out.println("boucle1");
>     >                       Thread.sleep(1000);
>     >               }
>     >
>     >               Callback callback2 = new TestCallback ("Callback 2");
>     >              
>     serviceClient.sendReceiveNonBlocking(getOMBlock("message2","sequence1",nameMethod),callback2);
>     >
>     >               while (!callback2.isComplete()) {
>     >                       System.out.println("boucle2");
>     >                       Thread.sleep(1000);
>     >               }
>     >
>     >              
>     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>     >               Callback callback3 = new TestCallback ("Callback 3");
>     >              
>     serviceClient.sendReceiveNonBlocking(getOMBlock("message3","sequence1",nameMethod),callback3);
>     >
>     >               while (!callback3.isComplete()) {
>     >                       System.out.println("boucle3");
>     >                       Thread.sleep(1000);
>     >               }
>     >               System.out.println("Fin du programme");
>     >               Thread.sleep(10000);
>     >               serviceClient.finalizeInvoke();
>     >
>     >       }
>     >
>     >
>     >       /**
>     >        * Call submitOneWay with attachment
>     >        *
>     >        */
>     >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
>     Exception {
>     >
>     >               String nameMethod="submitOneWay";
>     >               ConfigurationContext configContext =
>     ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>     >               ServiceClient sender = new ServiceClient
>     (configContext,null);
>     >
>     >               Options options=initOptions("submitOneWay", false);
>     >               sender.setOptions(options);
>     >
>     >               System.out.println("Envoi");
>     >
>     >              
>     sender.fireAndForget(getOMBlock("","ping1",nameMethod));
>     >              
>     sender.fireAndForget(getOMBlock("","ping2",nameMethod));
>     >
>     >              
>     options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>     >              
>     sender.fireAndForget(getOMBlock("","ping3",nameMethod));
>     >
>     >               Thread.sleep(10000);
>     >               System.out.println("\nResult :");
>     >               System.out.println("NO RETURN FOR WEBSERVICE");
>     >               sender.finalizeInvoke();
>     >
>     >       }
>     >
>     >       private OMElement getOMBlock(String text, String
>     sequenceKey, String nameMethod) throws Exception{
>     >
>     >               OMFactory fac = OMAbstractFactory.getOMFactory();
>     >               OMNamespace omNs =
>     fac.createOMNamespace(namespace, "m");
>     >               OMElement payload = getPayload(nameMethod);
>     >
>     >               // Attach text file
>     >                       OMElement filetxt=createAttachment(fac,omNs);
>     >                       payload.addChild(filetxt);
>     >
>     >               // Add sequence number
>     >//             OMElement sequenceElem =
>     fac.createOMElement("Sequence",omNs);
>     >//             if (nameMethod.equalsIgnoreCase("submit"))
>     sequenceElem.setText(sequenceKey + "-" + text);
>     >//             else sequenceElem.setText(sequenceKey);
>     >//             payload.addChild(sequenceElem);
>     >
>     >               System.out.println("Document sent : "+payload);
>     >
>     >               return payload;
>     >
>     >       }
>     >
>     >
>     >       static class TestCallback extends Callback {
>     >
>     >               String name = null;
>     >               public TestCallback (String name) {
>     >                       this.name <http://this.name> = name;
>     >               }
>     >
>     >               public void onComplete(AsyncResult result) {
>     >//                     Traitement du résultat et affichage
>     >                       System.out.println("\nResult :");
>     >                       System.out.println("Callback '" + name
>     +  "' got result:" + result.getResponseEnvelope());
>     >               }
>     >
>     >               public void onError (Exception e) {
>     >                       System.out.println("Error reported for
>     test call back");
>     >                       e.printStackTrace();
>     >               }
>     >       }
>     >
>     >       /**
>     >        * Define options
>     >        *
>     >        */
>     >       private static Options initOptions(String
>     nameMethod,boolean SeparateListener){
>     >
>     >               Options options = new Options ();
>     >               options.setTo(targetEPR);
>     >               options.setAction(nameMethod);
>     >              
>     options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>     >              
>     options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>     >               options.setUseSeparateListener(SeparateListener);
>     >              
>     options.setProperty(MessageContextConstants.TRANSPORT_URL,targetEPRTcpmon);
>     >              
>     options.setProperty(Constants.Configuration.ENABLE_MTOM,
>     Constants.VALUE_TRUE);
>     >
>     >               return options;
>     >       }
>     >
>     >       /**
>     >        * Get file
>     >        *
>     >        */
>     >       private OMElement getPayload(String operation) throws
>     Exception {
>     >               OMFactory fac = OMAbstractFactory.getOMFactory();
>     >               // Declaration du namespace
>     >               OMNamespace omNs =
>     fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
>     >               // Creation du sommet de l'arborescence
>     >               OMElement payload = fac.createOMElement(operation,
>     omNs);
>     >
>     >               // Lecture du fichier a recuperer
>     >               XMLStreamReader parser =
>     XMLInputFactory.newInstance().createXMLStreamReader(new
>     FileInputStream("test_data_in.xml"));
>     >               // Construction de l'element
>     >               StAXOMBuilder builder = new StAXOMBuilder(fac,
>     parser);
>     >               // Intergration dans l arborescence
>     >               payload.addChild(builder.getDocumentElement());
>     >
>     >               return payload;
>     >       }
>     >
>     >       /**
>     >        * Method which create attachment
>     >        *
>     >        */
>     >       private static OMElement createAttachment(OMFactory fac,
>     OMNamespace omNs) throws Exception{
>     >
>     >               OMElement attach = null;
>     >
>     >               // Creation du noeud
>     >               attach = fac.createOMElement("attachment", omNs);
>     >               // Lecteure de ce fichier
>     >               File fileTxt = new File(fileNameAttach);
>     >               FileDataSource dataSource = new
>     FileDataSource(fileTxt);
>     >               // Transformation en données binaires
>     >               DataHandler expectedDH = new DataHandler(dataSource);
>     >               OMText textData = fac.createOMText(expectedDH, true);
>     >               // Ajout au message soap
>     >               attach.addChild(textData);
>     >
>     >               return attach;
>     >       }
>     >
>     >}
>     >
>     >
>     >
>     >------------------------------------------------------------------------
>     >
>     >---------------------------------------------------------------------
>     >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>     >
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

I just fixed a bug in Sandesha2 not-in-order case is working properly now.

Currently MTOM+RM will not work when InOrderInvocation property is set to
true. This is due to a bug in OM  (
https://issues.apache.org/jira/browse/WSCOMMONS-52 ).

But it perfectly works when InOrderInvocation is set to false. I just added
a test case to sandesha2 to demonstrate this (MTOMRMTest). Currentlly the
code in the test method is commented till the previous bug is fixed. But it
passes when InOrderInvation is disabled.

Hope this will help you.

Chamikara



On 7/17/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi,
>
> Can you think the problem is due to the tomcat version? Or the sandesha2
> version? I download jars and war on
> http://people.apache.org/repository/sandesha2/.
>
> To configure the server,I have only change the axis2.xml. I can't change
> the module.xml because I intente to create a common server for all
> independante client (WSRM only, MTOM only, MTOM-WSRM).
>
> Sorry to insit.
> Regards
>
> Elodie
>
>
> Mancinelli Elodie wrote:
>
> > Hi Chamikara,
> >
> > I use tomcat in the server side and its version is the
> > apache-tomcat-5.5.15.
> > I join in attachment my client code.
> >
> > Thanks for your help.
> >
> > Regards
> >
> > Elodie
> >
> >
> >
> > Chamikara Jayalath wrote:
> >
> >> Hi Elodie,
> >>
> >> Are you using tomcat in the server side. If so which version?
> >> Can u send your client code as well.
> >>
> >> Chamikara
> >>
> >>
> >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> >> <ma...@bull.net>> wrote:
> >>
> >>     Hi all,
> >>
> >>     I want to realise an client-server which supports MTOM and WSRM. I
> >>     created separatly a client-server with MTOM and a client-server
> >>     with WSRM.
> >>
> >>     My server has two methods: OneWay and RequestResponse.
> >>
> >>     - When I launch my client to test the RequestResponse method:
> >>     In TCPMon, I see, the CreateSequence and the
> >>     CreateSequenceResponse. My
> >>     first message is sent and it is accpeted.
> >>     But my client never receives the response and there is no trace
> >> on my
> >>     server, the method seems not be executed.
> >>
> >>     - When I launch my client to test the OneWay method:
> >>     In TCPMon, I see:
> >>     - CreateSequence, CreateSequenceResponse
> >>     - Three messages have send and three acknowledgments
> >>     But no TerminateSequence.
> >>     And on the server, there is an error:
> >>     - "Servlet.service()" pour la servlet AxisServlet a généré une
> >>     exception
> >>     java.lang.IllegalStateException: Impossible de créer une
> >> sessionaprès
> >>     que la réponse ait été envoyée
> >>             at
> >>
> >> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
> >>             at
> >>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
> >>             at
> >>
> >> org.apache.catalina.connector.RequestFacade.getSession(
> RequestFacade.java:831)
> >>
> >>             at
> >>     ........
> >
> >------------------------------------------------------------------------
> >
> >package fr.gouv.finances.dgme.presto;
> >
> >import java.io.File;
> >import java.io.FileInputStream;
> >import javax.activation.DataHandler;
> >import javax.activation.FileDataSource;
> >import javax.xml.stream.XMLInputFactory;
> >import javax.xml.stream.XMLStreamReader;
> >import org.apache.axiom.om.OMAbstractFactory;
> >import org.apache.axiom.om.OMElement;
> >import org.apache.axiom.om.OMFactory;
> >import org.apache.axiom.om.OMNamespace;
> >import org.apache.axiom.om.OMText;
> >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
> >import org.apache.axiom.soap.SOAP12Constants;
> >import org.apache.axis2.Constants;
> >import org.apache.axis2.addressing.EndpointReference;
> >import org.apache.axis2.client.Options;
> >import org.apache.axis2.client.ServiceClient;
> >import org.apache.axis2.client.async.AsyncResult;
> >import org.apache.axis2.client.async.Callback;
> >import org.apache.axis2.context.ConfigurationContext;
> >import org.apache.axis2.context.ConfigurationContextFactory;
> >import org.apache.axis2.context.MessageContextConstants;
> >import org.apache.sandesha2.client.SandeshaClientConstants;
> >
> >
> >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
> >
> >       static String fileXMLName="test_data_in.xml";
> >       static String fileNameAttach="fichier.txt";
> >       private static EndpointReference targetEPR = new
> EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
> >       private static String targetEPRTcpmon ="
> http://localhost:8070/axis2/services/PrestoSvc";
> >       static String namespace="http://dgme.finances.gouv.fr/presto";
> >       private static String CLIENT_REPO_PATH = "RepoClient";
> >       private static String axis2_xml = CLIENT_REPO_PATH +
> File.separator +"conf" + File.separator + "axis2.xml";
> >
> >       /**
> >        * Call submitRequestReponse with attachment
> >        *
> >        */
> >       public  void testSubmitRequestResponseWSRMAddressable() throws
> Exception{
> >
> >               String nameMethod="submit";
> >               ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >               ServiceClient serviceClient = new ServiceClient
> (configContext,null);
> >
> >               Options options=initOptions("submit",true);
> >               serviceClient.setOptions(options);
> >               String acksTo = serviceClient.getMyEPR(
> Constants.TRANSPORT_HTTP).getAddress();
> >               options.setProperty(SandeshaClientConstants.AcksTo
> ,acksTo);
> >
> >               System.out.println("Envoi");
> >               Callback callback1 = new TestCallback ("Callback 1");
> >               serviceClient.sendReceiveNonBlocking(getOMBlock("message1","sequence1",nameMethod),callback1);
> >
> >               while (!callback1.isComplete()) {
> >                       System.out.println("boucle1");
> >                       Thread.sleep(1000);
> >               }
> >
> >               Callback callback2 = new TestCallback ("Callback 2");
> >               serviceClient.sendReceiveNonBlocking
> (getOMBlock("message2","sequence1",nameMethod),callback2);
> >
> >               while (!callback2.isComplete()) {
> >                       System.out.println("boucle2");
> >                       Thread.sleep(1000);
> >               }
> >
> >               options.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
> >               Callback callback3 = new TestCallback ("Callback 3");
> >               serviceClient.sendReceiveNonBlocking
> (getOMBlock("message3","sequence1",nameMethod),callback3);
> >
> >               while (!callback3.isComplete()) {
> >                       System.out.println("boucle3");
> >                       Thread.sleep(1000);
> >               }
> >               System.out.println("Fin du programme");
> >               Thread.sleep(10000);
> >               serviceClient.finalizeInvoke();
> >
> >       }
> >
> >
> >       /**
> >        * Call submitOneWay with attachment
> >        *
> >        */
> >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
> Exception {
> >
> >               String nameMethod="submitOneWay";
> >               ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >               ServiceClient sender = new ServiceClient
> (configContext,null);
> >
> >               Options options=initOptions("submitOneWay", false);
> >               sender.setOptions(options);
> >
> >               System.out.println("Envoi");
> >
> >               sender.fireAndForget(getOMBlock("","ping1",nameMethod));
> >               sender.fireAndForget(getOMBlock("","ping2",nameMethod));
> >
> >               options.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
> >               sender.fireAndForget(getOMBlock("","ping3",nameMethod));
> >
> >               Thread.sleep(10000);
> >               System.out.println("\nResult :");
> >               System.out.println("NO RETURN FOR WEBSERVICE");
> >               sender.finalizeInvoke();
> >
> >       }
> >
> >       private OMElement getOMBlock(String text, String sequenceKey,
> String nameMethod) throws Exception{
> >
> >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >               OMNamespace omNs = fac.createOMNamespace(namespace, "m");
> >               OMElement payload = getPayload(nameMethod);
> >
> >               // Attach text file
> >                       OMElement filetxt=createAttachment(fac,omNs);
> >                       payload.addChild(filetxt);
> >
> >               // Add sequence number
> >//             OMElement sequenceElem = fac.createOMElement
> ("Sequence",omNs);
> >//             if (nameMethod.equalsIgnoreCase("submit"))
> sequenceElem.setText(sequenceKey + "-" + text);
> >//             else sequenceElem.setText(sequenceKey);
> >//             payload.addChild(sequenceElem);
> >
> >               System.out.println("Document sent : "+payload);
> >
> >               return payload;
> >
> >       }
> >
> >
> >       static class TestCallback extends Callback {
> >
> >               String name = null;
> >               public TestCallback (String name) {
> >                       this.name = name;
> >               }
> >
> >               public void onComplete(AsyncResult result) {
> >//                     Traitement du résultat et affichage
> >                       System.out.println("\nResult :");
> >                       System.out.println("Callback '" + name +  "' got
> result:" + result.getResponseEnvelope());
> >               }
> >
> >               public void onError (Exception e) {
> >                       System.out.println("Error reported for test call
> back");
> >                       e.printStackTrace();
> >               }
> >       }
> >
> >       /**
> >        * Define options
> >        *
> >        */
> >       private static Options initOptions(String nameMethod,boolean
> SeparateListener){
> >
> >               Options options = new Options ();
> >               options.setTo(targetEPR);
> >               options.setAction(nameMethod);
> >               options.setSoapVersionURI(
> SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> >               options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >               options.setUseSeparateListener(SeparateListener);
> >               options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> >               options.setProperty(Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE);
> >
> >               return options;
> >       }
> >
> >       /**
> >        * Get file
> >        *
> >        */
> >       private OMElement getPayload(String operation) throws Exception {
> >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >               // Declaration du namespace
> >               OMNamespace omNs = fac.createOMNamespace("
> http://dgme.finances.gouv.fr/presto", "m");
> >               // Creation du sommet de l'arborescence
> >               OMElement payload = fac.createOMElement(operation, omNs);
> >
> >               // Lecture du fichier a recuperer
> >               XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new
> FileInputStream("test_data_in.xml"));
> >               // Construction de l'element
> >               StAXOMBuilder builder = new StAXOMBuilder(fac, parser);
> >               // Intergration dans l arborescence
> >               payload.addChild(builder.getDocumentElement());
> >
> >               return payload;
> >       }
> >
> >       /**
> >        * Method which create attachment
> >        *
> >        */
> >       private static OMElement createAttachment(OMFactory fac,
> OMNamespace omNs) throws Exception{
> >
> >               OMElement attach = null;
> >
> >               // Creation du noeud
> >               attach = fac.createOMElement("attachment", omNs);
> >               // Lecteure de ce fichier
> >               File fileTxt = new File(fileNameAttach);
> >               FileDataSource dataSource = new FileDataSource(fileTxt);
> >               // Transformation en données binaires
> >               DataHandler expectedDH = new DataHandler(dataSource);
> >               OMText textData = fac.createOMText(expectedDH, true);
> >               // Ajout au message soap
> >               attach.addChild(textData);
> >
> >               return attach;
> >       }
> >
> >}
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

I just fixed a bug in Sandesha2 not-in-order case is working properly now.

Currently MTOM+RM will not work when InOrderInvocation property is set to
true. This is due to a bug in OM  (
https://issues.apache.org/jira/browse/WSCOMMONS-52 ).

But it perfectly works when InOrderInvocation is set to false. I just added
a test case to sandesha2 to demonstrate this (MTOMRMTest). Currentlly the
code in the test method is commented till the previous bug is fixed. But it
passes when InOrderInvation is disabled.

Hope this will help you.

Chamikara



On 7/17/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi,
>
> Can you think the problem is due to the tomcat version? Or the sandesha2
> version? I download jars and war on
> http://people.apache.org/repository/sandesha2/.
>
> To configure the server,I have only change the axis2.xml. I can't change
> the module.xml because I intente to create a common server for all
> independante client (WSRM only, MTOM only, MTOM-WSRM).
>
> Sorry to insit.
> Regards
>
> Elodie
>
>
> Mancinelli Elodie wrote:
>
> > Hi Chamikara,
> >
> > I use tomcat in the server side and its version is the
> > apache-tomcat-5.5.15.
> > I join in attachment my client code.
> >
> > Thanks for your help.
> >
> > Regards
> >
> > Elodie
> >
> >
> >
> > Chamikara Jayalath wrote:
> >
> >> Hi Elodie,
> >>
> >> Are you using tomcat in the server side. If so which version?
> >> Can u send your client code as well.
> >>
> >> Chamikara
> >>
> >>
> >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> >> <ma...@bull.net>> wrote:
> >>
> >>     Hi all,
> >>
> >>     I want to realise an client-server which supports MTOM and WSRM. I
> >>     created separatly a client-server with MTOM and a client-server
> >>     with WSRM.
> >>
> >>     My server has two methods: OneWay and RequestResponse.
> >>
> >>     - When I launch my client to test the RequestResponse method:
> >>     In TCPMon, I see, the CreateSequence and the
> >>     CreateSequenceResponse. My
> >>     first message is sent and it is accpeted.
> >>     But my client never receives the response and there is no trace
> >> on my
> >>     server, the method seems not be executed.
> >>
> >>     - When I launch my client to test the OneWay method:
> >>     In TCPMon, I see:
> >>     - CreateSequence, CreateSequenceResponse
> >>     - Three messages have send and three acknowledgments
> >>     But no TerminateSequence.
> >>     And on the server, there is an error:
> >>     - "Servlet.service()" pour la servlet AxisServlet a généré une
> >>     exception
> >>     java.lang.IllegalStateException: Impossible de créer une
> >> sessionaprès
> >>     que la réponse ait été envoyée
> >>             at
> >>
> >> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
> >>             at
> >>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
> >>             at
> >>
> >> org.apache.catalina.connector.RequestFacade.getSession(
> RequestFacade.java:831)
> >>
> >>             at
> >>     ........
> >
> >------------------------------------------------------------------------
> >
> >package fr.gouv.finances.dgme.presto;
> >
> >import java.io.File;
> >import java.io.FileInputStream;
> >import javax.activation.DataHandler;
> >import javax.activation.FileDataSource;
> >import javax.xml.stream.XMLInputFactory;
> >import javax.xml.stream.XMLStreamReader;
> >import org.apache.axiom.om.OMAbstractFactory;
> >import org.apache.axiom.om.OMElement;
> >import org.apache.axiom.om.OMFactory;
> >import org.apache.axiom.om.OMNamespace;
> >import org.apache.axiom.om.OMText;
> >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
> >import org.apache.axiom.soap.SOAP12Constants;
> >import org.apache.axis2.Constants;
> >import org.apache.axis2.addressing.EndpointReference;
> >import org.apache.axis2.client.Options;
> >import org.apache.axis2.client.ServiceClient;
> >import org.apache.axis2.client.async.AsyncResult;
> >import org.apache.axis2.client.async.Callback;
> >import org.apache.axis2.context.ConfigurationContext;
> >import org.apache.axis2.context.ConfigurationContextFactory;
> >import org.apache.axis2.context.MessageContextConstants;
> >import org.apache.sandesha2.client.SandeshaClientConstants;
> >
> >
> >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
> >
> >       static String fileXMLName="test_data_in.xml";
> >       static String fileNameAttach="fichier.txt";
> >       private static EndpointReference targetEPR = new
> EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
> >       private static String targetEPRTcpmon ="
> http://localhost:8070/axis2/services/PrestoSvc";
> >       static String namespace="http://dgme.finances.gouv.fr/presto";
> >       private static String CLIENT_REPO_PATH = "RepoClient";
> >       private static String axis2_xml = CLIENT_REPO_PATH +
> File.separator +"conf" + File.separator + "axis2.xml";
> >
> >       /**
> >        * Call submitRequestReponse with attachment
> >        *
> >        */
> >       public  void testSubmitRequestResponseWSRMAddressable() throws
> Exception{
> >
> >               String nameMethod="submit";
> >               ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >               ServiceClient serviceClient = new ServiceClient
> (configContext,null);
> >
> >               Options options=initOptions("submit",true);
> >               serviceClient.setOptions(options);
> >               String acksTo = serviceClient.getMyEPR(
> Constants.TRANSPORT_HTTP).getAddress();
> >               options.setProperty(SandeshaClientConstants.AcksTo
> ,acksTo);
> >
> >               System.out.println("Envoi");
> >               Callback callback1 = new TestCallback ("Callback 1");
> >               serviceClient.sendReceiveNonBlocking(getOMBlock("message1","sequence1",nameMethod),callback1);
> >
> >               while (!callback1.isComplete()) {
> >                       System.out.println("boucle1");
> >                       Thread.sleep(1000);
> >               }
> >
> >               Callback callback2 = new TestCallback ("Callback 2");
> >               serviceClient.sendReceiveNonBlocking
> (getOMBlock("message2","sequence1",nameMethod),callback2);
> >
> >               while (!callback2.isComplete()) {
> >                       System.out.println("boucle2");
> >                       Thread.sleep(1000);
> >               }
> >
> >               options.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
> >               Callback callback3 = new TestCallback ("Callback 3");
> >               serviceClient.sendReceiveNonBlocking
> (getOMBlock("message3","sequence1",nameMethod),callback3);
> >
> >               while (!callback3.isComplete()) {
> >                       System.out.println("boucle3");
> >                       Thread.sleep(1000);
> >               }
> >               System.out.println("Fin du programme");
> >               Thread.sleep(10000);
> >               serviceClient.finalizeInvoke();
> >
> >       }
> >
> >
> >       /**
> >        * Call submitOneWay with attachment
> >        *
> >        */
> >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
> Exception {
> >
> >               String nameMethod="submitOneWay";
> >               ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >               ServiceClient sender = new ServiceClient
> (configContext,null);
> >
> >               Options options=initOptions("submitOneWay", false);
> >               sender.setOptions(options);
> >
> >               System.out.println("Envoi");
> >
> >               sender.fireAndForget(getOMBlock("","ping1",nameMethod));
> >               sender.fireAndForget(getOMBlock("","ping2",nameMethod));
> >
> >               options.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
> >               sender.fireAndForget(getOMBlock("","ping3",nameMethod));
> >
> >               Thread.sleep(10000);
> >               System.out.println("\nResult :");
> >               System.out.println("NO RETURN FOR WEBSERVICE");
> >               sender.finalizeInvoke();
> >
> >       }
> >
> >       private OMElement getOMBlock(String text, String sequenceKey,
> String nameMethod) throws Exception{
> >
> >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >               OMNamespace omNs = fac.createOMNamespace(namespace, "m");
> >               OMElement payload = getPayload(nameMethod);
> >
> >               // Attach text file
> >                       OMElement filetxt=createAttachment(fac,omNs);
> >                       payload.addChild(filetxt);
> >
> >               // Add sequence number
> >//             OMElement sequenceElem = fac.createOMElement
> ("Sequence",omNs);
> >//             if (nameMethod.equalsIgnoreCase("submit"))
> sequenceElem.setText(sequenceKey + "-" + text);
> >//             else sequenceElem.setText(sequenceKey);
> >//             payload.addChild(sequenceElem);
> >
> >               System.out.println("Document sent : "+payload);
> >
> >               return payload;
> >
> >       }
> >
> >
> >       static class TestCallback extends Callback {
> >
> >               String name = null;
> >               public TestCallback (String name) {
> >                       this.name = name;
> >               }
> >
> >               public void onComplete(AsyncResult result) {
> >//                     Traitement du résultat et affichage
> >                       System.out.println("\nResult :");
> >                       System.out.println("Callback '" + name +  "' got
> result:" + result.getResponseEnvelope());
> >               }
> >
> >               public void onError (Exception e) {
> >                       System.out.println("Error reported for test call
> back");
> >                       e.printStackTrace();
> >               }
> >       }
> >
> >       /**
> >        * Define options
> >        *
> >        */
> >       private static Options initOptions(String nameMethod,boolean
> SeparateListener){
> >
> >               Options options = new Options ();
> >               options.setTo(targetEPR);
> >               options.setAction(nameMethod);
> >               options.setSoapVersionURI(
> SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> >               options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >               options.setUseSeparateListener(SeparateListener);
> >               options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> >               options.setProperty(Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE);
> >
> >               return options;
> >       }
> >
> >       /**
> >        * Get file
> >        *
> >        */
> >       private OMElement getPayload(String operation) throws Exception {
> >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >               // Declaration du namespace
> >               OMNamespace omNs = fac.createOMNamespace("
> http://dgme.finances.gouv.fr/presto", "m");
> >               // Creation du sommet de l'arborescence
> >               OMElement payload = fac.createOMElement(operation, omNs);
> >
> >               // Lecture du fichier a recuperer
> >               XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new
> FileInputStream("test_data_in.xml"));
> >               // Construction de l'element
> >               StAXOMBuilder builder = new StAXOMBuilder(fac, parser);
> >               // Intergration dans l arborescence
> >               payload.addChild(builder.getDocumentElement());
> >
> >               return payload;
> >       }
> >
> >       /**
> >        * Method which create attachment
> >        *
> >        */
> >       private static OMElement createAttachment(OMFactory fac,
> OMNamespace omNs) throws Exception{
> >
> >               OMElement attach = null;
> >
> >               // Creation du noeud
> >               attach = fac.createOMElement("attachment", omNs);
> >               // Lecteure de ce fichier
> >               File fileTxt = new File(fileNameAttach);
> >               FileDataSource dataSource = new FileDataSource(fileTxt);
> >               // Transformation en données binaires
> >               DataHandler expectedDH = new DataHandler(dataSource);
> >               OMText textData = fac.createOMText(expectedDH, true);
> >               // Ajout au message soap
> >               attach.addChild(textData);
> >
> >               return attach;
> >       }
> >
> >}
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

I just fixed a bug in Sandesha2 not-in-order case is working properly now.

Currently MTOM+RM will not work when InOrderInvocation property is set to
true. This is due to a bug in OM  (
https://issues.apache.org/jira/browse/WSCOMMONS-52 ).

But it perfectly works when InOrderInvocation is set to false. I just added
a test case to sandesha2 to demonstrate this (MTOMRMTest). Currentlly the
code in the test method is commented till the previous bug is fixed. But it
passes when InOrderInvation is disabled.

Hope this will help you.

Chamikara



On 7/17/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi,
>
> Can you think the problem is due to the tomcat version? Or the sandesha2
> version? I download jars and war on
> http://people.apache.org/repository/sandesha2/.
>
> To configure the server,I have only change the axis2.xml. I can't change
> the module.xml because I intente to create a common server for all
> independante client (WSRM only, MTOM only, MTOM-WSRM).
>
> Sorry to insit.
> Regards
>
> Elodie
>
>
> Mancinelli Elodie wrote:
>
> > Hi Chamikara,
> >
> > I use tomcat in the server side and its version is the
> > apache-tomcat-5.5.15.
> > I join in attachment my client code.
> >
> > Thanks for your help.
> >
> > Regards
> >
> > Elodie
> >
> >
> >
> > Chamikara Jayalath wrote:
> >
> >> Hi Elodie,
> >>
> >> Are you using tomcat in the server side. If so which version?
> >> Can u send your client code as well.
> >>
> >> Chamikara
> >>
> >>
> >> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net
> >> <ma...@bull.net>> wrote:
> >>
> >>     Hi all,
> >>
> >>     I want to realise an client-server which supports MTOM and WSRM. I
> >>     created separatly a client-server with MTOM and a client-server
> >>     with WSRM.
> >>
> >>     My server has two methods: OneWay and RequestResponse.
> >>
> >>     - When I launch my client to test the RequestResponse method:
> >>     In TCPMon, I see, the CreateSequence and the
> >>     CreateSequenceResponse. My
> >>     first message is sent and it is accpeted.
> >>     But my client never receives the response and there is no trace
> >> on my
> >>     server, the method seems not be executed.
> >>
> >>     - When I launch my client to test the OneWay method:
> >>     In TCPMon, I see:
> >>     - CreateSequence, CreateSequenceResponse
> >>     - Three messages have send and three acknowledgments
> >>     But no TerminateSequence.
> >>     And on the server, there is an error:
> >>     - "Servlet.service()" pour la servlet AxisServlet a généré une
> >>     exception
> >>     java.lang.IllegalStateException: Impossible de créer une
> >> sessionaprès
> >>     que la réponse ait été envoyée
> >>             at
> >>
> >> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
> >>             at
> >>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
> >>             at
> >>
> >> org.apache.catalina.connector.RequestFacade.getSession(
> RequestFacade.java:831)
> >>
> >>             at
> >>     ........
> >
> >------------------------------------------------------------------------
> >
> >package fr.gouv.finances.dgme.presto;
> >
> >import java.io.File;
> >import java.io.FileInputStream;
> >import javax.activation.DataHandler;
> >import javax.activation.FileDataSource;
> >import javax.xml.stream.XMLInputFactory;
> >import javax.xml.stream.XMLStreamReader;
> >import org.apache.axiom.om.OMAbstractFactory;
> >import org.apache.axiom.om.OMElement;
> >import org.apache.axiom.om.OMFactory;
> >import org.apache.axiom.om.OMNamespace;
> >import org.apache.axiom.om.OMText;
> >import org.apache.axiom.om.impl.builder.StAXOMBuilder;
> >import org.apache.axiom.soap.SOAP12Constants;
> >import org.apache.axis2.Constants;
> >import org.apache.axis2.addressing.EndpointReference;
> >import org.apache.axis2.client.Options;
> >import org.apache.axis2.client.ServiceClient;
> >import org.apache.axis2.client.async.AsyncResult;
> >import org.apache.axis2.client.async.Callback;
> >import org.apache.axis2.context.ConfigurationContext;
> >import org.apache.axis2.context.ConfigurationContextFactory;
> >import org.apache.axis2.context.MessageContextConstants;
> >import org.apache.sandesha2.client.SandeshaClientConstants;
> >
> >
> >public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
> >
> >       static String fileXMLName="test_data_in.xml";
> >       static String fileNameAttach="fichier.txt";
> >       private static EndpointReference targetEPR = new
> EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
> >       private static String targetEPRTcpmon ="
> http://localhost:8070/axis2/services/PrestoSvc";
> >       static String namespace="http://dgme.finances.gouv.fr/presto";
> >       private static String CLIENT_REPO_PATH = "RepoClient";
> >       private static String axis2_xml = CLIENT_REPO_PATH +
> File.separator +"conf" + File.separator + "axis2.xml";
> >
> >       /**
> >        * Call submitRequestReponse with attachment
> >        *
> >        */
> >       public  void testSubmitRequestResponseWSRMAddressable() throws
> Exception{
> >
> >               String nameMethod="submit";
> >               ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >               ServiceClient serviceClient = new ServiceClient
> (configContext,null);
> >
> >               Options options=initOptions("submit",true);
> >               serviceClient.setOptions(options);
> >               String acksTo = serviceClient.getMyEPR(
> Constants.TRANSPORT_HTTP).getAddress();
> >               options.setProperty(SandeshaClientConstants.AcksTo
> ,acksTo);
> >
> >               System.out.println("Envoi");
> >               Callback callback1 = new TestCallback ("Callback 1");
> >               serviceClient.sendReceiveNonBlocking(getOMBlock("message1","sequence1",nameMethod),callback1);
> >
> >               while (!callback1.isComplete()) {
> >                       System.out.println("boucle1");
> >                       Thread.sleep(1000);
> >               }
> >
> >               Callback callback2 = new TestCallback ("Callback 2");
> >               serviceClient.sendReceiveNonBlocking
> (getOMBlock("message2","sequence1",nameMethod),callback2);
> >
> >               while (!callback2.isComplete()) {
> >                       System.out.println("boucle2");
> >                       Thread.sleep(1000);
> >               }
> >
> >               options.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
> >               Callback callback3 = new TestCallback ("Callback 3");
> >               serviceClient.sendReceiveNonBlocking
> (getOMBlock("message3","sequence1",nameMethod),callback3);
> >
> >               while (!callback3.isComplete()) {
> >                       System.out.println("boucle3");
> >                       Thread.sleep(1000);
> >               }
> >               System.out.println("Fin du programme");
> >               Thread.sleep(10000);
> >               serviceClient.finalizeInvoke();
> >
> >       }
> >
> >
> >       /**
> >        * Call submitOneWay with attachment
> >        *
> >        */
> >       public  void testSubmitOneWayWSRMEmetteurAnonyme() throws
> Exception {
> >
> >               String nameMethod="submitOneWay";
> >               ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem
> (CLIENT_REPO_PATH,axis2_xml);
> >               ServiceClient sender = new ServiceClient
> (configContext,null);
> >
> >               Options options=initOptions("submitOneWay", false);
> >               sender.setOptions(options);
> >
> >               System.out.println("Envoi");
> >
> >               sender.fireAndForget(getOMBlock("","ping1",nameMethod));
> >               sender.fireAndForget(getOMBlock("","ping2",nameMethod));
> >
> >               options.setProperty(SandeshaClientConstants.LAST_MESSAGE,
> "true");
> >               sender.fireAndForget(getOMBlock("","ping3",nameMethod));
> >
> >               Thread.sleep(10000);
> >               System.out.println("\nResult :");
> >               System.out.println("NO RETURN FOR WEBSERVICE");
> >               sender.finalizeInvoke();
> >
> >       }
> >
> >       private OMElement getOMBlock(String text, String sequenceKey,
> String nameMethod) throws Exception{
> >
> >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >               OMNamespace omNs = fac.createOMNamespace(namespace, "m");
> >               OMElement payload = getPayload(nameMethod);
> >
> >               // Attach text file
> >                       OMElement filetxt=createAttachment(fac,omNs);
> >                       payload.addChild(filetxt);
> >
> >               // Add sequence number
> >//             OMElement sequenceElem = fac.createOMElement
> ("Sequence",omNs);
> >//             if (nameMethod.equalsIgnoreCase("submit"))
> sequenceElem.setText(sequenceKey + "-" + text);
> >//             else sequenceElem.setText(sequenceKey);
> >//             payload.addChild(sequenceElem);
> >
> >               System.out.println("Document sent : "+payload);
> >
> >               return payload;
> >
> >       }
> >
> >
> >       static class TestCallback extends Callback {
> >
> >               String name = null;
> >               public TestCallback (String name) {
> >                       this.name = name;
> >               }
> >
> >               public void onComplete(AsyncResult result) {
> >//                     Traitement du résultat et affichage
> >                       System.out.println("\nResult :");
> >                       System.out.println("Callback '" + name +  "' got
> result:" + result.getResponseEnvelope());
> >               }
> >
> >               public void onError (Exception e) {
> >                       System.out.println("Error reported for test call
> back");
> >                       e.printStackTrace();
> >               }
> >       }
> >
> >       /**
> >        * Define options
> >        *
> >        */
> >       private static Options initOptions(String nameMethod,boolean
> SeparateListener){
> >
> >               Options options = new Options ();
> >               options.setTo(targetEPR);
> >               options.setAction(nameMethod);
> >               options.setSoapVersionURI(
> SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> >               options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> >               options.setUseSeparateListener(SeparateListener);
> >               options.setProperty(MessageContextConstants.TRANSPORT_URL
> ,targetEPRTcpmon);
> >               options.setProperty(Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE);
> >
> >               return options;
> >       }
> >
> >       /**
> >        * Get file
> >        *
> >        */
> >       private OMElement getPayload(String operation) throws Exception {
> >               OMFactory fac = OMAbstractFactory.getOMFactory();
> >               // Declaration du namespace
> >               OMNamespace omNs = fac.createOMNamespace("
> http://dgme.finances.gouv.fr/presto", "m");
> >               // Creation du sommet de l'arborescence
> >               OMElement payload = fac.createOMElement(operation, omNs);
> >
> >               // Lecture du fichier a recuperer
> >               XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new
> FileInputStream("test_data_in.xml"));
> >               // Construction de l'element
> >               StAXOMBuilder builder = new StAXOMBuilder(fac, parser);
> >               // Intergration dans l arborescence
> >               payload.addChild(builder.getDocumentElement());
> >
> >               return payload;
> >       }
> >
> >       /**
> >        * Method which create attachment
> >        *
> >        */
> >       private static OMElement createAttachment(OMFactory fac,
> OMNamespace omNs) throws Exception{
> >
> >               OMElement attach = null;
> >
> >               // Creation du noeud
> >               attach = fac.createOMElement("attachment", omNs);
> >               // Lecteure de ce fichier
> >               File fileTxt = new File(fileNameAttach);
> >               FileDataSource dataSource = new FileDataSource(fileTxt);
> >               // Transformation en données binaires
> >               DataHandler expectedDH = new DataHandler(dataSource);
> >               OMText textData = fac.createOMText(expectedDH, true);
> >               // Ajout au message soap
> >               attach.addChild(textData);
> >
> >               return attach;
> >       }
> >
> >}
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: sandesha-dev-help@ws.apache.org
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi,

Can you think the problem is due to the tomcat version? Or the sandesha2 
version? I download jars and war on 
http://people.apache.org/repository/sandesha2/.

To configure the server,I have only change the axis2.xml. I can't change 
the module.xml because I intente to create a common server for all 
independante client (WSRM only, MTOM only, MTOM-WSRM).

Sorry to insit.
Regards

Elodie


Mancinelli Elodie wrote:

> Hi Chamikara,
>
> I use tomcat in the server side and its version is the 
> apache-tomcat-5.5.15.
> I join in attachment my client code.
>
> Thanks for your help.
>
> Regards
>
> Elodie
>
>
>
> Chamikara Jayalath wrote:
>
>> Hi Elodie,
>>
>> Are you using tomcat in the server side. If so which version?
>> Can u send your client code as well.
>>
>> Chamikara
>>
>>
>> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
>> <ma...@bull.net>> wrote:
>>
>>     Hi all,
>>
>>     I want to realise an client-server which supports MTOM and WSRM. I
>>     created separatly a client-server with MTOM and a client-server
>>     with WSRM.
>>
>>     My server has two methods: OneWay and RequestResponse.
>>
>>     - When I launch my client to test the RequestResponse method:
>>     In TCPMon, I see, the CreateSequence and the
>>     CreateSequenceResponse. My
>>     first message is sent and it is accpeted.
>>     But my client never receives the response and there is no trace 
>> on my
>>     server, the method seems not be executed.
>>
>>     - When I launch my client to test the OneWay method:
>>     In TCPMon, I see:
>>     - CreateSequence, CreateSequenceResponse
>>     - Three messages have send and three acknowledgments
>>     But no TerminateSequence.
>>     And on the server, there is an error:
>>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>>     exception
>>     java.lang.IllegalStateException: Impossible de créer une 
>> sessionaprès
>>     que la réponse ait été envoyée
>>             at
>>     
>> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>>             at
>>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>>             at
>>     
>> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831) 
>>
>>             at
>>     ........
>
>------------------------------------------------------------------------
>
>package fr.gouv.finances.dgme.presto;
>
>import java.io.File;
>import java.io.FileInputStream;
>import javax.activation.DataHandler;
>import javax.activation.FileDataSource;
>import javax.xml.stream.XMLInputFactory;
>import javax.xml.stream.XMLStreamReader;
>import org.apache.axiom.om.OMAbstractFactory;
>import org.apache.axiom.om.OMElement;
>import org.apache.axiom.om.OMFactory;
>import org.apache.axiom.om.OMNamespace;
>import org.apache.axiom.om.OMText;
>import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>import org.apache.axiom.soap.SOAP12Constants;
>import org.apache.axis2.Constants;
>import org.apache.axis2.addressing.EndpointReference;
>import org.apache.axis2.client.Options;
>import org.apache.axis2.client.ServiceClient;
>import org.apache.axis2.client.async.AsyncResult;
>import org.apache.axis2.client.async.Callback;
>import org.apache.axis2.context.ConfigurationContext;
>import org.apache.axis2.context.ConfigurationContextFactory;
>import org.apache.axis2.context.MessageContextConstants;
>import org.apache.sandesha2.client.SandeshaClientConstants;
>
>
>public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
>
>	static String fileXMLName="test_data_in.xml";
>	static String fileNameAttach="fichier.txt";
>	private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
>	private static String targetEPRTcpmon ="http://localhost:8070/axis2/services/PrestoSvc";
>	static String namespace="http://dgme.finances.gouv.fr/presto";
>	private static String CLIENT_REPO_PATH = "RepoClient";
>	private static String axis2_xml = CLIENT_REPO_PATH + File.separator +"conf" + File.separator + "axis2.xml";
>
>	/**
>	 * Call submitRequestReponse with attachment
>	 *
>	 */
>	public  void testSubmitRequestResponseWSRMAddressable() throws Exception{
>
>		String nameMethod="submit";
>		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>		ServiceClient serviceClient = new ServiceClient (configContext,null);
>
>		Options options=initOptions("submit",true);
>		serviceClient.setOptions(options);
>		String acksTo = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
>		options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>
>		System.out.println("Envoi");
>		Callback callback1 = new TestCallback ("Callback 1");
>		serviceClient.sendReceiveNonBlocking (getOMBlock("message1","sequence1",nameMethod),callback1);
>
>		while (!callback1.isComplete()) {
>			System.out.println("boucle1");
>			Thread.sleep(1000);
>		}
>
>		Callback callback2 = new TestCallback ("Callback 2");
>		serviceClient.sendReceiveNonBlocking(getOMBlock("message2","sequence1",nameMethod),callback2);
>
>		while (!callback2.isComplete()) {
>			System.out.println("boucle2");
>			Thread.sleep(1000);
>		}
>
>		options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>		Callback callback3 = new TestCallback ("Callback 3");
>		serviceClient.sendReceiveNonBlocking(getOMBlock("message3","sequence1",nameMethod),callback3);
>
>		while (!callback3.isComplete()) {
>			System.out.println("boucle3");
>			Thread.sleep(1000);
>		}
>		System.out.println("Fin du programme");
>		Thread.sleep(10000);
>		serviceClient.finalizeInvoke();
>
>	}
>
>	
>	/**
>	 * Call submitOneWay with attachment
>	 *
>	 */
>	public  void testSubmitOneWayWSRMEmetteurAnonyme() throws Exception {
>
>		String nameMethod="submitOneWay";
>		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>		ServiceClient sender = new ServiceClient (configContext,null);
>
>		Options options=initOptions("submitOneWay", false);
>		sender.setOptions(options);
>
>		System.out.println("Envoi");
>
>		sender.fireAndForget(getOMBlock("","ping1",nameMethod));
>		sender.fireAndForget(getOMBlock("","ping2",nameMethod));
>
>		options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>		sender.fireAndForget(getOMBlock("","ping3",nameMethod));
>
>		Thread.sleep(10000);
>		System.out.println("\nResult :");
>		System.out.println("NO RETURN FOR WEBSERVICE");
>		sender.finalizeInvoke();
>
>	}
>
>	private OMElement getOMBlock(String text, String sequenceKey, String nameMethod) throws Exception{
>
>		OMFactory fac = OMAbstractFactory.getOMFactory();
>		OMNamespace omNs = fac.createOMNamespace(namespace, "m");
>		OMElement payload = getPayload(nameMethod);
>
>		// Attach text file
>       		OMElement filetxt=createAttachment(fac,omNs);
>       		payload.addChild(filetxt);
>
>		// Add sequence number
>//		OMElement sequenceElem = fac.createOMElement("Sequence",omNs);
>//		if (nameMethod.equalsIgnoreCase("submit")) sequenceElem.setText(sequenceKey + "-" + text);
>//		else sequenceElem.setText(sequenceKey);
>//		payload.addChild(sequenceElem);
>
>		System.out.println("Document sent : "+payload);
>
>		return payload;
>
>	}
>
>
>	static class TestCallback extends Callback {
>
>		String name = null;
>		public TestCallback (String name) {
>			this.name = name;
>		}
>
>		public void onComplete(AsyncResult result) {
>//			Traitement du résultat et affichage
>			System.out.println("\nResult :");
>			System.out.println("Callback '" + name +  "' got result:" + result.getResponseEnvelope());
>		}
>
>		public void onError (Exception e) {
>			System.out.println("Error reported for test call back");
>			e.printStackTrace();
>		}
>	}
>
>	/**
>	 * Define options
>	 *
>	 */
>	private static Options initOptions(String nameMethod,boolean SeparateListener){
>
>		Options options = new Options ();
>		options.setTo(targetEPR);
>		options.setAction(nameMethod);
>		options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>		options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>		options.setUseSeparateListener(SeparateListener);
>		options.setProperty(MessageContextConstants.TRANSPORT_URL,targetEPRTcpmon);
>		options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
>
>		return options;
>	}
>
>	/**
>	 * Get file
>	 *
>	 */
>	private OMElement getPayload(String operation) throws Exception {
>		OMFactory fac = OMAbstractFactory.getOMFactory();
>		// Declaration du namespace
>		OMNamespace omNs = fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
>		// Creation du sommet de l'arborescence
>		OMElement payload = fac.createOMElement(operation, omNs);
>
>		// Lecture du fichier a recuperer
>		XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream("test_data_in.xml"));
>		// Construction de l'element
>		StAXOMBuilder builder = new StAXOMBuilder(fac, parser);
>		// Intergration dans l arborescence
>		payload.addChild(builder.getDocumentElement());
>
>		return payload;
>	}
>
>	/**
>	 * Method which create attachment
>	 *
>	 */
>	private static OMElement createAttachment(OMFactory fac, OMNamespace omNs) throws Exception{
>
>		OMElement attach = null;
>
>		// Creation du noeud
>		attach = fac.createOMElement("attachment", omNs);
>		// Lecteure de ce fichier
>		File fileTxt = new File(fileNameAttach);
>		FileDataSource dataSource = new FileDataSource(fileTxt);
>		// Transformation en données binaires
>		DataHandler expectedDH = new DataHandler(dataSource);
>		OMText textData = fac.createOMText(expectedDH, true);
>		// Ajout au message soap
>		attach.addChild(textData);
>
>		return attach;
>	}
>
>}
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi,

Can you think the problem is due to the tomcat version? Or the sandesha2 
version? I download jars and war on 
http://people.apache.org/repository/sandesha2/.

To configure the server,I have only change the axis2.xml. I can't change 
the module.xml because I intente to create a common server for all 
independante client (WSRM only, MTOM only, MTOM-WSRM).

Sorry to insit.
Regards

Elodie


Mancinelli Elodie wrote:

> Hi Chamikara,
>
> I use tomcat in the server side and its version is the 
> apache-tomcat-5.5.15.
> I join in attachment my client code.
>
> Thanks for your help.
>
> Regards
>
> Elodie
>
>
>
> Chamikara Jayalath wrote:
>
>> Hi Elodie,
>>
>> Are you using tomcat in the server side. If so which version?
>> Can u send your client code as well.
>>
>> Chamikara
>>
>>
>> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
>> <ma...@bull.net>> wrote:
>>
>>     Hi all,
>>
>>     I want to realise an client-server which supports MTOM and WSRM. I
>>     created separatly a client-server with MTOM and a client-server
>>     with WSRM.
>>
>>     My server has two methods: OneWay and RequestResponse.
>>
>>     - When I launch my client to test the RequestResponse method:
>>     In TCPMon, I see, the CreateSequence and the
>>     CreateSequenceResponse. My
>>     first message is sent and it is accpeted.
>>     But my client never receives the response and there is no trace 
>> on my
>>     server, the method seems not be executed.
>>
>>     - When I launch my client to test the OneWay method:
>>     In TCPMon, I see:
>>     - CreateSequence, CreateSequenceResponse
>>     - Three messages have send and three acknowledgments
>>     But no TerminateSequence.
>>     And on the server, there is an error:
>>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>>     exception
>>     java.lang.IllegalStateException: Impossible de créer une 
>> sessionaprès
>>     que la réponse ait été envoyée
>>             at
>>     
>> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>>             at
>>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>>             at
>>     
>> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831) 
>>
>>             at
>>     ........
>
>------------------------------------------------------------------------
>
>package fr.gouv.finances.dgme.presto;
>
>import java.io.File;
>import java.io.FileInputStream;
>import javax.activation.DataHandler;
>import javax.activation.FileDataSource;
>import javax.xml.stream.XMLInputFactory;
>import javax.xml.stream.XMLStreamReader;
>import org.apache.axiom.om.OMAbstractFactory;
>import org.apache.axiom.om.OMElement;
>import org.apache.axiom.om.OMFactory;
>import org.apache.axiom.om.OMNamespace;
>import org.apache.axiom.om.OMText;
>import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>import org.apache.axiom.soap.SOAP12Constants;
>import org.apache.axis2.Constants;
>import org.apache.axis2.addressing.EndpointReference;
>import org.apache.axis2.client.Options;
>import org.apache.axis2.client.ServiceClient;
>import org.apache.axis2.client.async.AsyncResult;
>import org.apache.axis2.client.async.Callback;
>import org.apache.axis2.context.ConfigurationContext;
>import org.apache.axis2.context.ConfigurationContextFactory;
>import org.apache.axis2.context.MessageContextConstants;
>import org.apache.sandesha2.client.SandeshaClientConstants;
>
>
>public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
>
>	static String fileXMLName="test_data_in.xml";
>	static String fileNameAttach="fichier.txt";
>	private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
>	private static String targetEPRTcpmon ="http://localhost:8070/axis2/services/PrestoSvc";
>	static String namespace="http://dgme.finances.gouv.fr/presto";
>	private static String CLIENT_REPO_PATH = "RepoClient";
>	private static String axis2_xml = CLIENT_REPO_PATH + File.separator +"conf" + File.separator + "axis2.xml";
>
>	/**
>	 * Call submitRequestReponse with attachment
>	 *
>	 */
>	public  void testSubmitRequestResponseWSRMAddressable() throws Exception{
>
>		String nameMethod="submit";
>		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>		ServiceClient serviceClient = new ServiceClient (configContext,null);
>
>		Options options=initOptions("submit",true);
>		serviceClient.setOptions(options);
>		String acksTo = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
>		options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>
>		System.out.println("Envoi");
>		Callback callback1 = new TestCallback ("Callback 1");
>		serviceClient.sendReceiveNonBlocking (getOMBlock("message1","sequence1",nameMethod),callback1);
>
>		while (!callback1.isComplete()) {
>			System.out.println("boucle1");
>			Thread.sleep(1000);
>		}
>
>		Callback callback2 = new TestCallback ("Callback 2");
>		serviceClient.sendReceiveNonBlocking(getOMBlock("message2","sequence1",nameMethod),callback2);
>
>		while (!callback2.isComplete()) {
>			System.out.println("boucle2");
>			Thread.sleep(1000);
>		}
>
>		options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>		Callback callback3 = new TestCallback ("Callback 3");
>		serviceClient.sendReceiveNonBlocking(getOMBlock("message3","sequence1",nameMethod),callback3);
>
>		while (!callback3.isComplete()) {
>			System.out.println("boucle3");
>			Thread.sleep(1000);
>		}
>		System.out.println("Fin du programme");
>		Thread.sleep(10000);
>		serviceClient.finalizeInvoke();
>
>	}
>
>	
>	/**
>	 * Call submitOneWay with attachment
>	 *
>	 */
>	public  void testSubmitOneWayWSRMEmetteurAnonyme() throws Exception {
>
>		String nameMethod="submitOneWay";
>		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>		ServiceClient sender = new ServiceClient (configContext,null);
>
>		Options options=initOptions("submitOneWay", false);
>		sender.setOptions(options);
>
>		System.out.println("Envoi");
>
>		sender.fireAndForget(getOMBlock("","ping1",nameMethod));
>		sender.fireAndForget(getOMBlock("","ping2",nameMethod));
>
>		options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>		sender.fireAndForget(getOMBlock("","ping3",nameMethod));
>
>		Thread.sleep(10000);
>		System.out.println("\nResult :");
>		System.out.println("NO RETURN FOR WEBSERVICE");
>		sender.finalizeInvoke();
>
>	}
>
>	private OMElement getOMBlock(String text, String sequenceKey, String nameMethod) throws Exception{
>
>		OMFactory fac = OMAbstractFactory.getOMFactory();
>		OMNamespace omNs = fac.createOMNamespace(namespace, "m");
>		OMElement payload = getPayload(nameMethod);
>
>		// Attach text file
>       		OMElement filetxt=createAttachment(fac,omNs);
>       		payload.addChild(filetxt);
>
>		// Add sequence number
>//		OMElement sequenceElem = fac.createOMElement("Sequence",omNs);
>//		if (nameMethod.equalsIgnoreCase("submit")) sequenceElem.setText(sequenceKey + "-" + text);
>//		else sequenceElem.setText(sequenceKey);
>//		payload.addChild(sequenceElem);
>
>		System.out.println("Document sent : "+payload);
>
>		return payload;
>
>	}
>
>
>	static class TestCallback extends Callback {
>
>		String name = null;
>		public TestCallback (String name) {
>			this.name = name;
>		}
>
>		public void onComplete(AsyncResult result) {
>//			Traitement du résultat et affichage
>			System.out.println("\nResult :");
>			System.out.println("Callback '" + name +  "' got result:" + result.getResponseEnvelope());
>		}
>
>		public void onError (Exception e) {
>			System.out.println("Error reported for test call back");
>			e.printStackTrace();
>		}
>	}
>
>	/**
>	 * Define options
>	 *
>	 */
>	private static Options initOptions(String nameMethod,boolean SeparateListener){
>
>		Options options = new Options ();
>		options.setTo(targetEPR);
>		options.setAction(nameMethod);
>		options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>		options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>		options.setUseSeparateListener(SeparateListener);
>		options.setProperty(MessageContextConstants.TRANSPORT_URL,targetEPRTcpmon);
>		options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
>
>		return options;
>	}
>
>	/**
>	 * Get file
>	 *
>	 */
>	private OMElement getPayload(String operation) throws Exception {
>		OMFactory fac = OMAbstractFactory.getOMFactory();
>		// Declaration du namespace
>		OMNamespace omNs = fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
>		// Creation du sommet de l'arborescence
>		OMElement payload = fac.createOMElement(operation, omNs);
>
>		// Lecture du fichier a recuperer
>		XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream("test_data_in.xml"));
>		// Construction de l'element
>		StAXOMBuilder builder = new StAXOMBuilder(fac, parser);
>		// Intergration dans l arborescence
>		payload.addChild(builder.getDocumentElement());
>
>		return payload;
>	}
>
>	/**
>	 * Method which create attachment
>	 *
>	 */
>	private static OMElement createAttachment(OMFactory fac, OMNamespace omNs) throws Exception{
>
>		OMElement attach = null;
>
>		// Creation du noeud
>		attach = fac.createOMElement("attachment", omNs);
>		// Lecteure de ce fichier
>		File fileTxt = new File(fileNameAttach);
>		FileDataSource dataSource = new FileDataSource(fileTxt);
>		// Transformation en données binaires
>		DataHandler expectedDH = new DataHandler(dataSource);
>		OMText textData = fac.createOMText(expectedDH, true);
>		// Ajout au message soap
>		attach.addChild(textData);
>
>		return attach;
>	}
>
>}
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi,

Can you think the problem is due to the tomcat version? Or the sandesha2 
version? I download jars and war on 
http://people.apache.org/repository/sandesha2/.

To configure the server,I have only change the axis2.xml. I can't change 
the module.xml because I intente to create a common server for all 
independante client (WSRM only, MTOM only, MTOM-WSRM).

Sorry to insit.
Regards

Elodie


Mancinelli Elodie wrote:

> Hi Chamikara,
>
> I use tomcat in the server side and its version is the 
> apache-tomcat-5.5.15.
> I join in attachment my client code.
>
> Thanks for your help.
>
> Regards
>
> Elodie
>
>
>
> Chamikara Jayalath wrote:
>
>> Hi Elodie,
>>
>> Are you using tomcat in the server side. If so which version?
>> Can u send your client code as well.
>>
>> Chamikara
>>
>>
>> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
>> <ma...@bull.net>> wrote:
>>
>>     Hi all,
>>
>>     I want to realise an client-server which supports MTOM and WSRM. I
>>     created separatly a client-server with MTOM and a client-server
>>     with WSRM.
>>
>>     My server has two methods: OneWay and RequestResponse.
>>
>>     - When I launch my client to test the RequestResponse method:
>>     In TCPMon, I see, the CreateSequence and the
>>     CreateSequenceResponse. My
>>     first message is sent and it is accpeted.
>>     But my client never receives the response and there is no trace 
>> on my
>>     server, the method seems not be executed.
>>
>>     - When I launch my client to test the OneWay method:
>>     In TCPMon, I see:
>>     - CreateSequence, CreateSequenceResponse
>>     - Three messages have send and three acknowledgments
>>     But no TerminateSequence.
>>     And on the server, there is an error:
>>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>>     exception
>>     java.lang.IllegalStateException: Impossible de créer une 
>> sessionaprès
>>     que la réponse ait été envoyée
>>             at
>>     
>> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>>             at
>>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>>             at
>>     
>> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831) 
>>
>>             at
>>     ........
>
>------------------------------------------------------------------------
>
>package fr.gouv.finances.dgme.presto;
>
>import java.io.File;
>import java.io.FileInputStream;
>import javax.activation.DataHandler;
>import javax.activation.FileDataSource;
>import javax.xml.stream.XMLInputFactory;
>import javax.xml.stream.XMLStreamReader;
>import org.apache.axiom.om.OMAbstractFactory;
>import org.apache.axiom.om.OMElement;
>import org.apache.axiom.om.OMFactory;
>import org.apache.axiom.om.OMNamespace;
>import org.apache.axiom.om.OMText;
>import org.apache.axiom.om.impl.builder.StAXOMBuilder;
>import org.apache.axiom.soap.SOAP12Constants;
>import org.apache.axis2.Constants;
>import org.apache.axis2.addressing.EndpointReference;
>import org.apache.axis2.client.Options;
>import org.apache.axis2.client.ServiceClient;
>import org.apache.axis2.client.async.AsyncResult;
>import org.apache.axis2.client.async.Callback;
>import org.apache.axis2.context.ConfigurationContext;
>import org.apache.axis2.context.ConfigurationContextFactory;
>import org.apache.axis2.context.MessageContextConstants;
>import org.apache.sandesha2.client.SandeshaClientConstants;
>
>
>public class PrestoWSRM_MTOMtest extends junit.framework.TestCase{
>
>	static String fileXMLName="test_data_in.xml";
>	static String fileNameAttach="fichier.txt";
>	private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/PrestoSvc");
>	private static String targetEPRTcpmon ="http://localhost:8070/axis2/services/PrestoSvc";
>	static String namespace="http://dgme.finances.gouv.fr/presto";
>	private static String CLIENT_REPO_PATH = "RepoClient";
>	private static String axis2_xml = CLIENT_REPO_PATH + File.separator +"conf" + File.separator + "axis2.xml";
>
>	/**
>	 * Call submitRequestReponse with attachment
>	 *
>	 */
>	public  void testSubmitRequestResponseWSRMAddressable() throws Exception{
>
>		String nameMethod="submit";
>		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>		ServiceClient serviceClient = new ServiceClient (configContext,null);
>
>		Options options=initOptions("submit",true);
>		serviceClient.setOptions(options);
>		String acksTo = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
>		options.setProperty(SandeshaClientConstants.AcksTo,acksTo);
>
>		System.out.println("Envoi");
>		Callback callback1 = new TestCallback ("Callback 1");
>		serviceClient.sendReceiveNonBlocking (getOMBlock("message1","sequence1",nameMethod),callback1);
>
>		while (!callback1.isComplete()) {
>			System.out.println("boucle1");
>			Thread.sleep(1000);
>		}
>
>		Callback callback2 = new TestCallback ("Callback 2");
>		serviceClient.sendReceiveNonBlocking(getOMBlock("message2","sequence1",nameMethod),callback2);
>
>		while (!callback2.isComplete()) {
>			System.out.println("boucle2");
>			Thread.sleep(1000);
>		}
>
>		options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>		Callback callback3 = new TestCallback ("Callback 3");
>		serviceClient.sendReceiveNonBlocking(getOMBlock("message3","sequence1",nameMethod),callback3);
>
>		while (!callback3.isComplete()) {
>			System.out.println("boucle3");
>			Thread.sleep(1000);
>		}
>		System.out.println("Fin du programme");
>		Thread.sleep(10000);
>		serviceClient.finalizeInvoke();
>
>	}
>
>	
>	/**
>	 * Call submitOneWay with attachment
>	 *
>	 */
>	public  void testSubmitOneWayWSRMEmetteurAnonyme() throws Exception {
>
>		String nameMethod="submitOneWay";
>		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_REPO_PATH,axis2_xml);
>		ServiceClient sender = new ServiceClient (configContext,null);
>
>		Options options=initOptions("submitOneWay", false);
>		sender.setOptions(options);
>
>		System.out.println("Envoi");
>
>		sender.fireAndForget(getOMBlock("","ping1",nameMethod));
>		sender.fireAndForget(getOMBlock("","ping2",nameMethod));
>
>		options.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
>		sender.fireAndForget(getOMBlock("","ping3",nameMethod));
>
>		Thread.sleep(10000);
>		System.out.println("\nResult :");
>		System.out.println("NO RETURN FOR WEBSERVICE");
>		sender.finalizeInvoke();
>
>	}
>
>	private OMElement getOMBlock(String text, String sequenceKey, String nameMethod) throws Exception{
>
>		OMFactory fac = OMAbstractFactory.getOMFactory();
>		OMNamespace omNs = fac.createOMNamespace(namespace, "m");
>		OMElement payload = getPayload(nameMethod);
>
>		// Attach text file
>       		OMElement filetxt=createAttachment(fac,omNs);
>       		payload.addChild(filetxt);
>
>		// Add sequence number
>//		OMElement sequenceElem = fac.createOMElement("Sequence",omNs);
>//		if (nameMethod.equalsIgnoreCase("submit")) sequenceElem.setText(sequenceKey + "-" + text);
>//		else sequenceElem.setText(sequenceKey);
>//		payload.addChild(sequenceElem);
>
>		System.out.println("Document sent : "+payload);
>
>		return payload;
>
>	}
>
>
>	static class TestCallback extends Callback {
>
>		String name = null;
>		public TestCallback (String name) {
>			this.name = name;
>		}
>
>		public void onComplete(AsyncResult result) {
>//			Traitement du résultat et affichage
>			System.out.println("\nResult :");
>			System.out.println("Callback '" + name +  "' got result:" + result.getResponseEnvelope());
>		}
>
>		public void onError (Exception e) {
>			System.out.println("Error reported for test call back");
>			e.printStackTrace();
>		}
>	}
>
>	/**
>	 * Define options
>	 *
>	 */
>	private static Options initOptions(String nameMethod,boolean SeparateListener){
>
>		Options options = new Options ();
>		options.setTo(targetEPR);
>		options.setAction(nameMethod);
>		options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>		options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>		options.setUseSeparateListener(SeparateListener);
>		options.setProperty(MessageContextConstants.TRANSPORT_URL,targetEPRTcpmon);
>		options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
>
>		return options;
>	}
>
>	/**
>	 * Get file
>	 *
>	 */
>	private OMElement getPayload(String operation) throws Exception {
>		OMFactory fac = OMAbstractFactory.getOMFactory();
>		// Declaration du namespace
>		OMNamespace omNs = fac.createOMNamespace("http://dgme.finances.gouv.fr/presto", "m");
>		// Creation du sommet de l'arborescence
>		OMElement payload = fac.createOMElement(operation, omNs);
>
>		// Lecture du fichier a recuperer
>		XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream("test_data_in.xml"));
>		// Construction de l'element
>		StAXOMBuilder builder = new StAXOMBuilder(fac, parser);
>		// Intergration dans l arborescence
>		payload.addChild(builder.getDocumentElement());
>
>		return payload;
>	}
>
>	/**
>	 * Method which create attachment
>	 *
>	 */
>	private static OMElement createAttachment(OMFactory fac, OMNamespace omNs) throws Exception{
>
>		OMElement attach = null;
>
>		// Creation du noeud
>		attach = fac.createOMElement("attachment", omNs);
>		// Lecteure de ce fichier
>		File fileTxt = new File(fileNameAttach);
>		FileDataSource dataSource = new FileDataSource(fileTxt);
>		// Transformation en données binaires
>		DataHandler expectedDH = new DataHandler(dataSource);
>		OMText textData = fac.createOMText(expectedDH, true);
>		// Ajout au message soap
>		attach.addChild(textData);
>
>		return attach;
>	}
>
>}
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

I use tomcat in the server side and its version is the apache-tomcat-5.5.15.
I join in attachment my client code.

Thanks for your help.

Regards

Elodie



Chamikara Jayalath wrote:

> Hi Elodie,
>
> Are you using tomcat in the server side. If so which version?
> Can u send your client code as well.
>
> Chamikara
>
>
> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi all,
>
>     I want to realise an client-server which supports MTOM and WSRM. I
>     created separatly a client-server with MTOM and a client-server
>     with WSRM.
>
>     My server has two methods: OneWay and RequestResponse.
>
>     - When I launch my client to test the RequestResponse method:
>     In TCPMon, I see, the CreateSequence and the
>     CreateSequenceResponse. My
>     first message is sent and it is accpeted.
>     But my client never receives the response and there is no trace on my
>     server, the method seems not be executed.
>
>     - When I launch my client to test the OneWay method:
>     In TCPMon, I see:
>     - CreateSequence, CreateSequenceResponse
>     - Three messages have send and three acknowledgments
>     But no TerminateSequence.
>     And on the server, there is an error:
>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>     exception
>     java.lang.IllegalStateException: Impossible de créer une sessionaprès
>     que la réponse ait été envoyée
>             at
>     org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>             at
>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>             at
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
>             at
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
>             at
>     org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt
>     (AxisServlet.java:81)
>             at
>     org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
>             at
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>             at javax.servlet.http.HttpServlet.service
>     (HttpServlet.java:802)
>             at
>     org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>             at
>     org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
>     :173)
>             at
>     org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>             at
>     org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>             at
>     org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>             at
>     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>             at
>     org.apache.catalina.core.StandardEngineValve.invoke
>     (StandardEngineValve.java:107)
>             at
>     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>             at
>     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>             at
>     org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
>             at
>     org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>             at
>     org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>             at
>     org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>             at java.lang.Thread.run(Thread.java:595)
>
>     I have no informations in catalina logs.
>     In precedent mails, somebody advise me to change the value of
>     InOrderInvoker in the module.xml, but when I change this,
>     client-server
>     with MTOM only and client-server with WSRM only don't works.
>     I have download the sandesha2-SNAPSHOT.mar
>     (http://people.apache.org/repository/sandesha2/mars/
>     <http://people.apache.org/repository/sandesha2/mars/>)
>
>     Someone have an idea?
>
>     Thanks a lot
>
>     Elodie
>
>
>
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

I use tomcat in the server side and its version is the apache-tomcat-5.5.15.
I join in attachment my client code.

Thanks for your help.

Regards

Elodie



Chamikara Jayalath wrote:

> Hi Elodie,
>
> Are you using tomcat in the server side. If so which version?
> Can u send your client code as well.
>
> Chamikara
>
>
> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi all,
>
>     I want to realise an client-server which supports MTOM and WSRM. I
>     created separatly a client-server with MTOM and a client-server
>     with WSRM.
>
>     My server has two methods: OneWay and RequestResponse.
>
>     - When I launch my client to test the RequestResponse method:
>     In TCPMon, I see, the CreateSequence and the
>     CreateSequenceResponse. My
>     first message is sent and it is accpeted.
>     But my client never receives the response and there is no trace on my
>     server, the method seems not be executed.
>
>     - When I launch my client to test the OneWay method:
>     In TCPMon, I see:
>     - CreateSequence, CreateSequenceResponse
>     - Three messages have send and three acknowledgments
>     But no TerminateSequence.
>     And on the server, there is an error:
>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>     exception
>     java.lang.IllegalStateException: Impossible de créer une sessionaprès
>     que la réponse ait été envoyée
>             at
>     org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>             at
>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>             at
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
>             at
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
>             at
>     org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt
>     (AxisServlet.java:81)
>             at
>     org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
>             at
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>             at javax.servlet.http.HttpServlet.service
>     (HttpServlet.java:802)
>             at
>     org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>             at
>     org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
>     :173)
>             at
>     org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>             at
>     org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>             at
>     org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>             at
>     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>             at
>     org.apache.catalina.core.StandardEngineValve.invoke
>     (StandardEngineValve.java:107)
>             at
>     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>             at
>     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>             at
>     org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
>             at
>     org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>             at
>     org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>             at
>     org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>             at java.lang.Thread.run(Thread.java:595)
>
>     I have no informations in catalina logs.
>     In precedent mails, somebody advise me to change the value of
>     InOrderInvoker in the module.xml, but when I change this,
>     client-server
>     with MTOM only and client-server with WSRM only don't works.
>     I have download the sandesha2-SNAPSHOT.mar
>     (http://people.apache.org/repository/sandesha2/mars/
>     <http://people.apache.org/repository/sandesha2/mars/>)
>
>     Someone have an idea?
>
>     Thanks a lot
>
>     Elodie
>
>
>
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>


Re: [MTOM/XOP+WSRM] servlet error

Posted by Mancinelli Elodie <el...@bull.net>.
Hi Chamikara,

I use tomcat in the server side and its version is the apache-tomcat-5.5.15.
I join in attachment my client code.

Thanks for your help.

Regards

Elodie



Chamikara Jayalath wrote:

> Hi Elodie,
>
> Are you using tomcat in the server side. If so which version?
> Can u send your client code as well.
>
> Chamikara
>
>
> On 7/13/06, *Mancinelli Elodie* <elodie.mancinelli@bull.net 
> <ma...@bull.net>> wrote:
>
>     Hi all,
>
>     I want to realise an client-server which supports MTOM and WSRM. I
>     created separatly a client-server with MTOM and a client-server
>     with WSRM.
>
>     My server has two methods: OneWay and RequestResponse.
>
>     - When I launch my client to test the RequestResponse method:
>     In TCPMon, I see, the CreateSequence and the
>     CreateSequenceResponse. My
>     first message is sent and it is accpeted.
>     But my client never receives the response and there is no trace on my
>     server, the method seems not be executed.
>
>     - When I launch my client to test the OneWay method:
>     In TCPMon, I see:
>     - CreateSequence, CreateSequenceResponse
>     - Three messages have send and three acknowledgments
>     But no TerminateSequence.
>     And on the server, there is an error:
>     - "Servlet.service()" pour la servlet AxisServlet a généré une
>     exception
>     java.lang.IllegalStateException: Impossible de créer une sessionaprès
>     que la réponse ait été envoyée
>             at
>     org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>             at
>     org.apache.catalina.connector.Request.getSession(Request.java:2024)
>             at
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
>             at
>     org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
>             at
>     org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt
>     (AxisServlet.java:81)
>             at
>     org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
>             at
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>             at javax.servlet.http.HttpServlet.service
>     (HttpServlet.java:802)
>             at
>     org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>             at
>     org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
>     :173)
>             at
>     org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>             at
>     org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>             at
>     org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>             at
>     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>             at
>     org.apache.catalina.core.StandardEngineValve.invoke
>     (StandardEngineValve.java:107)
>             at
>     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>             at
>     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>             at
>     org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
>             at
>     org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>             at
>     org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>             at
>     org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>             at java.lang.Thread.run(Thread.java:595)
>
>     I have no informations in catalina logs.
>     In precedent mails, somebody advise me to change the value of
>     InOrderInvoker in the module.xml, but when I change this,
>     client-server
>     with MTOM only and client-server with WSRM only don't works.
>     I have download the sandesha2-SNAPSHOT.mar
>     (http://people.apache.org/repository/sandesha2/mars/
>     <http://people.apache.org/repository/sandesha2/mars/>)
>
>     Someone have an idea?
>
>     Thanks a lot
>
>     Elodie
>
>
>
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>


Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Are you using tomcat in the server side. If so which version?
Can u send your client code as well.

Chamikara


On 7/13/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi all,
>
> I want to realise an client-server which supports MTOM and WSRM. I
> created separatly a client-server with MTOM and a client-server with WSRM.
>
> My server has two methods: OneWay and RequestResponse.
>
> - When I launch my client to test the RequestResponse method:
> In TCPMon, I see, the CreateSequence and the CreateSequenceResponse. My
> first message is sent and it is accpeted.
> But my client never receives the response and there is no trace on my
> server, the method seems not be executed.
>
> - When I launch my client to test the OneWay method:
> In TCPMon, I see:
> - CreateSequence, CreateSequenceResponse
> - Three messages have send and three acknowledgments
> But no TerminateSequence.
> And on the server, there is an error:
> - "Servlet.service()" pour la servlet AxisServlet a généré une exception
> java.lang.IllegalStateException: Impossible de créer une sessionaprès
> que la réponse ait été envoyée
>         at
> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>         at
> org.apache.catalina.connector.Request.getSession(Request.java:2024)
>         at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java
> :831)
>         at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java
> :842)
>         at
>
> org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt
> (AxisServlet.java:81)
>         at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:667)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
>
> I have no informations in catalina logs.
> In precedent mails, somebody advise me to change the value of
> InOrderInvoker in the module.xml, but when I change this, client-server
> with MTOM only and client-server with WSRM only don't works.
> I have download the sandesha2-SNAPSHOT.mar
> (http://people.apache.org/repository/sandesha2/mars/)
>
> Someone have an idea?
>
> Thanks a lot
>
> Elodie
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Are you using tomcat in the server side. If so which version?
Can u send your client code as well.

Chamikara


On 7/13/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi all,
>
> I want to realise an client-server which supports MTOM and WSRM. I
> created separatly a client-server with MTOM and a client-server with WSRM.
>
> My server has two methods: OneWay and RequestResponse.
>
> - When I launch my client to test the RequestResponse method:
> In TCPMon, I see, the CreateSequence and the CreateSequenceResponse. My
> first message is sent and it is accpeted.
> But my client never receives the response and there is no trace on my
> server, the method seems not be executed.
>
> - When I launch my client to test the OneWay method:
> In TCPMon, I see:
> - CreateSequence, CreateSequenceResponse
> - Three messages have send and three acknowledgments
> But no TerminateSequence.
> And on the server, there is an error:
> - "Servlet.service()" pour la servlet AxisServlet a généré une exception
> java.lang.IllegalStateException: Impossible de créer une sessionaprès
> que la réponse ait été envoyée
>         at
> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>         at
> org.apache.catalina.connector.Request.getSession(Request.java:2024)
>         at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java
> :831)
>         at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java
> :842)
>         at
>
> org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt
> (AxisServlet.java:81)
>         at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:667)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
>
> I have no informations in catalina logs.
> In precedent mails, somebody advise me to change the value of
> InOrderInvoker in the module.xml, but when I change this, client-server
> with MTOM only and client-server with WSRM only don't works.
> I have download the sandesha2-SNAPSHOT.mar
> (http://people.apache.org/repository/sandesha2/mars/)
>
> Someone have an idea?
>
> Thanks a lot
>
> Elodie
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: [MTOM/XOP+WSRM] servlet error

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Elodie,

Are you using tomcat in the server side. If so which version?
Can u send your client code as well.

Chamikara


On 7/13/06, Mancinelli Elodie <el...@bull.net> wrote:
>
> Hi all,
>
> I want to realise an client-server which supports MTOM and WSRM. I
> created separatly a client-server with MTOM and a client-server with WSRM.
>
> My server has two methods: OneWay and RequestResponse.
>
> - When I launch my client to test the RequestResponse method:
> In TCPMon, I see, the CreateSequence and the CreateSequenceResponse. My
> first message is sent and it is accpeted.
> But my client never receives the response and there is no trace on my
> server, the method seems not be executed.
>
> - When I launch my client to test the OneWay method:
> In TCPMon, I see:
> - CreateSequence, CreateSequenceResponse
> - Three messages have send and three acknowledgments
> But no TerminateSequence.
> And on the server, there is an error:
> - "Servlet.service()" pour la servlet AxisServlet a généré une exception
> java.lang.IllegalStateException: Impossible de créer une sessionaprès
> que la réponse ait été envoyée
>         at
> org.apache.catalina.connector.Request.doGetSession(Request.java:2214)
>         at
> org.apache.catalina.connector.Request.getSession(Request.java:2024)
>         at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java
> :831)
>         at
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java
> :842)
>         at
>
> org.apache.axis2.transport.http.AxisServlet.createAndSetInitialParamsToMsgCtxt
> (AxisServlet.java:81)
>         at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:667)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
>
> I have no informations in catalina logs.
> In precedent mails, somebody advise me to change the value of
> InOrderInvoker in the module.xml, but when I change this, client-server
> with MTOM only and client-server with WSRM only don't works.
> I have download the sandesha2-SNAPSHOT.mar
> (http://people.apache.org/repository/sandesha2/mars/)
>
> Someone have an idea?
>
> Thanks a lot
>
> Elodie
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>