Application.cc 18.2 KB
Newer Older
1
// $Id$
Luciano Orsini's avatar
Luciano Orsini committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

/*************************************************************************
 * XDAQ Components for Distributed Data Acquisition                      *
 * Copyright (C) 2000-2004, CERN.			                 *
 * All rights reserved.                                                  *
 * Authors: J. Gutleber and L. Orsini					 *
 *                                                                       *
 * For the licensing terms see LICENSE.		                         *
 * For the list of contributors see CREDITS.   			         *
 *************************************************************************/

#include "psx/Application.h"

#include "xdaq/ApplicationGroup.h" 
#include "xdaq/ApplicationRegistry.h" 
Luciano Orsini's avatar
Luciano Orsini committed
17
18
19
20
21
22
#include "xcept/tools.h"
#include "xoap/SOAPEnvelope.h"
#include "xoap/SOAPHeader.h"
#include "xoap/domutils.h"
#include "pt/PeerTransportAgent.h"
#include "pt/SOAPMessenger.h"
Luciano Orsini's avatar
Luciano Orsini committed
23
24
25
26
27
28
29
30
31
32
33
34
 
#include "xoap/MessageReference.h"
#include "xoap/MessageFactory.h"

#include "xoap/SOAPEnvelope.h"
#include "xoap/SOAPBody.h"
#include "xoap/SOAPBodyElement.h"
#include "xoap/Method.h"
#include "xoap/domutils.h"
#include "xoap/DOMParser.h"
#include "xoap/SOAPHeader.h"

Luciano Orsini's avatar
Luciano Orsini committed
35
#include "xgi/Table.h"
36
#include "xgi/framework/Method.h"
Luciano Orsini's avatar
Luciano Orsini committed
37

Luciano Orsini's avatar
Luciano Orsini committed
38
#include "psx/sapi/ApplicationService.h"
39
#include "psx/sapi/DpDisconnectRequest.h"
40
41
42
#include "psx/sapi/Hotlink.h"
#include "psx/sapi/DpConnectRequest.h"

Luciano Orsini's avatar
Luciano Orsini committed
43
#include "psx/mapi/ApplicationService.h" 
44
45
46
#include "psx/mapi/Monitor.h"

#include "toolbox/string.h"
Luciano Orsini's avatar
Luciano Orsini committed
47
48
49
50
 
XDAQ_INSTANTIATOR_IMPL(psx::Application);

 
51
psx::Application::Application(xdaq::ApplicationStub* s)   : xdaq::Application(s), xgi::framework::UIManager(this)
Luciano Orsini's avatar
Luciano Orsini committed
52
{
Luciano Orsini's avatar
Luciano Orsini committed
53
54
55
	mapi_ = 0;
	sapi_ = 0;

56
57
	s->getDescriptor()->setAttribute("icon","/psx/images/psx-icon.png");
	s->getDescriptor()->setAttribute("service","psx");
Luciano Orsini's avatar
Luciano Orsini committed
58
		
59
60
61
	xoap::bind(this, &psx::Application::getWinCCOASubscriptions, "getWinCCOASubscriptions", psx::NSURI );
	xoap::bind(this, &psx::Application::getSMISubscriptions, "getSMISubscriptions", psx::NSURI );

62
	xoap::bind(this, &psx::Application::onWinCCOARequest, "*", psx::sapi::NSURI );
Luciano Orsini's avatar
Luciano Orsini committed
63
64
65
	xoap::bind(this, &psx::Application::onSMIRequest, "*", psx::mapi::NSURI );
	
	// bind HTTP callbacks
66
	xgi::framework::deferredbind(this, this, &psx::Application::Default, "Default");
67
	xgi::framework::deferredbind(this, this, &psx::Application::actionWinCCOA, "actionWinCCOA");
68
	xgi::framework::deferredbind(this, this, &psx::Application::actionSMI, "actionSMI");
Luciano Orsini's avatar
Luciano Orsini committed
69
70
71
72
73
74
75
76
77
78
79
	
	// Detect when the setting of defualt paramaters has been perfomed
	this->getApplicationInfoSpace()->addListener(this, "urn:xdaq-event:setDefaultValues");
	
	projectName_     = "";
	projectNumber_   = "";
	databaseManager_ = "";
	eventManager_    = "";

	this->getApplicationInfoSpace()->fireItemAvailable("projectName",&projectName_);
	this->getApplicationInfoSpace()->fireItemAvailable("projectNumber",&projectNumber_);
80
81
	this->getApplicationInfoSpace()->fireItemAvailable("databaseManager",&databaseManager_);
        this->getApplicationInfoSpace()->fireItemAvailable("eventManager",&eventManager_);
Luciano Orsini's avatar
Luciano Orsini committed
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	
	dns_    = "";
	
	this->getApplicationInfoSpace()->fireItemAvailable("dns",&dns_);
	
}

