Commit d24f1288 authored by Ricardo Calheiros de Miranda Cosme's avatar Ricardo Calheiros de Miranda Cosme
Browse files

[OPENBUS-91]

+ Adaptação do demo Hello Orbix para a nova estrutura de credencial.



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/trunk@85454 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 4f8a077e
......@@ -56,8 +56,9 @@ namespace openbus {
#ifdef VERBOSE
openbusidl::acs::Credential* c = new openbusidl::acs::Credential;
any >>= c;
cout << "[credential->entityName: " << c->entityName << "]" << endl;
cout << "[credential->owner: " << c->owner << "]" << endl;
cout << "[credential->identifier: " << c->identifier << "]" << endl;
cout << "[credential->delegate: " << c->delegate << "]" << endl;
#endif
}
void ServerInterceptor::receive_request_service_contexts(ServerRequestInfo*) {}
......@@ -79,13 +80,15 @@ namespace openbus {
openbusidl::acs::Credential* c = new openbusidl::acs::Credential;
any >>= c;
#ifdef VERBOSE
cout << "\t[credential->entityName: " << c->entityName << "]" << endl;
cout << "\t[credential->owner: " << c->owner << "]" << endl;
cout << "\t[credential->identifier: " << c->identifier << "]" << endl;
cout << "\t[credential->delegate: " << c->delegate << "]" << endl;
cout << "[ServerInterceptor::getCredential() END]" << endl;
#endif
openbusidl::acs::Credential_var ret = new openbusidl::acs::Credential;
ret->entityName = c->entityName;
ret->owner = c->owner;
ret->identifier = c->identifier;
ret->delegate = c->delegate;
return ret._retn();
}
}
......
......@@ -35,7 +35,7 @@ int main(int argc, char* argv[]) {
credentialManager.setValue(credential);
cout << endl << "CLIENT" << endl;
cout << "Login efetuado no Openbus." << endl;
cout << "entityName = " << credential->entityName.in() << endl;
cout << "owner = " << credential->owner.in() << endl;
cout << "identifier = " << credential->identifier.in() << endl;
} else {
return -1;
......
......@@ -29,7 +29,7 @@ class Hello_impl : virtual public POA_Hello {
cout << endl << "Servant diz: HELLO!" << endl;
serverInterceptor = ini->getServerInterceptor();
openbusidl::acs::Credential_var c = serverInterceptor->getCredential();
cout << "Usurio OpenBus que fez a chamada: " << c->entityName.in() << endl;
cout << "Usurio OpenBus que fez a chamada: " << c->owner.in() << endl;
};
};
......@@ -58,7 +58,7 @@ int main(int argc, char* argv[]) {
credentialManager.setValue(credential);
cout << "SERVER" << endl;
cout << "Login efetuado no Openbus." << endl;
cout << "entityName = " << credential->entityName.in() << endl;
cout << "owner = " << credential->owner.in() << endl;
cout << "identifier = " << credential->identifier.in() << endl;
} else {
return -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment