Using the Named Object
If you have done everything as described in the previous sections, an object named MyString should be registered in the HydraExpress Agent global naming context. Here is how you would use it in your server implementation code:
std::string DayOfWeekPortTypeImp::getDayOfWeek(rwsf::CallInfo& callInfo,
const std::string& date_in)
{
rwsf::NamingContext* c =
rwsf::NamingContext::getGlobalInstance(); //1
rwsf::NamedObject obj = c->lookup("MyString"); //2
MyString *str; //3
rwsf::naming_extract<MyString>(obj,str); //4
return std::string(str->getStr()); //5
}