psx::Application::~Application()
{

}
	

// web interface
96
void psx::Application::Default(xgi::Input * in, xgi::Output * out ) 
Luciano Orsini's avatar
Luciano Orsini committed
97
{
Luciano Orsini's avatar
Luciano Orsini committed
98
99
100
101
102
103
104
105
	// Put a menu for the two services PVSS and SMI
	
	std::string url = "/";
	url += getApplicationDescriptor()->getURN();
	
	*out << "<div style=\"border: 1px solid #FFFFFF;font-family: arial; font-size: 10pt;\">" << std::endl;
	
	// embedded applications
106
107
108
109
110
111
112
113
114
115
116
117
118
	//xgi::Utils::getWidget(out, "PVSS", "PVSS service specific actions", url, "MenuPVSS", "/psx/images/PVSS.png" );
	//xgi::Utils::getWidget(out, "SMI", "SMI service specific actions", url, "MenuSMI", "/psx/images/SMI.png" );	
	 // Begin of tabs
	 *out << "<div class=\"xdaq-tab-wrapper\" id=\"tabPane1\">" << std::endl;
	
	*out << "<div class=\"xdaq-tab\" title=\"WinCC OA\">" << std::endl;                                                                                                                                                                                                              
        this->WinCCOATabPage(in,out);
        *out << "</div>";

	*out << "<div class=\"xdaq-tab\" title=\"SMI\">" << std::endl;
        this->SMITabPage(in, out);
        *out << "</div>";

Luciano Orsini's avatar
Luciano Orsini committed
119
120
121
122
	*out << "</div>";
}

