Hi Sebastian,

i played a little bit around with this technique but i don't
know where it is good for.

the only difference i see is the sessionid in the soap-header instead of
"cookie: jsessionid=..." in the http-header and an SimpleSession-object instead
of an AxisHttpSession-object in my service.

for what can i use it?

tia
klaus

ps:
with each method-call, a additional
    "<ns1:sessionID...."
is added to the soap-header - bug? (axis_1.1beta)

Am Dienstag, 17. Dezember 2002 16:21 schrieb [EMAIL PROTECTED]:
> Hi there,
>
> I got it!!! Its unbelievable, but I really got my Sessions working! I also
> deploy my client now. Its rather easy, if you just know exactly how to.
> I'm writing now a small HOWTO, because I got nearly crazy with the existing
> documentation.
>
> So now for everybody who probably like to try, here comes a small
> explanation:
> Note: The wsdd-files are not complete, the shown data is just an
> abridgement of my wsdd-files.
> - I do not use generated classes, like the ones from wsdl2java, but it
> "should" work the same.
>
> server:
> - Write a small service that accesses the session and sets some variable
> inside this session. I took a String that was extended each time it is
> called by an "a" and then returns this String
> - In your server-config file add the SimpleSessionHandler to request AND
> response-flow of the service you want to use with sessions. That could look
> like:
>
>  <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>
>   <parameter name="allowedMethods" value="*"/>
>   <parameter name="scope" value="session"/>
>   <parameter name="className" value="MyService"/>
>  </service>
>
> client:
> - Write a file named client-config.wsdd and put in a directory in your
> classpath of the client. That could be the root of your client-application.
> Also put in here SimpleSessionHandler in request an response-flow; the file
> could look like:
>
>  <globalConfiguration>
>   <requestFlow>
>    <handler type="session"/>
>   </requestFlow>
>   <responseFlow>
>    <handler type="session"/>
>   </responseFlow>
>  </globalConfiguration>
>  <parameter name="scope" value="session"/>
>  <handler name="session"
> type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
>
> - Ensure that on the client you use the same (just once instantiated)
> service-object to create all your calls. That was a big mistake for me. I
> did not take care about this
> - After instantiating your service, set the MaintainSession to true before
> your instantiate your calls from this service.
>
> I think if you follow this, you should see in the SOAP-message (e.g. with
> tcpmon) that the session ID is transferred in the sopaenv-header in the
> response and request-message.
> At least that works for me.
>
> hope somebody can use it and wont get grey hair like me :-))
[...]

--
Klaus Thiele - Personal & Informatik AG
mailto:[EMAIL PROTECTED]

 "There's got to be more to life than compile-and-go."

Reply via email to