Example #1
0
SOAP_FMAC5 int SOAP_FMAC6
ns__BlastJobError(
	struct soap*					soap,
	xsd__string						job_id,
	xsd__string&					response)
{
	WLogger log(soap->ip, __func__);

	int result = SOAP_OK;
	
	try
	{
		log << job_id;

		CBlastJob* job = CBlastJob::Find(job_id);
		
		if (job == NULL)
			THROW(("Unknown job id %s", job_id.c_str()));
		
		response = job->Error();;
	}
	catch (exception& e)
	{
		return soap_receiver_fault(soap,
			"An error occurred in blast",
			e.what());
	}

	return result;
}
Example #2
0
SOAP_FMAC5 int SOAP_FMAC6
ns__BlastJobResult(
	struct soap*					soap,
	xsd__string						job_id,
	struct ns__BlastResult&			response)
{
	WLogger log(soap->ip, __func__);

	int result = SOAP_OK;
	
	try
	{
		log << job_id;

		CBlastJob* job = CBlastJob::Find(job_id);
		
		if (job == NULL)
			THROW(("Unknown job id %s", job_id.c_str()));

		if (job->Status() != finished)
			THROW(("Job %s not finished yet", job_id.c_str()));
		
		response.db_count = job->DbCount();
		response.db_length = job->DbLength();
		response.eff_space = job->EffectiveSpace();
		response.kappa = job->Kappa();
		response.lambda = job->Lambda();
		response.entropy = job->Entropy();
		
		response.hits = job->Hits();
	}
	catch (exception& e)
	{
		return soap_receiver_fault(soap,
			"An error occurred in blast",
			e.what());
	}

	return result;
}
Example #3
0
int Service::request(xsd__string req, xsd__string *result)
{
	printf("recv request = %s \n", req.c_str());

	ActiveMqProducer* instance = ActiveMqProducer::getInstance();
	std::string brokerURI = "failover://(tcp://101.37.33.121:61616)";    //  101.37.33.121   127.0.0.1
	instance->initProducer(brokerURI);
	std::string destURI = "cgi_pemc_mid_trade_req";
	instance->sendMessage(destURI, req);
	//printf("send over.\n");	

	*result = "test";
    return SOAP_OK;
}