// web interface
123
void psx::Application::WinCCOATabPage(xgi::Input * in, xgi::Output * out ) 
Luciano Orsini's avatar
Luciano Orsini committed
124
125
126
127
128
129
130
131
{

	std::string url = "/";
	url += getApplicationDescriptor()->getURN();
	
	// Show the following status information:
	// Name and port of event manager connected to, reachable?
	// Name and port of database manager connected to, reachable?
132
	*out << "<div id=\"default\">" << std::endl;
Luciano Orsini's avatar
Luciano Orsini committed
133
	*out << "Project number " << projectNumber_.toString() << ": " << std::endl;
134
135
	*out << "<a id=\"default\" target=\"_blank\" href=\"/daq/psx/sapi/" << projectName_.toString() << "/log/PVSS_II.log\">view</a> PVSS log<p>" << std::endl;
	*out << "</div>" << std::endl;
Luciano Orsini's avatar
Luciano Orsini committed
136
137
138
139
140
141
142
143
144
145
	
	xgi::Table t("default");
	t.addColumn ("Description");
	t.addColumn ("URL");
	t.addColumn ("Connection");
		
	std::vector<xgi::Table::Row>::iterator row = t.addRow ("default");
	row->addColumn("Database manager");
	row->addColumn(databaseManager_);
	
146
	if ((sapi_ != 0) && (sapi_->isDataManagerConnected()))
Luciano Orsini's avatar
Luciano Orsini committed
147
148
149
150
151
152
153
154
155
156
157
	{
		row->addColumn("OK");
	}
	else
	{
		row->addColumn("Not OK");
	}
	
	row = t.addRow ("default");
	row->addColumn("Event manager");
	row->addColumn(eventManager_);
Luciano Orsini's avatar
Luciano Orsini committed
158
	
Luciano Orsini's avatar
Luciano Orsini committed
159
160
161
162
163
164
165
166
167
168
	if ((sapi_ != 0) && (sapi_->isEventManagerConnected()))
	{
		row->addColumn("OK");
	}
	else
	{
		row->addColumn("Not OK");
	}

	*out << t << std::endl;
Luciano Orsini's avatar
Luciano Orsini committed
169
	
Luciano Orsini's avatar
Luciano Orsini committed
170
171
172
	// Table of subscriptions with button to delete (unsubscribe)
		
	*out << cgicc::br();	
Luciano Orsini's avatar
Luciano Orsini committed
173
	
174
175
176
177
178
	// Show all the subscriptions
	xgi::Table subscriptionTable ("default");
	subscriptionTable.addColumn ("Transaction");
	subscriptionTable.addColumn ("URL");
	subscriptionTable.addColumn ("Action");
179
	subscriptionTable.addColumn ("dpNames");
180
181
182
183
184
185
186
187
	std::vector<std::string> subscriptions = sapi_->getTransactions();
	
	if (subscriptions.empty())
	{
		std::vector<xgi::Table::Row>::iterator subscriptionTableRow = subscriptionTable.addRow ("default");
		subscriptionTableRow->addColumn( "n/a" );
		subscriptionTableRow->addColumn( "no transactions registered" );
		subscriptionTableRow->addColumn( "" );
188
		subscriptionTableRow->addColumn( "" );
189
190
191
	}
	else
	{
192
		for (std::vector<std::string>::size_type i = 0; i < subscriptions.size(); ++i)
193
194
195
196
197
198
		{
			std::vector<xgi::Table::Row>::iterator subscriptionTableRow = subscriptionTable.addRow ("default");
			subscriptionTableRow->addColumn( subscriptions[i] );
			subscriptionTableRow->addColumn( sapi_->getTransactionUrl(subscriptions[i]) );
			std::string link = "<a id=\"default\" href=\"";
			link += url;
199
			link += "/actionWinCCOA?action=clearTransaction&transaction=";
200
201
202
			link += subscriptions[i];
			link += "\">Delete</a>";
			subscriptionTableRow->addColumn( link );
203
204
205
206
207
208

			//
			psx::sapi::Hotlink * hotlink = sapi_->getTransaction(subscriptions[i]);
			psx::sapi::Request * originalRequest = hotlink->getRequest();
			std::set<std::string>& s = dynamic_cast<psx::sapi::DpConnectRequest*>(originalRequest)->getDpNames();
			subscriptionTableRow->addColumn(toolbox::printTokenSet(s,","));
209
		}
210

211
212
	}
	*out << subscriptionTable << std::endl;
Luciano Orsini's avatar
Luciano Orsini committed
213
214
}

215
void psx::Application::actionWinCCOA(xgi::Input * in, xgi::Output * out ) 
216
217
218
219
220
221
222
223
224
225
226
{	
	try
	{
	 	cgicc::Cgicc cgi(in);           
                std::string action = xgi::Utils::getFormElement(cgi, "action")->getValue();
		
		if (action == "clearTransaction")
		{
			std::string transaction = xgi::Utils::getFormElement(cgi, "transaction")->getValue();
			if (sapi_->hasTransaction(transaction))
			{
227
228
229
230
231
232
				//std::cout << "************ IN CLEAR TRANSACTION ***************" << std::endl;
				psx::sapi::DpDisconnectRequest* r = new psx::sapi::DpDisconnectRequest(sapi_);
				r->setAck(false); // do not require a SOAP reply
				r->setTransactionId(transaction);
				sapi_->submit(r);
				delete r;
233
				this->Default(in,out);
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
			}
			else
			{
				std::string msg = "Failed to clear non existing transaction ";
				msg += transaction;
				XCEPT_RAISE (xgi::exception::Exception, msg);
			}
		}
		else
		{
			std::string msg = "Failed to process unknown action ";
			msg += action;
			XCEPT_RAISE (xgi::exception::Exception, msg);
		}
	}
249
250
251
252
	catch (psx::sapi::exception::Exception& xe)
        {
                XCEPT_RETHROW (xgi::exception::Exception, "Failed to process PVSS request", xe);
        }
253
254
255
256
257
258
259
260
	catch (xgi::exception::Exception& xe)
        {
                XCEPT_RETHROW (xgi::exception::Exception, "CGI processing error", xe);
        }
        catch (xcept::Exception & e)
        {
                XCEPT_RETHROW (xgi::exception::Exception, "Failed to process invalid CGI request", e);
        }
261
        catch (std::exception  & e)
262
263
264
265
266
267
268
269
270
271
272
        {
		std::string msg = "Failed to interpret incoming CGI content, reason ";
		msg += e.what();
                XCEPT_RAISE (xgi::exception::Exception, msg);
        }
	catch (...)
	{
		XCEPT_RAISE (xgi::exception::Exception, "Failed to proces CGI request");
	}
}

