axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergej Srepfler <>
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

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->setOperation("add", "http://localhost/axis/Calculator");
        m_pCall->addParameter((void*)&Value0, "in0", XSD_INT);
        m_pCall->addParameter((void*)&Value1, "in1", XSD_INT);
        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());
        return Ret;

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

View raw message