axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa.abeysin...@gmail.com>
Subject Re: Safe threading - Client side
Date Thu, 06 Oct 2005 01:54:53 GMT
We have some tests with threads in the test forlder, some of which were 
passing. (I did not run the test framework lately, could someone please 
mention what threded tests are passing/running)
Please have a look at tests with the name suffix 'TTest' (run `ls 
tests/auto_build/testcases/client/cpp/*TTest*` in source extract folder)
This will give you an idea on how to use clients in threads.

Thanks,
Samisa...

Tomaz Rotovnik wrote:

>  
> 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