Luciano Orsini's avatar
Luciano Orsini committed
273
// web interface
274
void psx::Application::SMITabPage(xgi::Input * in, xgi::Output * out ) 
Luciano Orsini's avatar
Luciano Orsini committed
275
{
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
	std::string url = "/";
	url += getApplicationDescriptor()->getURN();
	
	// Show the following status information:
	// DNS node reachable or not
	//	
	xgi::Table t("default");
	t.addColumn ("Description");
	t.addColumn ("URL");
	t.addColumn ("Connection");
		
	std::vector<xgi::Table::Row>::iterator row = t.addRow ("default");
	row->addColumn("DNS");
	row->addColumn(dns_);
	
	if ((mapi_ != 0) && (mapi_->isConnected()))
	{
		row->addColumn("OK");
	}
	else
	{
		row->addColumn("Not OK");
	}
	
	*out << t << std::endl;
	
	// Table of subscriptions with button to delete (unsubscribe)
		
	*out << cgicc::br();	
	
	// Show all the subscriptions
	xgi::Table subscriptionTable ("default");
	subscriptionTable.addColumn ("Transaction");
	subscriptionTable.addColumn ("URL");
310
	subscriptionTable.addColumn ("Owner");
311
	subscriptionTable.addColumn ("Action");
312
	subscriptionTable.addColumn ("Name");
313
314
315
316
317
318
319
320
321
	std::vector<std::string> subscriptions = mapi_->getTransactions();
	
	if (subscriptions.empty())
	{
		std::vector<xgi::Table::Row>::iterator subscriptionTableRow = subscriptionTable.addRow ("default");
		subscriptionTableRow->addColumn( "" );
		subscriptionTableRow->addColumn( "no transactions registered" );
		subscriptionTableRow->addColumn( "" );
		subscriptionTableRow->addColumn( "" );
322
		subscriptionTableRow->addColumn( "" );
323
324
325
	}
	else
	{
326
		for (std::vector<std::string>::size_type i = 0; i < subscriptions.size(); ++i)
327
328
329
330
331
332
333
334
335
336
337
		{
			std::vector<xgi::Table::Row>::iterator subscriptionTableRow = subscriptionTable.addRow ("default");
			subscriptionTableRow->addColumn( subscriptions[i] );
			subscriptionTableRow->addColumn( mapi_->getTransactionUrl(subscriptions[i]) );
			subscriptionTableRow->addColumn( mapi_->getTransactionOwner(subscriptions[i]) );
			std::string link = "<a id=\"default\" href=\"";
			link += url;
			link += "/actionSMI?action=clearTransaction&transaction=";
			link += subscriptions[i];
			link += "\">Delete</a>";
			subscriptionTableRow->addColumn( link );
338
339
340
341
342

			psx::mapi::Monitor* monObject = mapi_->getTransaction( subscriptions[i] );
			std::string name = monObject->getName();
			subscriptionTableRow->addColumn( name );

343
344
345
		}
	}
	*out << subscriptionTable << std::endl;
Luciano Orsini's avatar
Luciano Orsini committed
346
}
Luciano Orsini's avatar
Luciano Orsini committed
347

348
void psx::Application::actionSMI(xgi::Input * in, xgi::Output * out ) 
349
350
351
352
353
354
355
356
357
358
359
360
{	
	try
	{
	 	cgicc::Cgicc cgi(in);           
                std::string action = xgi::Utils::getFormElement(cgi, "action")->getValue();
		
		if (action == "clearTransaction")
		{
			std::string transaction = xgi::Utils::getFormElement(cgi, "transaction")->getValue();
			if (mapi_->hasTransaction(transaction))
			{
				mapi_->clearTransaction(transaction);
361
				this->Default(in,out);
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
			}
			else
			{
				std::string msg = "Failed to clear non existing transaction ";
				msg += transaction;
				XCEPT_RAISE (xgi::exception::Exception, msg);
			}
		}
		else
		{
			std::string msg = "Failed to process unknown action ";
			msg += action;
			XCEPT_RAISE (xgi::exception::Exception, msg);
		}
	}
	catch (xgi::exception::Exception& xe)
        {
                XCEPT_RETHROW (xgi::exception::Exception, "CGI processing error", xe);
        }
        catch (xcept::Exception & e)
        {
                XCEPT_RETHROW (xgi::exception::Exception, "Failed to process invalid CGI request", e);
        }
385
        catch (std::exception & e)
386
387
388
389
390
391
392
393
394
395
396
397
        {
		std::string msg = "Failed to interpret incoming CGI content, reason ";
		msg += e.what();
                XCEPT_RAISE (xgi::exception::Exception, msg);
        }
	catch (...)
	{
		XCEPT_RAISE (xgi::exception::Exception, "Failed to proces CGI request");
	}
}


