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 Fabrice Airault <fa...@centile.com> on 2007/09/26 10:41:40 UTC

[AXIS2] 1.1.1 soapsession, addressing, error when i connect a second client

hi,

I have a problem when i am using axis2 with addressing and soapSession.

I connect a first client on my service and all work fine.
when a second client do a connection on my axis2-server, the destroy 
method is call on my first service instance.

I can't have more than one service instance.

You can find in attachment 3 files to help me to solve my problem.
fragmentOfEnterprise.java is a part of the  service implementation.


Thanks,

Fabrice

[END] find issue Re: [AXIS2] 1.1.1 soapsession, addressing, error when i connect a second client

Posted by Fabrice Airault <fa...@centile.com>.
  http://marc.info/?l=axis-user&m=117316427720305&w=2
http://issues.apache.org/jira/browse/AXIS2-1991

in axis2.xml set 30000 instead of 30

<!--This will give out the timout of the configuration contexts, in 
seconds-->
     <parameter name="ConfigContextTimeoutInterval" 
locked="false">30000</parameter>

fabrice

Fabrice Airault wrote:
> i forget to give the client error;
> org.apache.axis2.AxisFault: Invalid Service Group Id 
> urn:uuid:1A97EC2C88AAE98C191190795240692
>         at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271) 
> 
>         at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202) 
> 
> 
> 
> Fabrice Airault wrote:
>> hi,
>>
>> I have a problem when i am using axis2 with addressing and soapSession.
>>
>> I connect a first client on my service and all work fine.
>> when a second client do a connection on my axis2-server, the destroy 
>> method is call on my first service instance.
>>
>> I can't have more than one service instance.
>>
>> You can find in attachment 3 files to help me to solve my problem.
>> fragmentOfEnterprise.java is a part of the  service implementation.
>>
>>
>> Thanks,
>>
>> Fabrice
>>
>>
>> ------------------------------------------------------------------------
>>
>>         private static final long serialVersionUID = 1L;
>>     
>>         private static int iid = 0;
>>     private int id = iid++;
>>     /*************************************************************************** 
>>
>>      * Axis2
>>      
>> **************************************************************************/ 
>>
>>
>>     public void traceServiceContext(String s, ServiceContext 
>> serviceContext) {
>>         trace("****************** " + s + " *********************");
>>         trace(" ** " + s + " ** serviceContext=" + serviceContext);
>>         if (serviceContext != null) {
>>             AxisService as = serviceContext.getAxisService();
>>             trace(" ** " + s + " ** AxisService=" + as);
>>             ConfigurationContext cc = 
>> serviceContext.getConfigurationContext();
>>             trace(" ** " + s + " ** ConfigurationContext=" + cc);
>>             EndpointReference myepr = serviceContext.getMyEPR();
>>             trace(" ** " + s + " ** EndpointReference=" + myepr);
>>             ServiceGroupContext sgc = 
>> serviceContext.getServiceGroupContext();
>>             trace(" ** " + s + " ** ServiceGroupContext=" + sgc);
>>         }
>>     }
>>
>>     public void trace(String s) {
>>         System.out.println("-- id=" + id + " --" + s);
>>     }
>>
>>     public void init(ServiceContext serviceContext) throws AxisFault {
>>     
>>         System.out.println(" *********************** INIT  
>> ************** "+this);
>>         traceServiceContext("INIT",serviceContext);
>>        
>>
>>     }
>>
>>     public void destroy(@SuppressWarnings("unused")
>>     ServiceContext serviceContext) throws AxisFault {
>>         System.out.println("***** Destroy **** "+this);
>>         traceServiceContext("Destroy",serviceContext);
>>         new RuntimeException("").printStackTrace();
>>
>>     }
>>
>>     public void setOperationContext(@SuppressWarnings("unused")
>>     OperationContext operationContext) throws AxisFault {
>>         System.out.println("***** setOperationContext ****");
>>     }
>>
>>
>> ------------------------------------------------------------------------
>>
>> <serviceGroup>    <service name="Enterprise"  scope="soapsession">
>>
>>         <description>ws-wcp</description>
>>         <module ref="addressing"/>
>>                         <messageReceivers>
>>                 <messageReceiver 
>> mep="http://www.w3.org/2004/08/wsdl/in-only"
>>                                                  
>> class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>>                 <messageReceiver 
>> mep="http://www.w3.org/2004/08/wsdl/in-out"
>>                                                  
>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>         </messageReceivers>
>>         <!-- schema schemaNamespace="http://tempuri.org/apidata"/ -->
>>         <parameter name="ServiceClass" 
>> locked="false">com.centile.ws.Enterprise</parameter>
>>        
>>        
>> </service>
>> </serviceGroup>  
>>
>>
>> ------------------------------------------------------------------------
>>
>>  *********************** INIT  ************** 
>> com.centile.ws.Enterprise@e28b9
>> -- id=0 --****************** INIT *********************
>> -- id=0 -- ** INIT ** 
>> serviceContext=org.apache.axis2.context.ServiceContext@193a66f
>> -- id=0 -- ** INIT ** 
>> AxisService=org.apache.axis2.description.AxisService@93d6bc
>> -- id=0 -- ** INIT ** 
>> ConfigurationContext=org.apache.axis2.context.ConfigurationContext@9931f5
>> -- id=0 -- ** INIT ** EndpointReference=null
>> -- id=0 -- ** INIT ** 
>> ServiceGroupContext=org.apache.axis2.context.ServiceGroupContext@1f6df4c
>> ***** Destroy **** com.centile.ws.Enterprise@e28b9
>> -- id=0 --****************** Destroy *********************
>> -- id=0 -- ** Destroy ** 
>> serviceContext=org.apache.axis2.context.ServiceContext@193a66f
>> -- id=0 -- ** Destroy ** 
>> AxisService=org.apache.axis2.description.AxisService@93d6bc
>> -- id=0 -- ** Destroy ** 
>> ConfigurationContext=org.apache.axis2.context.ConfigurationContext@9931f5
>> -- id=0 -- ** Destroy ** EndpointReference=null
>> -- id=0 -- ** Destroy ** 
>> ServiceGroupContext=org.apache.axis2.context.ServiceGroupContext@1f6df4c
>> java.lang.RuntimeException:         at 
>> com.centile.ws.Enterprise.destroy(Enterprise.java:76)
>>         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.axis2.engine.DependencyManager.destroyServiceObject(DependencyManager.java:122) 
>>
>>         at 
>> org.apache.axis2.context.ConfigurationContext.cleanupServiceContexts(ConfigurationContext.java:359) 
>>
>>         at 
>> org.apache.axis2.context.ConfigurationContext.cleanupServiceGroupContexts(ConfigurationContext.java:341) 
>>
>>         at 
>> org.apache.axis2.context.ConfigurationContext.registerServiceGroupContext(ConfigurationContext.java:218) 
>>
>>         at 
>> org.apache.axis2.context.ConfigurationContext.fillServiceContextAndServiceGroupContext(ConfigurationContext.java:171) 
>>
>>         at 
>> org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.java:104) 
>>
>>         at org.apache.axis2.engine.Phase.invoke(Phase.java:382)
>>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
>>         at 
>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:487)
>>         at 
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328) 
>>
>>         at 
>> org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:230)
>>         at 
>> org.apache.axis2.transport.http.server.DefaultHttpServiceProcessor.doService(DefaultHttpServiceProcessor.java:189) 
>>
>>         at 
>> org.apache.http.protocol.HttpService.handleRequest(HttpService.java:123)
>>         at 
>> org.apache.axis2.transport.http.server.DefaultHttpServiceProcessor.run(DefaultHttpServiceProcessor.java:261) 
>>
>>         at 
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) 
>>
>>         at 
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) 
>>
>>         at java.lang.Thread.run(Thread.java:595)
>>  *********************** INIT  ************** 
>> com.centile.ws.Enterprise@e2cb55
>> -- id=1 --****************** INIT *********************
>> -- id=1 -- ** INIT ** 
>> serviceContext=org.apache.axis2.context.ServiceContext@19360e2
>> -- id=1 -- ** INIT ** 
>> AxisService=org.apache.axis2.description.AxisService@93d6bc
>> -- id=1 -- ** INIT ** 
>> ConfigurationContext=org.apache.axis2.context.ConfigurationContext@9931f5
>> -- id=1 -- ** INIT ** EndpointReference=null
>> -- id=1 -- ** INIT ** 
>> ServiceGroupContext=org.apache.axis2.context.ServiceGroupContext@bdb503
>>
>> ---------------------------------------------------------------------
>> 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: [AXIS2] 1.1.1 soapsession, addressing, error when i connect a second client

