Pardon me if I answer my own question.  Second search for the answer found a
solution.

Figured I would share the answer.

Here is the answer I go from MSDN..

----------------

The problem is with the cookies. The Web service code does not see a valid
session ID with the request, so it creates a brand new HttpSessionState
object for each call, and returns the initial value of 1. The reason for
this is that the client proxy class, which inherits from the
System.Web.Services.Protocols.SoapHttpClientProtocol class does not have an
instance of the System.Net.CookieContainer class associated with it.
Basically, there is no place to store cookies that are returned. To fix this
problem, I changed my code as follows with the new code highlighted:

' Works with cookied ASP.NET sessions but NOT with 
' cookieless sessions.
Private Cookies As System.Net.CookieContainer

Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
    Dim proxy As New localhost.Service1()
    Dim ret As Integer
    ' Set the Cookie Container on the proxy
    If Cookies Is Nothing Then
        Cookies = New System.Net.CookieContainer()
    End If
    proxy.CookieContainer = Cookies
    ret = proxy.IncrementSessionCounter()
    Label1.Text = "Result: " & CStr(ret)
End Sub

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 09, 2005 11:09 AM
> To: [email protected]
> Subject: Axis Sessions and Visual Studio .NET..
> 
> I have an Axis Service that is properly configured to 
> maintain a session.  
> 
> I have a java client application with a stub properly 
> generated so that it
> does maintain the session across calls by making the call:
> 
>  
> _call.setProperty(org.apache.axis.client.Call.SESSION_MAINTAIN
> _PROPERTY,
> Boolean.TRUE);
> 
> I know this works and am happy with it.
> 
> The problem I'm having is that when Using Visual Studio .NET 
> (Using Visual
> Basic at this point) for the client application, it doesn't 
> maintain the
> session between calls. 
> 
> Does anyone know how to configure .NET to maintain the 
> session with Axis
> 1.2.
> 
>   Thanks!!
> 
>   Cliff
> 
> 
> 
> 
> --------------------------------------------------------------
> ---------
> Clifford Grimm 
> Centera Integration Architect 
> EMC Centera Engineering 
> EMC� <http://www.emc.com/>  
> Where Information Lives 
> * Office: 508-249-5159 (toll free 877-362-2887 x45159) 
> * Cell: 978-618-1336
> * Fax: 508-249-5495
> * E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
> *  Instant Messaging: [EMAIL PROTECTED]
> 
> 

Reply via email to