Luciano Orsini's avatar
Luciano Orsini committed
398
399
void psx::Application::actionPerformed (xdata::Event& e) 
{
Luciano Orsini's avatar
Luciano Orsini committed
400
	LOG4CPLUS_INFO(getApplicationLogger(), "all default values have been set, therefore start the services" );
Luciano Orsini's avatar
Luciano Orsini committed
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
	if ( e.type() == "urn:xdaq-event:setDefaultValues" )
	{
		// Static function to initialize application service before create object 
		psx::sapi::ApplicationService::init(projectName_,projectNumber_,databaseManager_,eventManager_);
		
		sapi_= new psx::sapi::ApplicationService(this);
		sapi_->activate();
		
		// Static function to initialize application service before create object 
		psx::mapi::ApplicationService::init(dns_);
		// mapi service is only created once, just like the HandlerService is only created once
		//
		mapi_= new psx::mapi::ApplicationService(this);
		mapi_->activate();
	}
}

418
xoap::MessageReference psx::Application::post(const std::string & url, xoap::MessageReference  request) 
Luciano Orsini's avatar
Luciano Orsini committed
419
{
Luciano Orsini's avatar
Luciano Orsini committed
420
421
	LOG4CPLUS_INFO(getApplicationLogger(), "asynchronous notification from application services" );

Luciano Orsini's avatar
Luciano Orsini committed
422
423
424
425
426
427
428
429
430
	pt::PeerTransportAgent* pta = pt::getPeerTransportAgent();
	
	try
	{
		// Currently the addresses are created, but not deleted.
		// Either the messenger has to take care of that or the addresses need to be reference counted
		pt::Address::Reference destAddress = pta->createAddress(url, "soap");
		pt::Address::Reference localAddress =
			pt::getPeerTransportAgent()->createAddress(getApplicationContext()->getContextDescriptor()->getURL(), "soap");
431
		// These two lines cannot be merged, since a reference that is a temporary object
Luciano Orsini's avatar
Luciano Orsini committed
432
433
434
		// would delete the contained object pointer immediately after use.
		//
		pt::Messenger::Reference mr = pta->getMessenger(destAddress,localAddress);
Luciano Orsini's avatar
Luciano Orsini committed
435

Luciano Orsini's avatar
Luciano Orsini committed
436
437
438
439
440
441
442
443
		pt::SOAPMessenger& m = dynamic_cast<pt::SOAPMessenger&>(*mr);

		
		xoap::MessageReference r = m.send (request);
		return r;
	}
	catch (pt::exception::Exception& pte)
	{	
Luciano Orsini's avatar
Luciano Orsini committed
444
445
		LOG4CPLUS_ERROR(getApplicationLogger(), "asynchronous notification error " << pte.what() );

Luciano Orsini's avatar
Luciano Orsini committed
446
		XCEPT_RETHROW(psx::exception::Exception, "failed to relay message", pte);
Luciano Orsini's avatar
Luciano Orsini committed
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
	}
	catch(xcept::Exception & e)
	{
		LOG4CPLUS_ERROR(getApplicationLogger(), "asynchronous notification error " << e.what() );
		XCEPT_RETHROW(psx::exception::Exception, "failed to relay message", e);
	}
	catch(std::exception & e)
	{
		LOG4CPLUS_ERROR(getApplicationLogger(), "asynchronous notification error " << e.what() );
		XCEPT_RAISE(psx::exception::Exception,  e.what());
	}
	catch (...)
	{
		LOG4CPLUS_ERROR(getApplicationLogger(), "unknown exception " );
		XCEPT_RAISE(psx::exception::Exception, "failed to relay message, unknown exception");
462
	}
Luciano Orsini's avatar
Luciano Orsini committed
463
464
}

