It still not work.
 
I reexplain lmy problem :
 
Axis commes a handler called org.apache.axis.handlers.SimpleSessionHandler that provides SOAP header based session management. To use the simple session handler with the Web Service, you have to tell the Axis framework to add the handler to the handler chain. You do this by adding the handler information to my service's deploy.wsdd :
 

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from ArticleProviderService WSDL service -->
<handler name="SimpleSession" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
<service name="ArticleProvider" provider="java:RPC" style="rpc" use="encoded">
<requestFlow>
    <handler type="SimpleSession"/>
</requestFlow>
<responseFlow>
<handler type="SimpleSession"/>
</responseFlow>
..... 
</service>

The handler is defined for both the request & the response; this ensures that the headers are read in the request and the added to the response. after using Axis deployement tools, the server is ready.

To use this, the Web Service client has to read the handler and understand the semantics; an Axis client can do this :

we create an Axis client that uses simple sessions, so with org.apache.axis.utils.Admin client deploy.wsdd will generate client-config.wsdd file

wich contains :

<?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="attachments.Directory" value="target/"/>
  <parameter name="sendMultiRefs" value="true"/>
  <parameter name="sendXsiTypes" value="true"/>
  <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
  <parameter name="sendXMLDeclaration" value="true"/>
  <parameter name="axis.sendMinimizedElements" value="true"/>
  <requestFlow>
 <handler name="SimpleSession" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
  </requestFlow>
  <responseFlow>
    <handler name="SimpleSession" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
  </responseFlow>
 </globalConfiguration>
 
 <handler name="SimpleSession" type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
 <service name="ArticleProvider" provider="java:RPC">
  <requestFlow>
   <handler type="SimpleSession"/>
  </requestFlow>
  <responseFlow>
   <handler type="SimpleSession"/>
  ....
</responseFlow>
  </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>

For the client to handle simple sessions, the client-config.wsdd must be added to the client classpath

that's what i do, but i always have  a ClassCastException when in call my Web Service, and i didn't have this before.

thank's for your help

 

-----Message d'origine-----
De : Jeyakumaran.C [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 8 ao�t 2003 11:31
� : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : Re: ClassCastException + SOAP Header session

hi,
if i am correct then i think yr handler name(SimpleSessionHandler) and type(session) are not compatible.
the type should be SimpleSession if the handler is SimpleSessionHandler
I haven't used this before but according to the

org.apache.axis.handlers.SimpleSessionHandler

it sounds like.

if it fails then u put the SimpleSessionHandler instead of SimpleSession.

regards,

Jeyakumaran.C

 ----- Original Message -----
From: "Said Elaissaoui / 1Genia" <[EMAIL PROTECTED]>
Sent: Friday, August 08, 2003 2:43 PM
Subject: ClassCastException + SOAP Header session

>
> Hello,
>
> in order to handle sessions in soap header, i have add this line in axis
> server-config.wsdd :
>
> <handler name="SimpleSessionHandler"
> type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
> <service name="MyService" provider="java:RPC">
>   <requestFlow>
>    <handler type="session"/>
>   </requestFlow>
>   <responseFlow>
>    <handler type="session"/>
>   </responseFlow>
> ......
> </service>
>
> And i have generate a client-config.wsdd file wich i add to the classpath of
> my client :
> <?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">
>  <handler name="session"
> type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
>  <service name="MyService" provider="java:RPC">
>   <requestFlow>
>    <handler type="session"/>
>   </requestFlow>
>   <responseFlow>
>    <handler type="session"/>
>   </responseFlow>
>  ....
>  </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>
>
> And when i call my service i have a ClassCastException
> can any body help me ?
>
>
>
>

Reply via email to