axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesús Daniel Blázquez Carazo <jdblazq...@gfi-info.com>
Subject Fw: Problem with session management
Date Thu, 08 Sep 2005 13:10:13 GMT
I think problem I have is because AxisEngine is distinct in each call to web service and the
information of this is in MessageContext.

Someone knows how can I do MessageContext contains the same AxisEngine in two call to web
services?

I want to call two web services: the first call contains in response session_id and this session_id
will be passed in the second call request.





----- Original Message ----- 
From: Jesús Daniel Blázquez Carazo 
To: axis-user@ws.apache.org ; axis-dev@ws.apache.org 
Sent: Wednesday, September 07, 2005 1:30 PM
Subject: Problem with session management


I am trying to session management using a servlet client on jboss server.

The deploy.wsdd in server 

<?xml version="1.0" encoding="UTF-8"?>

<deployment

name="TerregovService" 

xmlns="http://xml.apache.org/axis/wsdd/"

targetNamespace="http://localhost:8080/TerregovService"

xmlns:trights="http://localhost:8080/TerregovService"

xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="Rights" provider="Handler">

<parameter name="handlerClass" value="org.apache.axis.providers.java.EJBProvider"/>

<parameter name="beanJndiName" value="RightsBeanLocal"/>

<parameter name="homeInterfaceName" value="org.terregov.dram.WebService.interfaces.RightsBeanLocalHome"/>

<parameter name="localInterfaceName" value="org.terregov.dram.WebService.interfaces.RightsBeanLocal"/>

<parameter name="allowedMethods" value="checkRights getUser"/>

<requestFlow name="RightsRequest">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="RightsResponse">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

</service>


<service name="Authentication" provider="Handler">

<parameter name="handlerClass" value="org.apache.axis.providers.java.EJBProvider"/>

<parameter name="beanJndiName" value="AuthenticationBeanLocal"/>

<parameter name="homeInterfaceName" value="org.terregov.dram.WebService.interfaces.AuthenticationBeanLocalHome"/>

<parameter name="localInterfaceName" value="org.terregov.dram.WebService.interfaces.AuthenticationBeanLocal"/>

<parameter name="allowedMethods" value="challengeRequestX509 challengeValidationX509 loginValidation
challengeRequest challengeValidation "/>

<requestFlow name="AuthenticationRequest">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="AuthenticationResponse">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

</service>


<service name="CAServices" provider="Handler">

<parameter name="handlerClass" value="org.apache.axis.providers.java.EJBProvider"/>

<parameter name="beanJndiName" value="CAServicesBeanLocal"/>

<parameter name="homeInterfaceName" value="org.terregov.dram.WebService.interfaces.CAServicesBeanLocalHome"/>

<parameter name="localInterfaceName" value="org.terregov.dram.WebService.interfaces.CAServicesBeanLocal"/>

<parameter name="allowedMethods" value="requestNewUser requestCertificate getCRL getPublicKey
revokeCertificate searchCertificate updateCertRequest "/>

<requestFlow name="CAServices">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="CAServices">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

</service>


</deployment>



and works well because in SOAP header contains session value, but  the client does not put
session value in SOAP request.



The client.wsdd is generated automatically with org.apache.axis.utils.Admin client deploy.wsdd:



<?xml version="1.0" encoding="UTF-8"?>

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<globalConfiguration>

<parameter name="adminPassword" value="admin"/>

<parameter name="enableNamespacePrefixOptimization" value="true"/>

<parameter name="disablePrettyXML" value="true"/>

<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>

<parameter name="sendXsiTypes" value="true"/>

<parameter name="sendMultiRefs" value="true"/>

<parameter name="sendXMLDeclaration" value="true"/>

</globalConfiguration>

<requestFlow name="RightsRequest">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="AuthenticationResponse">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

<responseFlow name="RightsResponse">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

<requestFlow name="AuthenticationRequest">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<responseFlow name="CAServices">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

<service name="Rights" provider="Handler">

<requestFlow name="RightsRequest">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="RightsResponse">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

<parameter name="allowedMethods" value="checkRights getUser"/>

<parameter name="localInterfaceName" value="org.terregov.dram.WebService.interfaces.RightsBeanLocal"/>

<parameter name="handlerClass" value="org.apache.axis.providers.java.EJBProvider"/>

<parameter name="beanJndiName" value="RightsBeanLocal"/>

<parameter name="homeInterfaceName" value="org.terregov.dram.WebService.interfaces.RightsBeanLocalHome"/>

</service>

<service name="CAServices" provider="Handler">

<requestFlow name="CAServices">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="CAServices">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

<parameter name="allowedMethods" value="requestNewUser requestCertificate getCRL getPublicKey
revokeCertificate searchCertificate updateCertRequest "/>

<parameter name="localInterfaceName" value="org.terregov.dram.WebService.interfaces.CAServicesBeanLocal"/>

<parameter name="handlerClass" value="org.apache.axis.providers.java.EJBProvider"/>

<parameter name="beanJndiName" value="CAServicesBeanLocal"/>

<parameter name="homeInterfaceName" value="org.terregov.dram.WebService.interfaces.CAServicesBeanLocalHome"/>

</service>

<service name="Authentication" provider="Handler">

<requestFlow name="AuthenticationRequest">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</requestFlow>

<responseFlow name="AuthenticationResponse">

<handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>

<handler type="soapmonitor"/>

</responseFlow>

<parameter name="allowedMethods" value="challengeRequestX509 challengeValidationX509 loginValidation
challengeRequest challengeValidation "/>

<parameter name="localInterfaceName" value="org.terregov.dram.WebService.interfaces.AuthenticationBeanLocal"/>

<parameter name="handlerClass" value="org.apache.axis.providers.java.EJBProvider"/>

<parameter name="beanJndiName" value="AuthenticationBeanLocal"/>

<parameter name="homeInterfaceName" value="org.terregov.dram.WebService.interfaces.AuthenticationBeanLocalHome"/>

</service>

<transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>

<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>

<transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>

</deployment>



My question is: It's enough with this or it is necesary to do something more?

My client invoke stub generated with WSLD2Java classes. I think is a problem with AxisEngine
configuration in client part but I do not know sure.

Thanks for your future answers.

Mime
View raw message