axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergej Srepfler <ser...@jware.hr>
Subject sessions example needed
Date Wed, 07 Jul 2004 06:28:27 GMT
I have a java axis server and Linux client.
Can anyone point me to an example how to use sessions?
Both sides (client and server), preferably, but Client is more of a
problem, since I believe than I can dig up working example for server
side.

I did try something on Calculator example, but it didn't work.

int Calculator::add(int Value0, int Value1)
{
        int Ret;
        if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER, NORMAL_CHANNEL)) retur
        m_pCall->setTransportProperty(SOAPACTION_HEADER , "Calculator#add");
        m_pCall->setSOAPVersion(SOAP_VER_1_1);
        m_pCall->setOperation("add", "http://localhost/axis/Calculator");
        m_pCall->addParameter((void*)&Value0, "in0", XSD_INT);
        m_pCall->addParameter((void*)&Value1, "in1", XSD_INT);
        m_pCall->setTransportProperty(SOAPACTION_HEADER,"Set-Cookie");
        if (AXIS_SUCCESS == m_pCall->invoke())
        {
                if(AXIS_SUCCESS == m_pCall->checkMessage("addResponse", "http://localhos
                {
                        Ret = m_pCall->getElementAsInt("addReturn", 0);
                        printf("Ret:%d\n", Ret);
                        printf("Session: %s\n",m_pCall->getTransport()->getSessionId());
                        // or, alternative approach is
                        // SOAPTransport *st=m_pCall->getTransport();
                        // printf("\n--- %s ---\n",st->getSessionId());
                }
        }
        m_pCall->unInitialize();
        return Ret;
}

but it returns "some session id".
Am I missing something?



Mime
View raw message