Hi,
I did what you advised me about my client-config.wsdd, but i still have a
ClasscastException.

this is my server-config.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="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="soapmonitor"
type="java:org.apache.axis.handlers.SOAPMonitorHandler"/>
   <handler type="java:org.apache.axis.handlers.JWSHandler">
    <parameter name="scope" value="session"/>
   </handler>
   <handler type="java:org.apache.axis.handlers.JWSHandler">
    <parameter name="scope" value="request"/>
    <parameter name="extension" value=".jwr"/>
   </handler>
  </requestFlow>
  <responseFlow>
   <handler name="soapmonitor"
type="java:org.apache.axis.handlers.SOAPMonitorHandler"/>
  </responseFlow>
 </globalConfiguration>
 <handler name="LocalResponder"
type="java:org.apache.axis.transport.local.LocalResponder"/>

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

 <handler name="URLMapper"
type="java:org.apache.axis.handlers.http.URLMapper"/>
 <handler name="RPCDispatcher"
type="java:org.apache.axis.providers.java.RPCProvider"/>
 <handler name="Authenticate"
type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
 <handler name="MsgDispatcher"
type="java:org.apache.axis.providers.java.MsgProvider"/>
 <service name="AdminService" provider="java:MSG">
  <parameter name="allowedMethods" value="AdminService"/>
  <parameter name="enableRemoteAdmin" value="true"/>
  <parameter name="className" value="org.apache.axis.utils.Admin"/>
  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
 </service>
 <service name="Version" provider="java:RPC">
  <parameter name="allowedMethods" value="getVersion"/>
  <parameter name="className" value="org.apache.axis.Version"/>
 </service>

 <service name="ArticleProvider" provider="java:RPC">
  <requestFlow>
   <handler type="SimpleSession" />
  </requestFlow>
  <responseFlow>
   <handler type="SimpleSession" />
  </responseFlow>
  ...
 </service>
 <transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender">
  <requestFlow>
   <handler type="URLMapper"/>
   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
  </requestFlow>
 </transport>
 <transport name="local">
  <responseFlow>
   <handler type="java:org.apache.axis.transport.local.LocalResponder"/>
  </responseFlow>
 </transport>
</deployment>

Thank you for your help.



-----Message d'origine-----
De : Jim Harris [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 8 ao�t 2003 16:35
� : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : RE: ClassCastException + SOAP Header session


Said,

In your client it seems that you are going to invoke the session handler
twice due to it being in the global and service-specific chains.  I would
remove the parts from the global chain so that your client-config.wsdd looks
more like this:

<?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"/>
 </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>

That should be fine for the client-side. Don't be afraid of editing the
server- and client-config.wsdd files by hand. I do nothing but this as the
Admin tools seem to add crap that is not needed and causes problems in some
cases.

Could you post your actual server-config.wsdd file to see whether the Admin
tool is doing anything funny with that too...

Jim



-----Original Message-----
From: Said Elaissaoui / 1Genia [mailto:[EMAIL PROTECTED]
Sent: 08 August 2003 11:23
To: [EMAIL PROTECTED]
Subject: RE: ClassCastException + SOAP Header session


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]>
To: <[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