465
xoap::MessageReference psx::Application::getWinCCOASubscriptions (xoap::MessageReference msg)
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
{
	if (sapi_ != 0)
	{
		// Create SOAP reply
		xoap::MessageReference reply = xoap::createMessage();
		xoap::SOAPPart soap = reply->getSOAPPart();
		xoap::SOAPEnvelope envelope = soap.getEnvelope();
		xoap::SOAPBody responseBody = envelope.getBody();

		xoap::SOAPName response = envelope.createName("getWinCCOASubscriptionsResponse","psx", psx::NSURI);
		xoap::SOAPElement responseElement = responseBody.addBodyElement(response);

		std::vector<std::string> subscriptions = sapi_->getTransactions();

		for (std::vector<std::string>::size_type i = 0; i < subscriptions.size(); ++i)
		{
			//std::cout <<  "Retrieved dpName: " << (*i).first << " value: " << (*i).second << std::endl;
			xoap::SOAPName subscriptionTag = envelope.createName("subscription","psx", psx::NSURI);
			xoap::SOAPElement subscriptionElement = responseElement.addChildElement(subscriptionTag);
			xoap::SOAPName subscriptionId = envelope.createName("id");
			subscriptionElement.addAttribute(subscriptionId, subscriptions[i] );
			xoap::SOAPName subscriptionURL = envelope.createName("url");
			subscriptionElement.addAttribute(subscriptionURL,  sapi_->getTransactionUrl(subscriptions[i]) );
		}

		return reply;
	}
	else
	{
		XCEPT_RAISE (xoap::exception::Exception, "Service to access PVSS not available");
	}
}

499
xoap::MessageReference psx::Application::getSMISubscriptions (xoap::MessageReference msg)
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
{
	if (mapi_ != 0)
	{
		// Create SOAP reply
		xoap::MessageReference reply = xoap::createMessage();
		xoap::SOAPPart soap = reply->getSOAPPart();
		xoap::SOAPEnvelope envelope = soap.getEnvelope();
		xoap::SOAPBody responseBody = envelope.getBody();

		xoap::SOAPName response = envelope.createName("getSMISubscriptionsResponse","psx", psx::NSURI);
		xoap::SOAPElement responseElement = responseBody.addBodyElement(response);

		std::vector<std::string> subscriptions = mapi_->getTransactions();

		for (std::vector<std::string>::size_type i = 0; i < subscriptions.size(); ++i)
		{
			xoap::SOAPName subscriptionTag = envelope.createName("subscription","psx", psx::NSURI);
			xoap::SOAPElement subscriptionElement = responseElement.addChildElement(subscriptionTag);
			xoap::SOAPName subscriptionId = envelope.createName("id");
			subscriptionElement.addAttribute(subscriptionId, subscriptions[i] );
			xoap::SOAPName subscriptionURL = envelope.createName("url");
			subscriptionElement.addAttribute(subscriptionURL, mapi_->getTransactionUrl(subscriptions[i]));
			xoap::SOAPName subscriptionOwner = envelope.createName("owner");
			subscriptionElement.addAttribute(subscriptionOwner, mapi_->getTransactionOwner(subscriptions[i]));
		}

		return reply;
	}
	else
	{
		XCEPT_RAISE (xoap::exception::Exception, "Service to access SMI not available");
	}
}

534
xoap::MessageReference psx::Application::onWinCCOARequest (xoap::MessageReference msg)
Luciano Orsini's avatar
Luciano Orsini committed
535
{
Luciano Orsini's avatar
Luciano Orsini committed
536
537
538
539
540
541
542
543
	if (sapi_ != 0)
	{
		return sapi_->onRequest(msg);
	}
	else
	{
		XCEPT_RAISE (xoap::exception::Exception, "Service to access PVSS not available");
	}
Luciano Orsini's avatar
Luciano Orsini committed
544
545
}

546
xoap::MessageReference psx::Application::onSMIRequest (xoap::MessageReference msg)  
Luciano Orsini's avatar
Luciano Orsini committed
547
{
Luciano Orsini's avatar
Luciano Orsini committed
548
549
550
551
552
553
554
555
	if (mapi_ != 0)
	{
		return mapi_->onRequest(msg);
	}
	else
	{
		XCEPT_RAISE (xoap::exception::Exception, "Service to access SMI not available");
	}
Luciano Orsini's avatar
Luciano Orsini committed
556
557
}