You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Sergej Srepfler <se...@jware.hr> on 2004/07/07 08:28:27 UTC
sessions example needed
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?