axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Rotovnik" <tomaz.rotov...@uni-mb.si>
Subject Safe threading - Client side
Date Wed, 05 Oct 2005 19:40:25 GMT

Hello

I'm looking for some information's about running multiple calls in client side of axis. I'm
using axis version 1.5. The problem is that when I call function again before it returns (in
different thread) it returns exception when calling invoke method.

In main loop there is call to create new object

pBLP = new Soap(s.strURL.c_str(), APTHTTP1_1);

and this instance is used each time when function "setConfirmTransaction" is called for example

pCT = pBLP->ConfirmTransaction(sTr.szAuthReference);

This calling part is implemented in callback function, which can be called many times (before
we get receive from the server it can be called again (multiple threads)).

I hope someone could give me some possible solution. 

Thanks in advance

Tomaz



Here is example of "setConfirmTransaction" function

##################################################################
setConfirmTransaction* Soap::ConfirmTransaction(xsd__string Value0)
{
 setConfirmTransaction* pReturn = NULL;
 const char* pcCmplxFaultName;
 pcCmplxFaultName = NULL;

 try{

 if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER)) return pReturn;
 m_pCall->setTransportProperty(SOAPACTION_HEADER , "http://tempuri.org/ConfirmTransaction");
 m_pCall->setSOAPVersion(SOAP_VER_1_1);
 m_pCall->setOperation("ConfirmTransaction", "http://tempuri.org/WebService");
 includeSecure();
 applyUserPreferences();
 m_pCall->addParameter((void*)Value0, "lTransactionID", XSD_STRING);
  
 if (AXIS_SUCCESS == m_pCall->invoke())
 {
    if(AXIS_SUCCESS == m_pCall->checkMessage("ConfirmTransactionResponse", "http://tempuri.org/WebService"))
  {
        pReturn = (setConfirmTransaction*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_setConfirmTransaction,
(void*) Axis_Create_setConfirmTransaction, (void*) Axis_Delete_setConfirmTransaction,"ConfirmTransactionResult",
0);
  }
 }
 m_pCall->unInitialize();
 return pReturn;
 }
 catch(AxisException& e)
 {......
 ###############################################################################
Mime
View raw message