Posted by Fabrice Airault <fa...@centile.com>.
i forget to give the client error;
org.apache.axis2.AxisFault: Invalid Service Group Id 
urn:uuid:1A97EC2C88AAE98C191190795240692
         at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
         at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)


Fabrice Airault wrote:
> hi,
> 
> I have a problem when i am using axis2 with addressing and soapSession.
> 
> I connect a first client on my service and all work fine.
> when a second client do a connection on my axis2-server, the destroy 
> method is call on my first service instance.
> 
> I can't have more than one service instance.
> 
> You can find in attachment 3 files to help me to solve my problem.
> fragmentOfEnterprise.java is a part of the  service implementation.
> 
> 
> Thanks,
> 
> Fabrice
> 
> 
> ------------------------------------------------------------------------
> 
>         private static final long serialVersionUID = 1L;
> 	
>         private static int iid = 0;
> 	private int id = iid++;
> 	/***************************************************************************
> 	 * Axis2
> 	 **************************************************************************/
> 
> 	public void traceServiceContext(String s, ServiceContext serviceContext) {
> 		trace("****************** " + s + " *********************");
> 		trace(" ** " + s + " ** serviceContext=" + serviceContext);
> 		if (serviceContext != null) {
> 			AxisService as = serviceContext.getAxisService();
> 			trace(" ** " + s + " ** AxisService=" + as);
> 			ConfigurationContext cc = serviceContext.getConfigurationContext();
> 			trace(" ** " + s + " ** ConfigurationContext=" + cc);
> 			EndpointReference myepr = serviceContext.getMyEPR();
> 			trace(" ** " + s + " ** EndpointReference=" + myepr);
> 			ServiceGroupContext sgc = serviceContext.getServiceGroupContext();
> 			trace(" ** " + s + " ** ServiceGroupContext=" + sgc);
> 		}
> 	}
> 
> 	public void trace(String s) {
> 		System.out.println("-- id=" + id + " --" + s);
> 	}
> 
> 	public void init(ServiceContext serviceContext) throws AxisFault {
> 	
> 		System.out.println(" *********************** INIT  ************** "+this);
> 		traceServiceContext("INIT",serviceContext);
> 		
> 
> 	}
> 
> 	public void destroy(@SuppressWarnings("unused")
> 	ServiceContext serviceContext) throws AxisFault {
> 		System.out.println("***** Destroy **** "+this);
> 		traceServiceContext("Destroy",serviceContext);
> 		new RuntimeException("").printStackTrace();
> 
> 	}
> 
> 	public void setOperationContext(@SuppressWarnings("unused")
> 	OperationContext operationContext) throws AxisFault {
> 		System.out.println("***** setOperationContext ****");
> 	}
> 
> 
> ------------------------------------------------------------------------
> 
> <serviceGroup>    
> <service name="Enterprise"  scope="soapsession">
> 
>         <description>ws-wcp</description>
>         <module ref="addressing"/>
>         
>         
>         <messageReceivers>
>                 <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
>                                                  class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>                 <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
>                                                  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>         </messageReceivers>
>         <!-- schema schemaNamespace="http://tempuri.org/apidata"/ -->
>         <parameter name="ServiceClass" locked="false">com.centile.ws.Enterprise</parameter>
> 		
> 		
> </service>
> </serviceGroup>   
> 
> 
> 
> ------------------------------------------------------------------------
> 
>  *********************** INIT  ************** com.centile.ws.Enterprise@e28b9
> -- id=0 --****************** INIT *********************
> -- id=0 -- ** INIT ** serviceContext=org.apache.axis2.context.ServiceContext@193a66f
> -- id=0 -- ** INIT ** AxisService=org.apache.axis2.description.AxisService@93d6bc
> -- id=0 -- ** INIT ** ConfigurationContext=org.apache.axis2.context.ConfigurationContext@9931f5
> -- id=0 -- ** INIT ** EndpointReference=null
> -- id=0 -- ** INIT ** ServiceGroupContext=org.apache.axis2.context.ServiceGroupContext@1f6df4c
> ***** Destroy **** com.centile.ws.Enterprise@e28b9
> -- id=0 --****************** Destroy *********************
> -- id=0 -- ** Destroy ** serviceContext=org.apache.axis2.context.ServiceContext@193a66f
> -- id=0 -- ** Destroy ** AxisService=org.apache.axis2.description.AxisService@93d6bc
> -- id=0 -- ** Destroy ** ConfigurationContext=org.apache.axis2.context.ConfigurationContext@9931f5
> -- id=0 -- ** Destroy ** EndpointReference=null
> -- id=0 -- ** Destroy ** ServiceGroupContext=org.apache.axis2.context.ServiceGroupContext@1f6df4c
> java.lang.RuntimeException: 
>         at com.centile.ws.Enterprise.destroy(Enterprise.java:76)
>         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.axis2.engine.DependencyManager.destroyServiceObject(DependencyManager.java:122)
>         at org.apache.axis2.context.ConfigurationContext.cleanupServiceContexts(ConfigurationContext.java:359)
>         at org.apache.axis2.context.ConfigurationContext.cleanupServiceGroupContexts(ConfigurationContext.java:341)
>         at org.apache.axis2.context.ConfigurationContext.registerServiceGroupContext(ConfigurationContext.java:218)
>         at org.apache.axis2.context.ConfigurationContext.fillServiceContextAndServiceGroupContext(ConfigurationContext.java:171)
>         at org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.java:104)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:382)
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:487)
>         at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328)
>         at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:230)
>         at org.apache.axis2.transport.http.server.DefaultHttpServiceProcessor.doService(DefaultHttpServiceProcessor.java:189)
>         at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:123)
>         at org.apache.axis2.transport.http.server.DefaultHttpServiceProcessor.run(DefaultHttpServiceProcessor.java:261)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:595)
>  *********************** INIT  ************** com.centile.ws.Enterprise@e2cb55
> -- id=1 --****************** INIT *********************
> -- id=1 -- ** INIT ** serviceContext=org.apache.axis2.context.ServiceContext@19360e2
> -- id=1 -- ** INIT ** AxisService=org.apache.axis2.description.AxisService@93d6bc
> -- id=1 -- ** INIT ** ConfigurationContext=org.apache.axis2.context.ConfigurationContext@9931f5
> -- id=1 -- ** INIT ** EndpointReference=null
> -- id=1 -- ** INIT ** ServiceGroupContext=org.apache.axis2.context.ServiceGroupContext@bdb503
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org